In interfaces.c file, I could see the following code.
case IFINOCTETS:
long_return = (u_long) if_msg.ifm_data.ifi_ibytes;
return (u_char *) & long_return;
I could see a possiblity of 2 different issues with the above code.
1. global variable 'long return' is defined as long (signed) in
snmp_vars.c which can take even negative values. Does it correct as
per SNMP standard? The code has to generate a unsigned long variable
since Counter32 can hold only positive values?
2. As per the SNMP Standard, Counter32 values when it reaches the
maximum, it has to reset to zero, but in the above code snippet in
interfaces.c, there is no such syntax to reset the value to zero if it
reaches maximum.
Please clarify.
Thank You.
Regards,
Karthik N
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders