RE: COUNTER64 Error

This is a discussion on RE: COUNTER64 Error within the SNMP Users forums, part of the Networking and Network Related category; On Tue, 2006-02-14 at 19:08 +0530, sasikumar.bodathula@wipro.com wrote: > IN the "struct counter64&...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-14-2006
Dave Shield
 
Posts: n/a
Default RE: COUNTER64 Error

On Tue, 2006-02-14 at 19:08 +0530, sasikumar.bodathula@wipro.com wrote:
> IN the "struct counter64" it has two value low and high as
> attributes.


That's correct - being the lower and upper 32-bits of the 64-bit
value respectively.


> Is there any example code which comes with net-snmp src package
> which i can refer.


Try something like:

long long single64;
struct counter64 two32s;

two32s.high = (single64 >> 32) & 0xffff;
two32s.low = (single64) & 0xffff;

single64 = (two32s.high << 32) + two32s.low;

Dave


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=...486&dat=121642
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:59 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0