#include <agentx.h>
|
| static time_t | compute_timeout (u_int, u_int=0) |
| | Compute the timeout (timestamp when a PDU/request times out)
|
| |
| virtual AgentX::~AgentX |
( |
| ) |
|
|
virtual |
| virtual bool AgentX::bind_tcp |
( |
| ) |
|
|
pure virtual |
Bind TCP socket.
- Returns
- TRUE if the socket could be bound successfully.
Implemented in AgentXSlave, and AgentXMaster.
| virtual bool AgentX::bind_unix |
( |
| ) |
|
|
pure virtual |
Bind unix domain socket.
- Returns
- TRUE if the socket could be bound successfully.
Implemented in AgentXSlave, and AgentXMaster.
| bool AgentX::check_peer_closed |
( |
fd_set * |
| ) |
|
| void AgentX::close_session |
( |
const AgentXSession & |
, |
|
|
u_int |
, |
|
|
u_char |
|
|
) |
| |
Close a session.
- Parameters
-
| session | a AgentXSession instance. |
| transactionID | the transcation id to be used. |
| reason | the reason. |
| static time_t AgentX::compute_timeout |
( |
u_int |
, |
|
|
u_int |
= 0 |
|
) |
| |
|
static |
Compute the timeout (timestamp when a PDU/request times out)
- Parameters
-
| sessionTimeout | the timeout value of the session. If sessionTimeout is 0 AGENTX_DEFAULT_TIMEOUT is used to compute the timestamp. |
| regionTimeout | the timeout value of the region. If regionTimeout is 0 or if it is not given, the sessionTimeout or AGENTX_DEFAULT_TIMEOUT value is used to compute the timestamp respectively. |
- Returns
- a timestamp (current time + timeout)
| int AgentX::get_connect_mode |
( |
| ) |
|
|
inline |
Get the connection mode.
Thus, whether to use the UNIX domain socket, the TCP socket, or both.
- Returns
- a possibly ored value of AX_USE_UNIX_SOCKET and AX_USE_TCP_SOCKET.
| int AgentX::get_tcp_socket |
( |
| ) |
|
Get the AgentX socket.
- Returns
- a socket descriptor.
| int AgentX::get_unix_socket |
( |
| ) |
|
Get the AgentX socket.
- Returns
- a socket descriptor.
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.
Implemented in AgentXSlave, and AgentXMaster.
| void AgentX::lock_peers |
( |
| ) |
|
|
inline |
| void AgentX::lock_queue |
( |
| ) |
|
|
inline |
| void AgentX::lock_socket |
( |
| ) |
|
Get a cursor on the peer list.
- Returns
- a cursor on the receiver's peer list.
Ping a session.
- Parameters
-
| session | a AgentXSession instance. |
| transactionID | the transcation id to be used. |
| virtual bool AgentX::quit |
( |
| ) |
|
|
inlinevirtual |
Return whether the agentX should quit.
- Returns
- TRUE if the agentX should quit
| virtual int AgentX::receive_agentx |
( |
int |
, |
|
|
AgentXPdu & |
|
|
) |
| |
|
virtual |
Receive an AgentX PDU.
- Parameters
-
| sd | a socket descriptor |
| pdu | an empty AgentXPdu instance. |
- Returns
- an error code on failure or AGENTX_CLASS_SUCCESS on success
| virtual void AgentX::reinit |
( |
| ) |
|
|
inlinevirtual |
(Re)initialize the AgentX protocol stack.
This resets values like stopit in order to be able to reestablish an AgentX connection.
Remove a peer rom the peer list.
- Parameters
-
| victim | an example for an AgentXPeer instance that should be removed from the peer list. |
- Returns
- a pointer to the removed peer instance or 0 if no such instance could be found.
| virtual int AgentX::send_agentx |
( |
int |
, |
|
|
const AgentXPdu & |
|
|
) |
| |
|
virtual |
Send an AgentX PDU.
- Parameters
-
| sd | a socket descriptor |
| pdu | the AgentXPdu instance to be send |
- Returns
- an error code on failure or AGENTX_CLASS_SUCCESS on success
| void AgentX::set_connect_mode |
( |
int |
m | ) |
|
|
inline |
Set connection mode.
Currently UNIX domain sockets (AX_USE_UNIX_SOCKET) and TCP sockets (AX_USE_TCP_SOCKET) are supported.
- Parameters
-
| mode | a possibly ored value of AX_USE_UNIX_SOCKET and AX_USE_TCP_SOCKET. |
| int AgentX::set_file_descriptors |
( |
fd_set * |
| ) |
|
| void AgentX::set_tcp_port |
( |
int |
| ) |
|
| void AgentX::set_unix_port_loc |
( |
const NS_SNMP OctetStr & |
| ) |
|
Set the unix port location.
- Parameters
-
| location | an AF_UNIX socket port location |
| void AgentX::unlock_peers |
( |
| ) |
|
|
inline |
| void AgentX::unlock_queue |
( |
| ) |
|
|
inline |
| void AgentX::unlock_socket |
( |
| ) |
|
| Synchronized AgentX::axPeersLock |
|
protected |
| Synchronized AgentX::axSocketLock |
|
protected |
| NS_SNMP OctetStr AgentX::axUnixSocketLocation |
|
protected |
The documentation for this class was generated from the following file: