#include <agentx.h>
Public Member Functions | |
AgentXSlave () | |
virtual | ~AgentXSlave () |
virtual boolean | bind_unix () |
Bind unix domain socket. | |
void | set_master_address (const NS_SNMP UdpAddress &addr) |
Set the masters IP address. | |
virtual boolean | bind_tcp () |
Bind TCP socket. | |
virtual AgentXPdu * | receive (const u_int, int &) |
Wait a given time for an incoming request. | |
virtual int | send (const AgentXPdu &) |
Send an AgentXPdu. | |
virtual int | send_synch (AgentXPdu &, AgentXPdu &) |
Send an AgentXPdu as a synchronous request. | |
virtual int | open_session (AgentXSession &) |
Initiates (opens) a AgentX session with the master agent. | |
virtual boolean | is_response (const AgentXPdu &, const AgentXPdu &) |
Check whether two PDUs are a request/response pair. | |
void | lock_rcv_socket () |
void | unlock_rcv_socket () |
int | get_socket () |
Get the socket descriptor used to communicate with the AgentX master agent. | |
Protected Types | |
enum | ConnectionType { UNCONNECTED, UNIX, TCP } |
Protected Attributes | |
int | axSlaveSocket |
ConnectionType | connectionType |
NS_SNMP UdpAddress | masterAddress |
enum AgentXSlave::ConnectionType [protected] |
AgentXSlave::AgentXSlave | ( | ) |
virtual AgentXSlave::~AgentXSlave | ( | ) | [virtual] |
virtual boolean AgentXSlave::bind_unix | ( | ) | [virtual] |
void AgentXSlave::set_master_address | ( | const NS_SNMP UdpAddress & | addr | ) | [inline] |
virtual boolean AgentXSlave::bind_tcp | ( | ) | [virtual] |
virtual AgentXPdu* AgentXSlave::receive | ( | const | u_int, | |
int & | ||||
) | [virtual] |
Wait a given time for an incoming request.
timeout | the maximum time in milli seconds to wait for an incoming request. | |
status | returns the current status of the connection with the master. |
virtual int AgentXSlave::send | ( | const AgentXPdu & | ) | [virtual] |
Send an AgentXPdu as a synchronous request.
pdu | the pdu to send. Packet id and send time are set. | |
response | the pdu to hold the received response. |
virtual int AgentXSlave::open_session | ( | AgentXSession & | ) | [virtual] |
Initiates (opens) a AgentX session with the master agent.
session | an AgentXSession instance. |
Check whether two PDUs are a request/response pair.
request | the "request" PDU. | |
response | the "response" PDU. |
Implements AgentX.
void AgentXSlave::lock_rcv_socket | ( | ) |
void AgentXSlave::unlock_rcv_socket | ( | ) |
int AgentXSlave::get_socket | ( | ) | [inline] |
Get the socket descriptor used to communicate with the AgentX master agent.
int AgentXSlave::axSlaveSocket [protected] |
ConnectionType AgentXSlave::connectionType [protected] |
NS_SNMP UdpAddress AgentXSlave::masterAddress [protected] |