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