Re: COUNTER64 C type?
Matt Kappel <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CAAKgmzeA=fS8LzvChXOpMq=mn4=MjhK3j9QXNkxLb1+YAL_0pQ@mail.gmail.com> |
To answer my own question, for COUNTER64, the struct counter64 (defined in asn1.h) should be used, where you split the 64 bit value into high and low u_long (unsigned long). On Mon, Oct 20, 2014 at 11:53 PM, Matt Kappel <[email protected]> wrote: > Hello, > > I'm trying to write an AgentX subagent and used mib2c to successfully have > some Unsigned32 values (uint32_t in C) being reported properly. I'm also > trying to get COUNTER64 values reported, but it doesn't appear that > uint64_t translates well. > > Here's a snippet of my edited mib2c-generated code: > > case MODE_GET: > > snmp_set_var_typed_value(requests->requestvb, ASN_COUNTER64, > > (u_char *)&my_64_bit_unsigned_val, sizeof > (uint64_t)); > > > Any idea what I'm doing wrong. Is there some other C int type I should be > using for ASN_COUNTER64? > > > Thanks, > > Matt > ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ 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