Title: RE: COUNTER64 Error

Thanks for ur inputs

I tried somthing like this
long long lval;
struct counter64 count;
count.low = lval&0x00000000ffffffff;
count.high = lval&0xffffffff00000000;
this is also working.


Rgards,
Sasikumar.



-----Original Message-----
From: Dave Shield [mailto:[EMAIL PROTECTED]]
Sent: Tue 2/14/2006 8:06 PM
To: Sasikumar Bodathula (WT01 - Broadband Networks)
Cc: net-snmp-users@lists.sourceforge.net
Subject: RE: COUNTER64 Error

On Tue, 2006-02-14 at 19:08 +0530, [EMAIL PROTECTED] 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

Reply via email to