#include <agentx.h>
|
static time_t | compute_timeout (u_int, u_int=0) |
| Compute the timeout (timestamp when a PDU/request times out)
|
|
bool | stopit |
|
AgentXSlave::AgentXSlave |
( |
| ) |
|
virtual AgentXSlave::~AgentXSlave |
( |
| ) |
|
|
virtual |
virtual bool AgentXSlave::bind_tcp |
( |
| ) |
|
|
virtual |
Bind TCP socket.
- Returns
- TRUE if the socket could be bound successfully.
Implements AgentX.
virtual bool AgentXSlave::bind_unix |
( |
| ) |
|
|
virtual |
Bind unix domain socket.
- Returns
- TRUE if the socket could be bound successfully.
Implements AgentX.
int AgentXSlave::get_socket |
( |
| ) |
|
|
inline |
Get the socket descriptor used to communicate with the AgentX master agent.
- Returns
- a socket descriptor of an UNIX socket or a TCP socket.
Check whether two PDUs are a request/response pair.
- Parameters
-
request | the "request" PDU. |
response | the "response" PDU. |
- Returns
- TRUE if response is a response to request, FALSE otherwise.
Implements AgentX.
void AgentXSlave::lock_rcv_socket |
( |
| ) |
|
Initiates (opens) a AgentX session with the master agent.
- Parameters
-
- Returns
- AGENTX_OK if session opened successfully, any other AGENTX error code on failure.
virtual AgentXPdu* AgentXSlave::receive |
( |
const u_int |
, |
|
|
int & |
|
|
) |
| |
|
virtual |
Wait a given time for an incoming request.
- Parameters
-
timeout | the maximum time in milli seconds to wait for an incoming request. |
status | returns the current status of the connection with the master. |
- Returns
- a pointer to the received request, or 0, if within the timeout period no request has been received.
virtual int AgentXSlave::send |
( |
const AgentXPdu & |
| ) |
|
|
virtual |
Send an AgentXPdu.
- Parameters
-
- Returns
- an error status.
Send an AgentXPdu as a synchronous request.
- Parameters
-
pdu | the pdu to send. Packet id and send time are set. |
response | the pdu to hold the received response. |
- Returns
- an error status.
void AgentXSlave::set_master_address |
( |
const NS_SNMP UdpAddress & |
addr | ) |
|
|
inline |
Set the masters IP address.
Default is localhost (127.0.0.1).
- Parameters
-
ipAddress | the IP address of an AgentX master. If the port portion is not 0 it is used instead of the standard AgentX TCP port. |
void AgentXSlave::unlock_rcv_socket |
( |
| ) |
|
int AgentXSlave::axSlaveSocket |
|
protected |
NS_SNMP UdpAddress AgentXSlave::masterAddress |
|
protected |
The documentation for this class was generated from the following file: