ark::snmp::SnmpClient
Defined in header “ark/snmp/snmp_client.hh”.
Thin C++ wrapper around net-snmp session APIs.
Why this exists:
Methods
-
SnmpClient(const SnmpClientConfiguration & config)
-
~SnmpClient()
-
SnmpClient()
No copies. SnmpClient owns a net-snmp session handle. -
SnmpClient & operator=()
No copies. SnmpClient owns a net-snmp session handle. -
SnmpClient()
No moves. Keep ownership simple and avoid invalidating session-owned memory. -
SnmpClient & operator=()
No moves. Keep ownership simple and avoid invalidating session-owned memory. -
std::vector< std::string > list_mibs()
Returns loaded MIB module names visible to net-snmp in this process. -
std::optional< SnmpResult > try_get(const std::string & oid)
Gets a single OID value, returning empty if no variable is returned. -
SnmpResult get(const std::string & oid)
Gets a single OID value, throwing on empty result. -
std::vector< SnmpResult > get(const std::vector< std::string > & oids)
Gets multiple OID values with a single request PDU. -
std::vector< SnmpResult > get_bulk(const std::string & root_oid, int non_repeaters, int max_repetitions)
Performs a GETBULK operation for subtree/root OID.