snmpget correctly retrieves an oid I am trying to read. If however
I try to do what I think is the same thing as snmpget inside a program,
I get
Reason 0/2: (noSuchName) There is no such variable name in this MIB.
at which point it correctly prints the text representation of the missing
oid as a failed object.
What sort of fault am I looking for?
In brief:
init_snmp
snmp_sess_init
snmp_sess_open
snmp_sess_session
init_mib
read_module
loop over snmp_parse_oid -> value[i], valuelen[i], all OK
Then:
value[IFINDEX][valuelen[IFINDEX]-1]=ifaceno;
snmp_add_null_var(pdu,value[IFINDEX],valuelen[IFINDEX]);
fprint_objid(stderr,value[IFINDEX],valuelen[IFINDEX]);
prints the correct oid, then
status = snmp_sess_synch_response(sessp, pdu, &response);
returns noSuchName in response->errstat. There doesn't seem to be
enough there to go wrong.. Any clues for things to check?
(I use snmp_sess_open, snmpget uses snmp_open, but that should be OK?)
Cheers,
Patrick
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders