class XrlSocketServerTargetBase


 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Protected Methods

Protected Members


Detailed Description

XrlCmdMap* _cmds

_cmds

[protected]

 XrlSocketServerTargetBase (XrlCmdMap* cmds = 0)

XrlSocketServerTargetBase

Constructor.

Parameters:

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

~XrlSocketServerTargetBase

[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.

inline const string&  name ()

name

[const]

Get Xrl instance name associated with command map.

inline 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  finder_event_observer_0_1_xrl_target_birth ( const string& target_class, const string& target_instance)

finder_event_observer_0_1_xrl_target_birth

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Announce target birth to observer.

Parameters:

target_classthe target class name.
target_instancethe target instance name.
XrlCmdError  finder_event_observer_0_1_xrl_target_death ( const string& target_class, const string& target_instance)

finder_event_observer_0_1_xrl_target_death

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Announce target death to observer.

Parameters:

target_classthe target class name.
target_instancethe target instance name.
XrlCmdError  socket4_0_1_tcp_open_and_bind ( const string& creator, const IPv4& local_addr, const uint32_t& local_port, const bool& is_blocking, string& sockid)

socket4_0_1_tcp_open_and_bind

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Create a bound TCP socket.

Parameters:

creatorthe Xrl Target instance name of the socket creator. The named target must implement socket4_user/0.1.
local_addrthe interface address to bind socket to.
local_portthe port to bind socket to.
is_blockingif true then the socket will be blocking, otherwise non-blocking.
sockidreturn parameter that contains unique socket id when socket instantiation is successful.
XrlCmdError  socket4_0_1_udp_open_and_bind ( const string& creator, const IPv4& local_addr, const uint32_t& local_port, const bool& is_blocking, string& sockid)

socket4_0_1_udp_open_and_bind

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Create a bound UDP socket.

Parameters:

creatorthe Xrl Target instance name of the socket creator. The named target must implement socket4_user/0.1.
local_addrthe interface address to bind socket to.
local_portthe port to bind socket to.
is_blockingif true then the socket will be blocking, otherwise non-blocking.
sockidreturn parameter that contains unique socket id when socket instantiation is successful.
XrlCmdError  socket4_0_1_udp_open_bind_join ( const string& creator, const IPv4& local_addr, const uint32_t& local_port, const IPv4& mcast_addr, const uint32_t& ttl, const bool& reuse, const bool& is_blocking, string& sockid)

socket4_0_1_udp_open_bind_join

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Create a bound UDP multicast socket.

Parameters:

creatorthe Xrl Target instance name of the socket creator. The named target must implement socket4_user/0.1.
local_addrthe interface address to bind socket to.
local_portthe port to bind socket to.
mcast_addrthe multicast group address to join.
ttlthe ttl to use for this multicast socket.
reuseallow other sockets to bind to same multicast group.
is_blockingif true then the socket will be blocking, otherwise non-blocking.
sockidreturn parameter that contains unique socket id when socket instantiation is successful.
XrlCmdError  socket4_0_1_tcp_open_bind_connect ( const string& creator, const IPv4& local_addr, const uint32_t& local_port, const IPv4& remote_addr, const uint32_t& remote_port, const bool& is_blocking, string& sockid)

socket4_0_1_tcp_open_bind_connect

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Create a bound and connected TCP socket.

Parameters:

creatorthe Xrl Target instance name of the socket creator. The named target must implement socket4_user/0.1.
local_addrthe interface address to bind socket to.
local_portthe port to bind socket to.
remote_addrthe address to connect to.
remote_portthe remote port to connect to.
is_blockingif true then the socket will be blocking, otherwise non-blocking.
sockidreturn parameter that contains unique socket id when socket instantiation is successful.
XrlCmdError  socket4_0_1_udp_open_bind_connect ( const string& creator, const IPv4& local_addr, const uint32_t& local_port, const IPv4& remote_addr, const uint32_t& remote_port, const bool& is_blocking, string& sockid)

socket4_0_1_udp_open_bind_connect

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Create a bound and connected UDP socket.

Parameters:

creatorthe Xrl Target instance name of the socket creator. The named target must implement socket4_user/0.1.
local_addrthe interface address to bind socket to.
local_portthe port to bind socket to.
remote_addrthe address to connect to.
remote_portthe remote port to connect to.
is_blockingif true then the socket will be blocking, otherwise non-blocking.
sockidreturn parameter that contains unique socket id when socket instantiation is successful.
XrlCmdError  socket4_0_1_udp_join_group ( const string& sockid, const IPv4& mcast_addr, const IPv4& join_if_addr)

socket4_0_1_udp_join_group

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Join multicast group on already bound socket.

Parameters:

sockidunique socket id.
mcast_addrgroup to join.
join_if_addrinterface address to perform join on.
XrlCmdError  socket4_0_1_udp_leave_group ( const string& sockid, const IPv4& mcast_addr, const IPv4& leave_if_addr)

socket4_0_1_udp_leave_group

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Leave multicast group on already bound socket.

Parameters:

sockidunique socket id.
mcast_addrgroup to leave.
leave_if_addrinterface address to perform leave on.
XrlCmdError  socket4_0_1_close ( const string& sockid)

socket4_0_1_close

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Close socket.

Parameters:

sockidunique socket id of socket to be closed.
XrlCmdError  socket4_0_1_tcp_listen ( const string& sockid, const uint32_t& backlog)

socket4_0_1_tcp_listen

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Listen for inbound connections on socket. When a connection request received the socket creator will receive notification through socket4_user/0.1/connect_event.

Parameters:

sockidthe unique socket id of the socket to perform listen.
backlogthe maximum number of pending connections.
XrlCmdError  socket4_0_1_send ( const string& sockid, const vector<uint8_t>& data)

socket4_0_1_send

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Send data on socket.

Parameters:

sockidunique socket id.
datablock of data to be sent.
XrlCmdError  socket4_0_1_send_with_flags ( const string& sockid, const vector<uint8_t>& data, const bool& out_of_band, const bool& end_of_record, const bool& end_of_file)

socket4_0_1_send_with_flags

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Send data on socket with optional flags. These flags provide hints to the forwarding engine on how to send the packets, they are not guaranteed to work. NB: There is no flag for "do not route" as this is always true since the particular forwarding engine sending the data may not have access to the full routing table.

Parameters:

sockidunique socket id.
datablock of data to be sent.
out_of_bandmark data as out of band.
end_of_recorddata completes record.
end_of_filedata completes file.
XrlCmdError  socket4_0_1_send_to ( const string& sockid, const IPv4& remote_addr, const uint32_t& remote_port, const vector<uint8_t>& data)

socket4_0_1_send_to

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Send data on socket to a given destination. The packet is not routed as the forwarding engine sending the packet may not have access to the full routing table.

Parameters:

sockidunique socket id.
remote_addrdestination address for data.
remote_portdestination port for data.
datablock of data to be sent.
XrlCmdError  socket4_0_1_send_to_with_flags ( const string& sockid, const IPv4& remote_addr, const uint32_t& remote_port, const vector<uint8_t>& data, const bool& out_of_band, const bool& end_of_record, const bool& end_of_file)

socket4_0_1_send_to_with_flags

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Send data on socket to a given destination. The packet is not routed as the forwarding engine sending the packet may not have access to the full routing table.

Parameters:

sockidunique socket id.
remote_addrdestination address for data.
remote_portdestination port for data.
datablock of data to be sent.
out_of_bandmark data as out of band.
end_of_recorddata completes record.
end_of_filedata completes file.
XrlCmdError  socket4_0_1_send_from_multicast_if ( const string& sockid, const IPv4& group_addr, const uint32_t& group_port, const IPv4& ifaddr, const vector<uint8_t>& data)

socket4_0_1_send_from_multicast_if

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Send data on socket to a given multicast group from a given interface.

Parameters:

sockidunique socket id.
group_addrdestination address for data.
group_portdestination port for data.
ifaddrinterface address
XrlCmdError  socket4_0_1_set_socket_option ( const string& sockid, const string& optname, const uint32_t& optval)

socket4_0_1_set_socket_option

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Set a named socket option.

Parameters:

sockidunique socket id.
optnamename of option to be set. Valid values are: "multicast_loopback" "multicast_ttl"
optvalvalue of option to be set. If value is logically boolean then zero represents false and any non-zero value true.
XrlCmdError  socket4_0_1_get_socket_option ( const string& sockid, const string& optname, uint32_t& optval)

socket4_0_1_get_socket_option

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Get a named socket option.

Parameters:

sockidunique socket id.
optnamename of option to be set. Valid values are documented in set_socket_option.
optvalvalue of option to be set. If value is logically boolean then zero represents false and any non-zero value true.
XrlCmdError  socket6_0_1_tcp_open_and_bind ( const string& creator, const IPv6& local_addr, const uint32_t& local_port, const bool& is_blocking, string& sockid)

socket6_0_1_tcp_open_and_bind

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Create a bound TCP socket.

Parameters:

creatorthe Xrl Target instance name of the socket creator. The named target must implement socket6_user/0.1.
local_addrthe interface address to bind socket to.
local_portthe port to bind socket to.
is_blockingif true then the socket will be blocking, otherwise non-blocking.
sockidreturn parameter that contains unique socket id when socket instantiation is successful.
XrlCmdError  socket6_0_1_udp_open_and_bind ( const string& creator, const IPv6& local_addr, const uint32_t& local_port, const bool& is_blocking, string& sockid)

socket6_0_1_udp_open_and_bind

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Create a bound UDP socket.

Parameters:

creatorthe Xrl Target instance name of the socket creator. The named target must implement socket6_user/0.1.
local_addrthe interface address to bind socket to.
local_portthe port to bind socket to.
is_blockingif true then the socket will be blocking, otherwise non-blocking.
sockidreturn parameter that contains unique socket id when socket instantiation is successful.
XrlCmdError  socket6_0_1_udp_open_bind_join ( const string& creator, const IPv6& local_addr, const uint32_t& local_port, const IPv6& mcast_addr, const uint32_t& ttl, const bool& reuse, const bool& is_blocking, string& sockid)

socket6_0_1_udp_open_bind_join

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Create a bound UDP multicast socket.

Parameters:

creatorthe Xrl Target instance name of the socket creator. The named target must implement socket6_user/0.1.
local_addrthe interface address to bind socket to.
local_portthe port to bind socket to.
mcast_addrthe multicast group address to join.
ttlthe ttl to use for this multicast socket.
reuseallow other sockets to bind to same multicast group.
is_blockingif true then the socket will be blocking, otherwise non-blocking.
sockidreturn parameter that contains unique socket id when socket instantiation is successful.
XrlCmdError  socket6_0_1_tcp_open_bind_connect ( const string& creator, const IPv6& local_addr, const uint32_t& local_port, const IPv6& remote_addr, const uint32_t& remote_port, const bool& is_blocking, string& sockid)

socket6_0_1_tcp_open_bind_connect

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Create a bound and connected TCP socket.

Parameters:

creatorthe Xrl Target instance name of the socket creator. The named target must implement socket6_user/0.1.
local_addrthe interface address to bind socket to.
local_portthe port to bind socket to.
remote_addrthe address to connect to.
remote_portthe remote port to connect to.
is_blockingif true then the socket will be blocking, otherwise non-blocking.
sockidreturn parameter that contains unique socket id when socket instantiation is successful.
XrlCmdError  socket6_0_1_udp_open_bind_connect ( const string& creator, const IPv6& local_addr, const uint32_t& local_port, const IPv6& remote_addr, const uint32_t& remote_port, const bool& is_blocking, string& sockid)

socket6_0_1_udp_open_bind_connect

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Create a bound and connected UDP socket.

Parameters:

creatorthe Xrl Target instance name of the socket creator. The named target must implement socket6_user/0.1.
local_addrthe interface address to bind socket to.
local_portthe port to bind socket to.
remote_addrthe address to connect to.
remote_portthe remote port to connect to.
is_blockingif true then the socket will be blocking, otherwise non-blocking.
sockidreturn parameter that contains unique socket id when socket instantiation is successful.
XrlCmdError  socket6_0_1_udp_join_group ( const string& sockid, const IPv6& mcast_addr, const IPv6& join_if_addr)

socket6_0_1_udp_join_group

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Join multicast group on already bound socket.

Parameters:

sockidunique socket id.
mcast_addrgroup to join.
join_if_addrinterface address to perform join on.
XrlCmdError  socket6_0_1_udp_leave_group ( const string& sockid, const IPv6& mcast_addr, const IPv6& leave_if_addr)

socket6_0_1_udp_leave_group

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Leave multicast group on already bound socket.

Parameters:

sockidunique socket id.
mcast_addrgroup to leave.
leave_if_addrinterface address to perform leave on.
XrlCmdError  socket6_0_1_close ( const string& sockid)

socket6_0_1_close

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Close socket.

Parameters:

sockidunique socket id of socket to be closed.
XrlCmdError  socket6_0_1_tcp_listen ( const string& sockid, const uint32_t& backlog)

socket6_0_1_tcp_listen

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Listen for inbound connections on socket. When a connection request received the socket creator will receive notification through socket6_user/0.1/connect_event.

Parameters:

sockidthe unique socket id of the socket to perform listen.
backlogthe maximum number of pending connections.
XrlCmdError  socket6_0_1_send ( const string& sockid, const vector<uint8_t>& data)

socket6_0_1_send

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Send data on socket.

Parameters:

sockidunique socket id.
datablock of data to be sent.
XrlCmdError  socket6_0_1_send_with_flags ( const string& sockid, const vector<uint8_t>& data, const bool& out_of_band, const bool& end_of_record, const bool& end_of_file)

socket6_0_1_send_with_flags

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Send data on socket with optional flags. These flags provide hints to the forwarding engine on how to send the packets, they are not guaranteed to work. NB: There is no flag for "do not route" as this is always true since the particular forwarding engine sending the data may not have access to the full routing table.

Parameters:

sockidunique socket id.
datablock of data to be sent.
out_of_bandmark data as out of band.
end_of_recorddata completes record.
end_of_filedata completes file.
XrlCmdError  socket6_0_1_send_to ( const string& sockid, const IPv6& remote_addr, const uint32_t& remote_port, const vector<uint8_t>& data)

socket6_0_1_send_to

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Send data on socket to a given destination. The packet is not routed as the forwarding engine sending the packet may not have access to the full routing table.

Parameters:

sockidunique socket id.
remote_addrdestination address for data.
remote_portdestination port for data.
datablock of data to be sent.
XrlCmdError  socket6_0_1_send_to_with_flags ( const string& sockid, const IPv6& remote_addr, const uint32_t& remote_port, const vector<uint8_t>& data, const bool& out_of_band, const bool& end_of_record, const bool& end_of_file)

socket6_0_1_send_to_with_flags

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Send data on socket to a given destination. The packet is not routed as the forwarding engine sending the packet may not have access to the full routing table.

Parameters:

sockidunique socket id.
remote_addrdestination address for data.
remote_portdestination port for data.
datablock of data to be sent.
out_of_bandmark data as out of band.
end_of_recorddata completes record.
end_of_filedata completes file.
XrlCmdError  socket6_0_1_send_from_multicast_if ( const string& sockid, const IPv6& group_addr, const uint32_t& group_port, const IPv6& ifaddr, const vector<uint8_t>& data)

socket6_0_1_send_from_multicast_if

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Send data on socket to a given multicast group from a given interface.

Parameters:

sockidunique socket id.
group_addrdestination address for data.
group_portdestination port for data.
ifaddrinterface address
XrlCmdError  socket6_0_1_set_socket_option ( const string& sockid, const string& optname, const uint32_t& optval)

socket6_0_1_set_socket_option

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Set a named socket option.

Parameters:

sockidunique socket id.
optnamename of option to be set. Valid values are: "multicast_loopback" "multicast_hops"
optvalvalue of option to be set. If value is logically boolean then zero represents false and any non-zero value true.
XrlCmdError  socket6_0_1_get_socket_option ( const string& sockid, const string& optname, uint32_t& optval)

socket6_0_1_get_socket_option

[protected pure virtual]

Pure-virtual function that needs to be implemented to:

Get a named socket option.

Parameters:

sockidunique socket id.
optnamename of option to be set. Valid values are documented in set_socket_option.
optvalvalue of option to be set. If value is logically boolean then zero represents false and any non-zero value true.

Generated by: pavlin on possum.icir.org on Wed Mar 21 11:23:08 2007, using kdoc $.