This is a discussion on Re: noSuchName within the SNMP Coders forums, part of the Networking and Network Related category; On Tue, 2005-09-27 at 13:05 +0100, Patrick Welche wrote: > Good plan: snmpget: > > { GetRequest(28) ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Tue, 2005-09-27 at 13:05 +0100, Patrick Welche wrote:
> Good plan: snmpget: > > { GetRequest(28) R=86800923 system.sysUpTime.0 } > { GetResponse(32) R=86800923 system.sysUpTime.0=1062737154 } > > and my broken programme: > > { GetRequest(36) R=1548568929 system.sysUpTime.0 .0.0.0.0.0[|snmp] } > { GetResponse(36) R=1548568929 noSuchName@2 system.sysUpTime.0= .0.0.0.0.0=[|snmp] } So it's adding two varbinds instead of one (the second of which is bogus) > so that looks like a bad sizeof(value)/sizeof(oid), yet Errr... no. > valuelen[i]=sizeof(value[i])/sizeof(oid); > if (!snmp_parse_oid(varname[i], value[i], &valuelen[i])) { > snmp_perror(varname[i]); > failures++; > } This code appears to be concerned with how to add a given (single) varbind. From what you're said, I suspect that the problem lies with the enclosing loop. This code is being called (correctly) with i=0, and then again (incorrectly) with i=1. Have a look at the conditions attached to the loop statement. Dave ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders |