OSDN Git Service

Update INSTALL.ja.utf-8 for new release.
[ultramonkey-l7/ultramonkey-l7-v2.git] / snmpagent / UltraMonkeyL7.c
1 /*
2  * Note: this file originally auto-generated by mib2c using
3  *        : mib2c.notify.conf,v 5.3 2004/04/15 12:29:19 dts12 Exp $
4  */
5
6 #include <net-snmp/net-snmp-config.h>
7 #include <net-snmp/net-snmp-includes.h>
8 #include <net-snmp/agent/net-snmp-agent-includes.h>
9 #include "UltraMonkeyL7.h"
10
11 static oid      snmptrap_oid[] = { 1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0 };
12
13 int
14 send_l7vsError_trap(void)
15 {
16     netsnmp_variable_list *var_list = NULL;
17     oid             l7vsError_oid[] = { 1, 3, 6, 1, 4, 1, 60000, 1, 0, 1 };
18
19     /*
20      * Set the snmpTrapOid.0 value
21      */
22     snmp_varlist_add_variable(&var_list,
23                               snmptrap_oid, OID_LENGTH(snmptrap_oid),
24                               ASN_OBJECT_ID,
25                               l7vsError_oid, sizeof(l7vsError_oid));
26
27
28     /*
29      * Add any extra (optional) objects here
30      */
31
32     /*
33      * Send the trap to the list of configured destinations
34      *  and clean up
35      */
36     send_v2trap(var_list);
37     snmp_free_varbind(var_list);
38
39     return SNMP_ERR_NOERROR;
40 }