xorp

XrlIoTcpUdpManager Class Reference

A class that is the bridge between the I/O TCP/UDP communications and the XORP XRL interface. More...

#include <xrl_io_tcpudp_manager.hh>

Inheritance diagram for XrlIoTcpUdpManager:
IoTcpUdpManagerReceiver

List of all members.

Public Member Functions

 XrlIoTcpUdpManager (IoTcpUdpManager &io_tcpudp_manager, XrlRouter &xrl_router)
 Constructor.
virtual ~XrlIoTcpUdpManager ()
 Destructor.
void recv_event (const string &receiver_name, const string &sockid, const string &if_name, const string &vif_name, const IPvX &src_host, uint16_t src_port, const vector< uint8_t > &data)
 Data received event.
void inbound_connect_event (const string &receiver_name, const string &sockid, const IPvX &src_host, uint16_t src_port, const string &new_sockid)
 Inbound connection request received event.
void outgoing_connect_event (int family, const string &receiver_name, const string &sockid)
 Outgoing connection request completed event.
void error_event (int family, const string &receiver_name, const string &sockid, const string &error, bool fatal)
 Error occured event.
void disconnect_event (int family, const string &receiver_name, const string &sockid)
 Connection closed by peer event.

Private Member Functions

XrlRouterxrl_router ()
void xrl_send_recv_event_cb (const XrlError &xrl_error, int family, string receiver_name)
 XRL callbacks.
void xrl_send_inbound_connect_event_cb (const XrlError &xrl_error, const bool *accept, int family, string sockid, string receiver_name)
void xrl_send_outgoing_connect_event_cb (const XrlError &xrl_error, int family, string receiver_name)
void xrl_send_error_event_cb (const XrlError &xrl_error, int family, string receiver_name)
void xrl_send_disconnect_event_cb (const XrlError &xrl_error, int family, string receiver_name)

Private Attributes

IoTcpUdpManager_io_tcpudp_manager
XrlRouter_xrl_router

Detailed Description

A class that is the bridge between the I/O TCP/UDP communications and the XORP XRL interface.


Member Function Documentation

void XrlIoTcpUdpManager::disconnect_event ( int  family,
const string &  receiver_name,
const string &  sockid 
) [virtual]

Connection closed by peer event.

It applies only to TCP sockets. This method is not called if the socket is gracefully closed through close().

Parameters:
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
receiver_namethe name of the receiver to send the event to.
sockidunique socket ID.

Implements IoTcpUdpManagerReceiver.

void XrlIoTcpUdpManager::error_event ( int  family,
const string &  receiver_name,
const string &  sockid,
const string &  error,
bool  fatal 
) [virtual]

Error occured event.

Parameters:
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
receiver_namethe name of the receiver to send the event to.
sockidunique socket ID.
errora textual description of the error.
fatalindication of whether socket is shutdown because of error.

Implements IoTcpUdpManagerReceiver.

void XrlIoTcpUdpManager::inbound_connect_event ( const string &  receiver_name,
const string &  sockid,
const IPvX src_host,
uint16_t  src_port,
const string &  new_sockid 
) [virtual]

Inbound connection request received event.

It applies only to TCP sockets.

Parameters:
receiver_namethe name of the receiver to send the event to.
sockidunique socket ID.
src_hostthe originating host IP address.
src_portthe originating host port number.
new_sockidthe new socket ID.

Implements IoTcpUdpManagerReceiver.

void XrlIoTcpUdpManager::outgoing_connect_event ( int  family,
const string &  receiver_name,
const string &  sockid 
) [virtual]

Outgoing connection request completed event.

It applies only to TCP sockets.

Parameters:
familythe address family (AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
receiver_namethe name of the receiver to send the event to.
sockidunique socket ID.

Implements IoTcpUdpManagerReceiver.

void XrlIoTcpUdpManager::recv_event ( const string &  receiver_name,
const string &  sockid,
const string &  if_name,
const string &  vif_name,
const IPvX src_host,
uint16_t  src_port,
const vector< uint8_t > &  data 
) [virtual]

Data received event.

Parameters:
receiver_namethe name of the receiver to send the data to.
sockidunique socket ID.
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 IP address.
src_portthe originating host port number.
datathe data received.

Implements IoTcpUdpManagerReceiver.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations