The Snmpx class is a sub class of Snmp that provides additional methods for sending and receiving SNMP messages.
More...
#include <snmp_pp_ext.h>
|
| Snmpx (int &status, u_short port) |
| Construct a new SNMP session using the given UDP port.
|
|
int | receive (struct timeval *, Pdux &, NS_SNMP UdpAddress &, NS_SNMP snmp_version &, NS_SNMP OctetStr &) |
| Receive a SNMP PDU.
|
|
int | send (Pdux const &, NS_SNMP UdpAddress const &, NS_SNMP snmp_version, NS_SNMP OctetStr const &) |
| Send o SNMP PDU.
|
|
u_short | get_port () |
| Get the port the request list is listening on.
|
|
SnmpSocket | get_session_fds () |
| Return the socket descriptor of the socket used for incoming SNMP request.
|
|
The Snmpx class is a sub class of Snmp that provides additional methods for sending and receiving SNMP messages.
AGENT++ uses Snmpx instead of Snmp, because Snmp does not allow to listen on an UDP port for incoming SNMP requests.
- Version
- 3.4.4
- Author
- Frank Fock
Snmpx::Snmpx |
( |
int & |
status, |
|
|
u_short |
port |
|
) |
| |
|
inline |
Construct a new SNMP session using the given UDP port.
- Parameters
-
status | after creation of the session this parameter will hold the creation status. |
port | an UDP port to be used for the session |
u_short Snmpx::get_port |
( |
| ) |
|
Get the port the request list is listening on.
- Returns
- a UDP port.
SnmpSocket Snmpx::get_session_fds |
( |
| ) |
|
|
inline |
Return the socket descriptor of the socket used for incoming SNMP request.
This is the socket the select() of the receive method listens on. This socket descriptor may be used to be included in other select controlled polling loops.
- Returns
- a socket descriptor.
unsigned long Snmpx::MyMakeReqId |
( |
| ) |
|
|
protected |
unsigned long Snmpx::ProcessizedReqId |
( |
unsigned |
short | ) |
|
|
protected |
Receive a SNMP PDU.
- Parameters
-
timeout | wait for an incoming PDU until timeout is exceeded |
pdu | will contain the received SNMP PDU |
form_address | the UDP address of the sender of the received PDU |
version | will contain the SNMP version of the received PDU |
community | will conatin the community (in case of SNMPv3 the security information) of the received PDU |
- Returns
- SNMP_CLASS_SUCCESS on success and SNMP_CLASS_ERROR, SNMP_CLASS_TL_FAILED on failure.
Send o SNMP PDU.
- Parameters
-
pdu | the SNMP PDU to send |
address | the receiver's UDP address |
version | the SNMP version to be used |
community | the community / security information to be used |
- Returns
- SNMP_CLASS_SUCCESS on success and SNMP_CLASS_ERROR, SNMP_CLASS_TL_FAILED on failure.
The documentation for this class was generated from the following file: