Hi!
Thank you very much for your constant support Dave.
As you said I should create a netsnmp_session structure,
specifying the trap destination and admin settings and the call
snmp_send, till here it is fine.
But how I'll create netsnmp_session structure is there any API
to this job, if there are, please let me know the API's.
I have gone thru the file snmptrap.c file but it is like parsing
the command line argument provided by the user like
"snmptrap -v2c -c pubic trapIPAddress "" OID trapValueOID I trapValue",
It parses this line and fills the netsnmp_session structure. Hope
whatever I understood from the code is correct.
Let me know how I will create an netsnmp_session structure by
specifying the required information.
With Regards,
G. Siva Prakash Reddy.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Shield
Sent: Tuesday, March 18, 2008 7:27 PM
To: Siva Prakash Reddy G
Cc: [email protected]
Subject: Re: trap error message
On 18/03/2008, Siva Prakash Reddy G <[EMAIL PROTECTED]> wrote:
> >> Net-SNMP Routines I am using that is
>
> >> 1. snmp_varlist_add_variable
> >> 2. send_v2trap
>
> >You cannot use this routine in a general application.
> >It is only available when developing a MIB module
> >within the agent.
>
>
> Then How to generate Trap code using MIB file
You can use the rest of the output from mib2c.notify.conf,
but not the 'send_v2trap' call - this is *only* for use in the
SNMP agent.
You must create a netsnmp_session structure, specifying
the trap destination and admin settings, and then call 'snmp_send'.
See the code for 'snmptrap.c' for details.
Dave
This email message and its attachments may contain CONFIDENTIAL AND PRIVILEGED
INFORMATION intended for the sole use of the addressee(s). If you have received
it in error, please contact the sender by return email, notify your system
manager and destroy the original message and any copies thereof. Any review,
use, disclosure or distribution is unlawful. Please check this email and any
attachments for the presence of viruses. The Company accepts no liability for
any damage caused by any virus transmitted by this email. The views or opinions
presented in this e-mail are solely those of the author and do not necessarily
represent those of the company.
The Company reserves the right to monitor, review and store the content of all
messages sent to or from this e-mail address.
www.aztecsoft.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders