XrlPortIO< A > Class Template Reference

Inheritance diagram for XrlPortIO< A >:
PortIOBase< A > ServiceBase CallbackSafeObject BugCatcher NONCOPYABLE

List of all members.

Public Types

typedef A Addr
typedef PortIOUserBase< A > PortIOUser

Public Member Functions

 XrlPortIO (XrlRouter &xr, PortIOUser &port, const string &ifname, const string &vifname, const Addr &addr)
int startup ()
int shutdown ()
bool send (const Addr &dst_addr, uint16_t dst_port, const vector< uint8_t > &rip_packet)
 Send packet.
bool pending () const
 Return true if awaiting send() completion, false otherwise.
const string & socket_server () const
 Get name of socket server used to instantiate socket.
const string & socket_id () const

Protected Attributes

string _ss
string _sid
bool _pending

Private Member Functions

bool startup_socket ()
bool request_open_bind_socket ()
void open_bind_socket_cb (const XrlError &xe, const string *psid)
bool request_ttl ()
void ttl_cb (const XrlError &xe)
bool request_no_loop ()
void no_loop_cb (const XrlError &xe)
bool request_socket_join ()
void socket_join_cb (const XrlError &xe)
bool request_socket_leave ()
void socket_leave_cb (const XrlError &xe)
void send_cb (const XrlError &xe)

template<typename A>
class XrlPortIO< A >

Member Function Documentation

template<typename A >
bool XrlPortIO< A >::send ( const Addr &  dst_addr,
uint16_t  dst_port,
const vector< uint8_t > &  rip_packet 
) [virtual]

Send packet.

Status of instance must be running. When packet is sent, the pending() method will return true until the Xrl sending the packet has completed.

dst_addraddress to send packet.
dst_portport to send packet to.
rip_packetvector containing rip packet to be sent.
false on immediately detectable failure, true otherwise.

Implements PortIOBase< A >.

template<typename A >
int XrlPortIO< A >::shutdown ( ) [virtual]


Sends request to close socket and transitions into SERVICE_SHUTTING_DOWN state. When socket is closed transition to SERVICE_SHUTDOWN occurs.

XORP_OK on success, otherwise XORP_ERROR.

Implements ServiceBase.

template<typename A >
int XrlPortIO< A >::startup ( ) [virtual]


Sends request to FEA for socket server for address and then attempts to instantiate socket with socket server. If both operations are successful, instance status transitions to SERVICE_RUNNING. Otherwise, it transitions to failed.

XORP_OK on success, otherwise XORP_ERROR.

Implements ServiceBase.

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