Okay.
Can you please tell me how we can identify the actual error happening in 
snmp_send()? Which API to be used for logging?
One thing is sure that snmp_send() retuned 0. That's why I got 
"snmptrapd[22813]: Forward failed:" message in syslog file.

Snmp sending portion in forward_handler() is shown below for reference:
*****************
if (!snmp_send( ss, pdu2 )) {
        snmp_sess_perror("Forward failed", ss);
        snmp_free_pdu(pdu2);
}
**************************

thank you,
renjith

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf 
Of Dave Shield
Sent: Wednesday, October 20, 2010 5:39 PM
To: Renjith R. V.
Cc: [email protected]
Subject: Re: how to identify variable 'type' and 'value' from pdu structure

On 20 October 2010 11:44, Renjith R. V. <[email protected]> wrote:
>>Have a look at what error the 'snmp_send' routine is returning.
> I have checked errno, snmp_errno and  err_string values once snmp_send()
> returned 0;
> But there is nothing in these fields(empty).

Of course there isn't.

You've defined your own local variables with the same names
    (thus masking the system library versions).

And you've also assigned 0 to these variables *after* the snmp_send call
    (which will have set the system library variables to indicate the error).

Either of these mistakes would individually be sufficient to prevent you
discovering what went wrong.

Dave
***** Confidentiality Statement/Disclaimer *****

This message and any attachments is intended for the sole use of the intended 
recipient. It may contain confidential information. Any unauthorized use, 
dissemination or modification is strictly prohibited. If you are not the 
intended recipient, please notify the sender immediately then delete it from 
all your systems, and do not copy, use or print. Internet communications are 
not secure and it is the responsibility of the recipient to make sure that it 
is virus/malicious code exempt.
The company/sender cannot be responsible for any unauthorized alterations or 
modifications made to the contents. If you require any form of confirmation of 
the contents, please contact the company/sender. The company/sender is not 
liable for any errors or omissions in the content of this message.

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to