XrlCmdMap* _cmds | _cmds |
[protected]
XrlSocketServerTargetBase (XrlCmdMap* cmds = 0)
| XrlSocketServerTargetBase |
Constructor.
Parameters:
cmds | an 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:
cmds | pointer 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:
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:
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_class | the target class name. |
target_instance | the 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_class | the target class name. |
target_instance | the 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:
creator | the Xrl Target instance name of the socket creator. The named target must implement socket4_user/0.1. |
local_addr | the interface address to bind socket to. |
local_port | the port to bind socket to. |
is_blocking | if true then the socket will be blocking, otherwise non-blocking. |
sockid | return 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:
creator | the Xrl Target instance name of the socket creator. The named target must implement socket4_user/0.1. |
local_addr | the interface address to bind socket to. |
local_port | the port to bind socket to. |
is_blocking | if true then the socket will be blocking, otherwise non-blocking. |
sockid | return 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:
creator | the Xrl Target instance name of the socket creator. The named target must implement socket4_user/0.1. |
local_addr | the interface address to bind socket to. |
local_port | the port to bind socket to. |
mcast_addr | the multicast group address to join. |
ttl | the ttl to use for this multicast socket. |
reuse | allow other sockets to bind to same multicast group. |
is_blocking | if true then the socket will be blocking, otherwise non-blocking. |
sockid | return 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:
creator | the Xrl Target instance name of the socket creator. The named target must implement socket4_user/0.1. |
local_addr | the interface address to bind socket to. |
local_port | the port to bind socket to. |
remote_addr | the address to connect to. |
remote_port | the remote port to connect to. |
is_blocking | if true then the socket will be blocking, otherwise non-blocking. |
sockid | return 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:
creator | the Xrl Target instance name of the socket creator. The named target must implement socket4_user/0.1. |
local_addr | the interface address to bind socket to. |
local_port | the port to bind socket to. |
remote_addr | the address to connect to. |
remote_port | the remote port to connect to. |
is_blocking | if true then the socket will be blocking, otherwise non-blocking. |
sockid | return 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:
sockid | unique socket id. |
mcast_addr | group to join. |
join_if_addr | interface 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:
sockid | unique socket id. |
mcast_addr | group to leave. |
leave_if_addr | interface 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:
sockid | unique 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:
sockid | the unique socket id of the socket to perform listen. |
backlog | the 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:
sockid | unique socket id. |
data | block 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:
sockid | unique socket id. |
data | block of data to be sent. |
out_of_band | mark data as out of band. |
end_of_record | data completes record. |
end_of_file | data 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:
sockid | unique socket id. |
remote_addr | destination address for data. |
remote_port | destination port for data. |
data | block 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:
sockid | unique socket id. |
remote_addr | destination address for data. |
remote_port | destination port for data. |
data | block of data to be sent. |
out_of_band | mark data as out of band. |
end_of_record | data completes record. |
end_of_file | data 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:
sockid | unique socket id. |
group_addr | destination address for data. |
group_port | destination port for data. |
ifaddr | interface 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:
sockid | unique socket id. |
optname | name of option to be set. Valid values are: "multicast_loopback" "multicast_ttl" |
optval | value 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:
sockid | unique socket id. |
optname | name of option to be set. Valid values are documented in set_socket_option. |
optval | value 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:
creator | the Xrl Target instance name of the socket creator. The named target must implement socket6_user/0.1. |
local_addr | the interface address to bind socket to. |
local_port | the port to bind socket to. |
is_blocking | if true then the socket will be blocking, otherwise non-blocking. |
sockid | return 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:
creator | the Xrl Target instance name of the socket creator. The named target must implement socket6_user/0.1. |
local_addr | the interface address to bind socket to. |
local_port | the port to bind socket to. |
is_blocking | if true then the socket will be blocking, otherwise non-blocking. |
sockid | return 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:
creator | the Xrl Target instance name of the socket creator. The named target must implement socket6_user/0.1. |
local_addr | the interface address to bind socket to. |
local_port | the port to bind socket to. |
mcast_addr | the multicast group address to join. |
ttl | the ttl to use for this multicast socket. |
reuse | allow other sockets to bind to same multicast group. |
is_blocking | if true then the socket will be blocking, otherwise non-blocking. |
sockid | return 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:
creator | the Xrl Target instance name of the socket creator. The named target must implement socket6_user/0.1. |
local_addr | the interface address to bind socket to. |
local_port | the port to bind socket to. |
remote_addr | the address to connect to. |
remote_port | the remote port to connect to. |
is_blocking | if true then the socket will be blocking, otherwise non-blocking. |
sockid | return 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:
creator | the Xrl Target instance name of the socket creator. The named target must implement socket6_user/0.1. |
local_addr | the interface address to bind socket to. |
local_port | the port to bind socket to. |
remote_addr | the address to connect to. |
remote_port | the remote port to connect to. |
is_blocking | if true then the socket will be blocking, otherwise non-blocking. |
sockid | return 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:
sockid | unique socket id. |
mcast_addr | group to join. |
join_if_addr | interface 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:
sockid | unique socket id. |
mcast_addr | group to leave. |
leave_if_addr | interface 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:
sockid | unique 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:
sockid | the unique socket id of the socket to perform listen. |
backlog | the 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:
sockid | unique socket id. |
data | block 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:
sockid | unique socket id. |
data | block of data to be sent. |
out_of_band | mark data as out of band. |
end_of_record | data completes record. |
end_of_file | data 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:
sockid | unique socket id. |
remote_addr | destination address for data. |
remote_port | destination port for data. |
data | block 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:
sockid | unique socket id. |
remote_addr | destination address for data. |
remote_port | destination port for data. |
data | block of data to be sent. |
out_of_band | mark data as out of band. |
end_of_record | data completes record. |
end_of_file | data 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:
sockid | unique socket id. |
group_addr | destination address for data. |
group_port | destination port for data. |
ifaddr | interface 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:
sockid | unique socket id. |
optname | name of option to be set. Valid values are: "multicast_loopback" "multicast_hops" |
optval | value 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:
sockid | unique socket id. |
optname | name of option to be set. Valid values are documented in set_socket_option. |
optval | value of option to be set. If value is logically boolean then zero represents false and any non-zero value true. |