On 23/08/06, Sachin Mishra <[EMAIL PROTECTED]> wrote:
>                  When I am trying to set the value of the object on a 64 bit
> machine, the "requests" variable passed in the table_handler function
> has requests->requestvb->val_len assigned as 8. I want to know why this
> value is 8 and not 4. (sizeof(int) gives 4 on that machine)?

What does "sizeof(long)" give?  4 or 8?
Note that (for historical reasons), integer values are held internally
as "long" rather than "int".    This is so pervasive that it would be
extremely difficult to change now.

I believe that what's been done to address this problem, is to mask
off the bottom 32-bits of all integer values (other than Counter64) -
probably when building the PDU.   You could either tweak your library
code to do the same, or do an equivalent masking when setting the
values.  As long as the *value* is 32-bits, it doesn't actually matter
if the variable that holds it is 64.

Dave

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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

Reply via email to