On 23/10/06, Venkata Guddeti <[EMAIL PROTECTED]> wrote: > case MODE_GET: > struct counter64 counterVar; > // Here I had low and high assigning as follows > // counterVar.low = newStats->NumBCFileRead & 0xffffffff; > // counterVar.high = newStats->NumBCFileRead >> 32; > // After seeing Mr. Robert Story's reply that the counter64 is 128 bit size > // I have change it to the following. Hoping that this is OK > > counterVar.low = newStats->NumBCFileRead; > counterVar.high = 0;
No - your original code was correct. The whole point of the counter64 type is that it should work correctly on *both* 32-bit and 64-bit systems - even though the 'low' field would in fact be large enough on a 64-bit box. Robert was pointing out that the overall size of the counter64 structure might be 16 rather than 8 bytes - but this shouldn't affect how it's used. Always but 32-bit quantities in these two fields. 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-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
