Re: No Such Instance when requesting multiple Counter64 on a table
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CAKoMtGbcPxWOJ7s6JUe+93Og=SCLLENAW5G4vR5ZvA68FX9pbA@mail.gmail.com> |
On 19 December 2011 10:12, elisa scandellari <[email protected]> wrote: > I've got a problem when I do a get request on a table that contains > Counter64 values. > If I do a get request on a single value Counter64 the response is correct: > When I try to do: > snmpget -v 3 -a MD5 -A "passw" -l authPriv -u username -x DES -X "passw" > udp:xxx.xxx.xxx.xxx:161 xxx-MIB::parityErrors.2 xxx-MIB::hdlsAborts.2 > > I receive > xxx-MIB::parityErrors.2 = Counter64: 0 > xxx-MIB::hdlcAborts.2 = No Such Instance currently exists at this OID The problem lies in the code that implements this object. > for (pRequestInfo = requests; pRequestInfo; pRequestInfo = > pRequestInfo->next) > { So for each varbind, 'pRequestInfo' is pointing the the data structure that refers to that particular varbind. > //Read-support (also covers GetNext requests) > case MODE_GET: > case MODE_GETNEXT: > case MODE_GETBULK: > snmp_set_var_typed_value(requests>requestvb, > ASN_COUNTER64,....); But you are always setting the value of the *first* varbind in the list. Try using snmp_set_var_typed_value(pRequestInfo>requestvb, ...); instead Dave ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ 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