Re: c code!Help me plz

This is a discussion on Re: c code!Help me plz within the SNMP Coders forums, part of the Networking and Network Related category; On 22/05/2005 00:44:25, Alaios wrote: > > I have se the two variables > oid myoid[] = { ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-22-2005
Tom Flavel
 
Posts: n/a
Default Re: c code!Help me plz

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
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:50 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0