c code!Help me plz

This is a discussion on c code!Help me plz within the SNMP Coders forums, part of the Networking and Network Related category; Sorry dave for upsetting u.. but i am a student and i dont have the money to pay u for ...


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
Alaios
 
Posts: n/a
Default c code!Help me plz

Sorry dave for upsetting u.. but i am a student
and i dont have the money to pay u for replying to my
questions...
I have searched it a little more and if someone can
help me i would really appreciate that

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...









[ First - *please* don"t mail me privately, without
copying
any responses to the mailing list. I don"t have
the time
or inclination to offer private, unpaid, SNMP
consultancy.
Keep discussions to the list, where others can
both learn
and offer advice. Thanks. ]


On Fri, 2005-05-20 at 11:58, Alaios wrote:
> Thx ... I have found the following in the code
> snmp_add_null_var(pdu, id_oid, id_len);
> I want to take the following oid .1.3.6.1.2.1.4.8
> how i must denote the id_oid and id_len parameters?


oid id_oid[] = { 1,3,6,1,2,1,4,8 };
int id_len = OID_LENGTH( id_oid );

Dave



__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail


-------------------------------------------------------
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
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

vB 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:23 AM.


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