class XrlTestSocket4TargetBase


 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Protected Methods

Protected Members


Detailed Description

XrlCmdMap* _cmds

_cmds

[protected]

 XrlTestSocket4TargetBase (XrlCmdMap* cmds = 0)

XrlTestSocket4TargetBase

Constructor.

Parameters:

cmdsan XrlCmdMap that the commands associated with the target should be added to. This is typically the XrlRouter associated with the target.
 ~XrlTestSocket4TargetBase ()

~XrlTestSocket4TargetBase

[virtual]

Destructor.

Dissociates instance commands from command map.

bool  set_command_map (XrlCmdMap* cmds)

set_command_map

Set command map.

Parameters:

cmdspointer to command map to associate commands with. This argument is typically a pointer to the XrlRouter associated with the target.

Returns: true on success, false if cmds is null or a command map has already been supplied.

const string&  name ()

name

[const]

Get Xrl instance name associated with command map.

const char*  version ()

version

[const]

Get version string of instance.

XrlCmdError  common_0_1_get_target_name ( string& name)

common_0_1_get_target_name

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Get name of Xrl Target

XrlCmdError  common_0_1_get_version ( string& version)

common_0_1_get_version

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Get version string from Xrl Target

XrlCmdError  common_0_1_get_status ( uint32_t& status, string& reason)

common_0_1_get_status

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Get status of Xrl Target

XrlCmdError  common_0_1_shutdown ()

common_0_1_shutdown

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Request clean shutdown of Xrl Target

XrlCmdError  socket4_user_0_1_recv_event ( const string& sockid, const string& if_name, const string& vif_name, const IPv4& src_host, const uint32_t& src_port, const vector<uint8_t>& data)

socket4_user_0_1_recv_event

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Method invoked by target implementing socket4/0.1 when a packet arrives from an IPv4 source.

Parameters:

sockidthe identifier associated with socket where the event occurred.
if_namethe interface name the packet arrived on, if known. If unknown, then it is an empty string.
vif_namethe vif name the packet arrived on, if known. If unknown, then it is an empty string.
src_hostthe originating host.
src_portthe originating IP port.
datathe data received.
XrlCmdError  socket4_user_0_1_inbound_connect_event ( const string& sockid, const IPv4& src_host, const uint32_t& src_port, const string& new_sockid, bool& accept)

socket4_user_0_1_inbound_connect_event

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Method invoked by target implementing socket4/0.1 when a connection request is received from an IPv4 source. It applies only to TCP sockets.

Parameters:

sockidthe identifier associated with socket where the event occurred.
src_hostthe connecting host.
src_portthe connecting IP port.
new_sockidthe identifier associated with the new socket that has been created to handle the new connection.
acceptif true, the connection request has been accepted, otherwise it has been rejected.
XrlCmdError  socket4_user_0_1_outgoing_connect_event ( const string& sockid)

socket4_user_0_1_outgoing_connect_event

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Method invoked by target implementing socket4/0.1 when an outgoing connection request originated by the local host is completed. It applies only to TCP sockets. Note that if the connection failed, the error_event will be dispatched instead.

Parameters:

sockidthe identifier associated with socket where the event occurred.
XrlCmdError  socket4_user_0_1_error_event ( const string& sockid, const string& error, const bool& fatal)

socket4_user_0_1_error_event

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Method invoked by target implementing socket4/0.1 when an error occurs.

Parameters:

sockidthe identifier associated with socket where the event occurred.
errora textual description of the error.
fatalindication of whether socket is shutdown because of error.
XrlCmdError  socket4_user_0_1_disconnect_event ( const string& sockid)

socket4_user_0_1_disconnect_event

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Method invoked by target implementing socket4/0.1 when the peer has closed the connection. It applies only to TCP sockets. Note that the socket itself is left open and must be explicitly closed.

Parameters:

sockidthe identifier associated with socket where the event occurred.

Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:10:51 2009, using kdoc 2.0a54+XORP.