11 #include <net-snmp/net-snmp-config.h>
12 #include <net-snmp/definitions.h>
13 #include <net-snmp/types.h>
14 #include <net-snmp/utilities.h>
15 #include <net-snmp/config_api.h>
16 #include <net-snmp/agent/net-snmp-agent-includes.h>
17 #undef INET6 /* SRSLY? */
18 #endif /* HAVE_NET_SNMP */
25 SNMPAgent(const std::string& name, const std::string& masterSocket);
31 #endif /* HAVE_NET_SNMP */
37 d_thread = std::thread(&SNMPAgent::worker, this);
38 #endif /* HAVE_NET_SNMP */
42 static int setCounter64Value(netsnmp_request_info* request,
44 #endif /* HAVE_NET_SNMP */
47 /* OID for snmpTrapOID.0 */
48 static const oid snmpTrapOID[];
49 static const size_t snmpTrapOIDLen;
51 static bool sendTrap(int fd,
52 netsnmp_variable_list* varList);
54 int d_trapPipe[2] = { -1, -1};
55 #endif /* HAVE_NET_SNMP */
58 static void handleTrapsCB(int fd, FDMultiplexer::funcparam_t& var);
59 static void handleSNMPQueryCB(int fd, FDMultiplexer::funcparam_t& var);
60 void handleTrapsEvent();
61 void handleSNMPQueryEvent(int fd);
66 #endif /* SNMP_AGENT_HH */