Hello Dave & All ,

As per suggestion i put up the function in my code & recompile it. 
After execution i got the following output of my code. 

It looks that my code keeps on resending the PDU but no recieve of PDU from 
router being agent is running on that. 

Can you please explain me why it is so.. how to avoid this so that i can 
recieve the PDU data .& print the intended data.


---------------------------------------------------------------
[EMAIL PROTECTED] snmpdemoapp]$ ./demo 10.11.2.5 SiLsnmpRO

  Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens <[EMAIL PROTECTED]>
Session Peername:10.11.2.5

Sending 46 bytes to UDP: [10.11.2.5]:161
0000: 30 2C 02 01  00 04 09 53  69 4C 73 6E  6D 70 52 4F    0,.....SiLsnmpRO
0016: A0 1C 02 04  20 40 93 D6  02 01 00 02  01 00 30 0E    .... @........0.
0032: 30 0C 06 08  2B 06 01 02  01 01 01 00  05 00          0...+.........


Resending 46 bytes to UDP: [10.11.2.5]:161
0000: 30 2C 02 01  00 04 09 53  69 4C 73 6E  6D 70 52 4F    0,.....SiLsnmpRO
0016: A0 1C 02 04  20 40 93 D6  02 01 00 02  01 00 30 0E    .... @........0.
0032: 30 0C 06 08  2B 06 01 02  01 01 01 00  05 00          0...+.........


Resending 46 bytes to UDP: [10.11.2.5]:161
0000: 30 2C 02 01  00 04 09 53  69 4C 73 6E  6D 70 52 4F    0,.....SiLsnmpRO
0016: A0 1C 02 04  20 40 93 D6  02 01 00 02  01 00 30 0E    .... @........0.
0032: 30 0C 06 08  2B 06 01 02  01 01 01 00  05 00          0...+.........


Resending 46 bytes to UDP: [10.11.2.5]:161
0000: 30 2C 02 01  00 04 09 53  69 4C 73 6E  6D 70 52 4F    0,.....SiLsnmpRO
0016: A0 1C 02 04  20 40 93 D6  02 01 00 02  01 00 30 0E    .... @........0.
0032: 30 0C 06 08  2B 06 01 02  01 01 01 00  05 00          0...+.........


Resending 46 bytes to UDP: [10.11.2.5]:161
0000: 30 2C 02 01  00 04 09 53  69 4C 73 6E  6D 70 52 4F    0,.....SiLsnmpRO
0016: A0 1C 02 04  20 40 93 D6  02 01 00 02  01 00 30 0E    .... @........0.
0032: 30 0C 06 08  2B 06 01 02  01 01 01 00  05 00          0...+.........

Status Value:2
snmpget: Timeout
--------------------------------------------------------------------  

Please give ur valuable suggestions.


---
Regards
Peeyush Bishnoi


On Thu, 19 Apr 2007 Dave Shield wrote :
>On 16 Apr 2007 13:43:05 -0000, Peeyush  Bishnoi
><[EMAIL PROTECTED]> wrote:
>>  SNMPGET Which i am shooting on Router is
>>  snmpget -v1 -c SiLsnmpRO 10.11.2.5  sysDescr.0
>>  Correct output is coming.
>>
>>  Code File Name: Attached with this mail.
>>  ./demo 10.11.2.5 SilsnmpRO
>>
>>  I have attached the tar file with this mail .
>
>I've had a quick look at this code, and can't see anything obviously wrong.
>
>Have you got access to the SNMP agent on the router?
>If you can, I'd be inclined to stop this, and restart it using something like
>
>     snmpd -f -Le -d
>
>then query it first using "snmpget" and then using your application.
>What do you see in each case?
>
>
>If you can't do this, then try running
>
>    snmpget -d .....
>
>to get a packet dump from the snmpget command.
>Add the statement:
>
>            netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
>                                NETSNMP_DS_LIB_DUMP_PACKET, 1);
>
>to your code and recompile, to get a packet dump of this request.
>
>Again, what do you see?
>
>Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to