Menu

SessionHandle

Stéphane Charette

SessionHandle

net-snmp provides many API layers. SNMPpp uses the "Single API" which makes net-snmp safer to use in multi-threaded applications. This API requires a session handle which is defined in net-snmp as a void * pointer.

SNMPpp::SessionHandle

To make it easier to pass around in C++, the vague void * session handle has been typedef to SNMPpp::SessionHandle. You can use the typical net-snmp calls such as snmp_sess_open() and snmp_sess_close() to manage the session handle, or you can use the C++ friendly calls SNMPpp::openSession() and SNMPpp::closeSession().

Either way, remember to close the session once you are done talking to the SNMP server. See SNMPpp/net-snmppp.hpp for details.


Related

Wiki: Home
Wiki: PDU

MongoDB Logo MongoDB