Richard> All of interface.c uses ulong and long for the values. Hence if the
Richard> kernel reports > (2^32)-1 then you get that value reported upwards.

Ummm...
What would happen if the "snmp_set_var_value" API call (and similar)
applied a 32-bit mask to any integer-based value that it received?
Would that help any, or might it introduce other problems?


Robert> As part of that daunting task, I've argued for using types with
Robert> explicit sizes where appropriate, instead of the now ambiguous
Robert> long, but the idea hasn't gone over very well.

As I recall, it wasn't so much that we felt this was a bad idea - just
one that needed to be taken cautiously.

I'd suggest that the first thing would be to make sure that we have
suitable 32-bit types available - either defining new project-specific
types, or pick on a "standard" one and make sure it's defined
e.g.
        #ifndef HAVE_32BIT_INT
        typedef uin32_t   whatever_int;
        #endif

and maybe do something similar for SCNuMAX:

        #ifndef SCNuMAX
          #if 32-bit-architecture
            #define SCNuMAX  lu
          #else
            #define SCNuMAX  llu
          #end
        #end

or whatever is needed.


That's probably something that could go in for 5.2,
which would then provide the groundwork for starting to make use of it
in later releases.

Dave



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to