RE: snmp_set_var_value() and 64bit integer truncation

"Mike Ayers" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <83E753BE7B6A324ABB336245BAF1DAAC099E0A23@mailserver.metatv-ds.metatv.com>
> From: Brian A. Seklecki [mailto:[email protected]] 
> Sent: Tuesday, October 28, 2008 8:00 AM

> Ahh -- so the whatever MIB (it's either hrStorage or diskIO 
> or IF-MIB i 
> forget) is explicitly mapping data structures into a system 
> specific data 
> type (long or long long) that is not 64bit aware?

	It appears that the MIB in question is using 64 bit data to populate 32 bit MIB data structures, which is indeed an error - whether or not these are system data structures is unknown.  I would guess that the author assumed that long data types were 32 bits, a common mistake in C code, and mapped a long directly to ASN_INTEGER, or perhaps ASN_COUNTER.  This would work on a 32 bit kernel, but apparently fails on the 64 bit kernel.


	HTH,

Mike

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.