AgentX++  2.0.5
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AgentXMaster Class Reference

#include <agentx.h>

Inheritance diagram for AgentXMaster:
AgentX

Public Member Functions

 AgentXMaster ()
 
virtual ~AgentXMaster ()
 
void set_timeout (int t)
 Set the connection timeout.
 
virtual bool bind_unix ()
 Bind unix domain socket.
 
virtual bool bind_tcp ()
 Bind TCP socket.
 
virtual void connect_request (fd_set *, int *)
 Process a subagent's connect request.
 
virtual bool is_response (const AgentXPdu &, const AgentXPdu &)
 Check whether two PDUs are a request/response pair.
 
- Public Member Functions inherited from AgentX
 AgentX ()
 Create an AgentX session.
 
virtual ~AgentX ()
 Destructor.
 
void set_connect_mode (int m)
 Set connection mode.
 
int get_connect_mode ()
 Get the connection mode.
 
void set_unix_port_loc (const NS_SNMP OctetStr &)
 Set the unix port location.
 
void set_tcp_port (int)
 Set TCP port.
 
virtual bool quit ()
 Return whether the agentX should quit.
 
virtual void reinit ()
 (Re)initialize the AgentX protocol stack.
 
virtual int send_agentx (int, const AgentXPdu &)
 Send an AgentX PDU.
 
virtual int receive_agentx (int, AgentXPdu &)
 Receive an AgentX PDU.
 
virtual ListCursor< AgentXPeerpeers ()
 Get a cursor on the peer list.
 
virtual AgentXPeerremove_peer (const AgentXPeer &)
 Remove a peer rom the peer list.
 
int get_unix_socket ()
 Get the AgentX socket.
 
int get_tcp_socket ()
 Get the AgentX socket.
 
int set_file_descriptors (fd_set *)
 
bool check_peer_closed (fd_set *)
 
void lock_socket ()
 
void unlock_socket ()
 
void lock_queue ()
 
void unlock_queue ()
 
void lock_peers ()
 
void unlock_peers ()
 
AgentXQueueget_queue ()
 
void close_session (const AgentXSession &, u_int, u_char)
 Close a session.
 
void ping_session (const AgentXSession &, u_int)
 Ping a session.
 

Protected Member Functions

virtual int accept_unix ()
 Accept a new connection on the unix port and return the socket descriptor.
 
virtual bool validate_address (const NS_SNMP OctetStr &) const
 Validate the supplied source address against the addresses in the agentppAgentXExtSrcAddrTable.
 

Protected Attributes

int timeout
 
- Protected Attributes inherited from AgentX
int axTCPSocket
 
int axTCPPort
 
int axSocket
 
NS_SNMP OctetStr axUnixSocketLocation
 
AgentXQueue axQueue
 
List< AgentXPeeraxPeers
 
Synchronized axPeersLock
 
Synchronized axSocketLock
 
int connectMode
 

Additional Inherited Members

- Static Public Member Functions inherited from AgentX
static time_t compute_timeout (u_int, u_int=0)
 Compute the timeout (timestamp when a PDU/request times out)
 
- Public Attributes inherited from AgentX
bool stopit
 

Constructor & Destructor Documentation

AgentXMaster::AgentXMaster ( )
virtual AgentXMaster::~AgentXMaster ( )
virtual

Member Function Documentation

virtual int AgentXMaster::accept_unix ( )
protectedvirtual

Accept a new connection on the unix port and return the socket descriptor.

Returns
a socket descriptor on success and a value < 0 on failure.
virtual bool AgentXMaster::bind_tcp ( )
virtual

Bind TCP socket.

Returns
TRUE if the socket could be bound successfully.

Implements AgentX.

virtual bool AgentXMaster::bind_unix ( )
virtual

Bind unix domain socket.

Returns
TRUE if the socket could be bound successfully.

Implements AgentX.

virtual void AgentXMaster::connect_request ( fd_set *  ,
int *   
)
virtual

Process a subagent's connect request.

Parameters
fileDescrSeta file descriptor set.
apointer to a pending descriptors counter.
virtual bool AgentXMaster::is_response ( const AgentXPdu ,
const AgentXPdu  
)
virtual

Check whether two PDUs are a request/response pair.

Parameters
requestthe "request" PDU.
responsethe "response" PDU.
Returns
TRUE if response is a response to request, FALSE otherwise.

Implements AgentX.

void AgentXMaster::set_timeout ( int  t)
inline

Set the connection timeout.

Parameters
timeoutthe new connection timeout.
virtual bool AgentXMaster::validate_address ( const NS_SNMP OctetStr &  ) const
protectedvirtual

Validate the supplied source address against the addresses in the agentppAgentXExtSrcAddrTable.

Returns
TRUE if the source address is valid, FALSE otherwise.

Member Data Documentation

int AgentXMaster::timeout
protected

The documentation for this class was generated from the following file: