On 22/05/2005 00:44:25, Alaios wrote:
>
> I have se the two variables
> oid myoid[] = { 1, 3, 6, 1, 2, 1, 4, 8 };
> size_t length_myoid = sizeof(myoid) /
> sizeof(oid);
>
> ...skipped a bunch of lines.....
> sess_handle = snmp_open(&session);
> pdu = snmp_pdu_create(SNMP_MSG_GET);
> snmp_add_null_var(pdu, myoid, length_myoid);
> status = snmp_synch_response(sess_handle, pdu,
> &response);
> printf("response->errstart is
> %d\n",response->errstat);
>
> and this returns the no 2..
> Plz help me i am sure that u can help me fixing this
> problem...
response->errstat is a value of the form SNMP_ERR_*
These are defined in snmp.h:
#define SNMP_ERR_NOSUCHNAME (2)
You should be using these instead of looking at the numeric values.
(I'd suggest reading snmpdemoapp.c if you haven't already.)
So, are you certian that this OID exists?
Can you snmpget it using the snmpget(1) command line program?
Regards,
--
Tom
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders