2
######################################################################
4
######################################################################
7
* Note: this file originally auto-generated by mib2c using
8
* $Id: mib2c.notify.conf,v 5.2 2003/06/26 09:27:41 dts12 Exp $
13
/* function declarations */
14
@foreach $i notifications@
15
int send_${i}_trap(void);
18
#endif /* $name.uc_H */
19
######################################################################
21
######################################################################
24
* Note: this file originally auto-generated by mib2c using
25
* $Id: mib2c.notify.conf,v 5.2 2003/06/26 09:27:41 dts12 Exp $
28
#include <net-snmp/net-snmp-config.h>
29
#include <net-snmp/net-snmp-includes.h>
30
#include <net-snmp/agent/net-snmp-agent-includes.h>
33
static oid snmptrap_oid[] = {1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0};
35
@foreach $i notifications@
37
send_${i}_trap( void );
39
netsnmp_variable_list *var_list = NULL;
40
oid ${i}_oid[] = { $i.commaoid };
43
oid ${v}_oid[] = { $v.commaoid, 0 };
46
oid ${v}_oid[] = { $v.commaoid, /* insert index here */ };
51
* Set the snmpTrapOid.0 value
53
snmp_varlist_add_variable(&var_list,
54
snmptrap_oid, OID_LENGTH(snmptrap_oid),
56
${i}_oid, sizeof(${i}_oid));
58
@if count_varbinds($i) > 0@
60
* Add any objects from the trap definition
64
snmp_varlist_add_variable(&var_list,
65
${v}_oid, OID_LENGTH(${v}_oid),
67
/* Set an appropriate value for $v */
72
* Add any extra (optional) objects here
76
* Send the trap to the list of configured destinations
79
send_v2trap( var_list );
80
snmp_free_varbind( var_list );
82
return SNMP_ERR_NOERROR;