hi,
i want to implement snamp standard traps like coldstart ,warm start,
linkdown,linkup...
Using mib2c i generated the template code for coldstart?
after this what to edit in coldStart.c?
coldstart.c contains :
/*
* Note: this file originally auto-generated by mib2c using
* : mib2c.notify.conf,v 5.2.2.1 2004/04/15 12:29:06 dts12 Exp $
*/
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "coldStart.h"
static oid snmptrap_oid[] = {1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0};
int
send_coldStart_trap( void )
{
netsnmp_variable_list *var_list = NULL;
oid coldStart_oid[] = { 1,3,6,1,6,3,1,1,5,1 };
/*
* Set the snmpTrapOid.0 value
*/
snmp_varlist_add_variable(&var_list,
snmptrap_oid, OID_LENGTH(snmptrap_oid),
ASN_OBJECT_ID,
coldStart_oid, sizeof(coldStart_oid));
/*
* Add any extra (optional) objects here
*/
/*
* Send the trap to the list of configured destinations
* and clean up
*/
send_v2trap( var_list );
snmp_free_varbind( var_list );
return SNMP_ERR_NOERROR;
}
thank you
looking forward for ur help
with regards
ganesy y
http://www.bel-india.com Visit BEL Website
Confidentiality Notice
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of
the addressee(s) and may contain confidential or privileged
information. If you are not the intended recipient, please notify
the sender at Bharat Electronics or [email protected] immediately
and destroy all copies of this message and any attachments.
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users