Debian Codegraph @

agent/mibgroup/target/target_counters.c

raw
1 #include <net-snmp/net-snmp-config.h>
2
3 #include <net-snmp/net-snmp-features.h>
4
5 #ifdef HAVE_STRING_H
6 #include <string.h>
7 #else
8 #include <strings.h>
9 #endif
10
11 #include <net-snmp/net-snmp-includes.h>
12 #include <net-snmp/agent/net-snmp-agent-includes.h>
13
14 #include "target_counters.h"
15
16 #include <net-snmp/agent/snmp_get_statistic.h>
17
18 netsnmp_feature_require(helper_statistics);
19
20 void
21 init_target_counters(void)
22 {
23 oid target_oid[] = { 1, 3, 6, 1, 6, 3, 12, 1 };
24
25 DEBUGMSGTL(("target_counters", "initializing\n"));
26
27 NETSNMP_REGISTER_STATISTIC_HANDLER(
28 netsnmp_create_handler_registration(
29 "target_counters", NULL, target_oid, OID_LENGTH(target_oid),
30 HANDLER_CAN_RONLY), 4, TARGET);
31 }