Hi Greeting:

    I am able to assign the value to a COUNTER64 type. Although I still don't 
understand the 'high' and 'low' fields in the counter64 structure. The define of 
counter64 type is in include/net-snmp/library/asn1.h.  I assigned the high (=100) and 
low (=0). But the returned value of the query is something like "429496729600". Don't 
know how it comes out the number, and if it's a correct returned value.

-Jim

-----Original Message-----
From: Jim Su [mailto:[EMAIL PROTECTED]
Sent: Friday, August 06, 2004 2:37 PM
To: Net-Snmp-Users
Subject: How to assign a value to COUNTER64 type variable?


Hi Greeting:

      I have several MIB objects are Gauge64 type. According to the mib2c created C 
codes the actual data type in C for Gauge64 is ASN_COUNTER64. To assign the return 
value of the Gauge64 type variables in the var_xxxx() is not straight forward like 
other types of objects. I searched for the files which has manipulation of 
ASN_COUNTER64. The apps/snmpdelta.c has few lines. It uses u64Subtract() & memcpy(). I 
don't know if this is the special case or it is the typical way to handle a COUNTER64 
type variable. Do you know other examples which I can learn how to assign the value to 
a COUNTER64 variable? For instance I have value 100 to be assigned to a COUNTER64 type 
variable. What is the correct way to fill in the counter64 structure? Thanks!

-Jim

Reply via email to