typedef A Addr | Addr |
typedef PortIOUserBase<A> PortIOUser | PortIOUser |
XrlPortIO (XrlRouter& xr,
PortIOUser& port,
const string& ifname,
const string& vifname,
const Addr& addr)
| XrlPortIO |
int startup ()
| startup |
Startup. 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.
Returns: XORP_OK on success, otherwise XORP_ERROR.
Reimplemented from ServiceBase.
int shutdown ()
| shutdown |
Shutdown. Sends request to close socket and transitions into SERVICE_SHUTTING_DOWN state. When socket is closed transition to SERVICE_SHUTDOWN occurs.
Returns: XORP_OK on success, otherwise XORP_ERROR.
Reimplemented from ServiceBase.
bool send (const Addr& dst_addr,
uint16_t dst_port,
const vector<uint8_t>& rip_packet)
| send |
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.
Parameters:
dst_addr | address to send packet. |
dst_port | port to send packet to. |
rip_packet | vector containing rip packet to be sent. |
Returns: false on immediately detectable failure, true otherwise.
Reimplemented from PortIOBase.
bool pending ()
| pending |
[const]
Return true if awaiting send() completion, false otherwise.
Reimplemented from PortIOBase.
const string& socket_server ()
| socket_server |
[const]
Get name of socket server used to instantiate socket.
const string& socket_id ()
| socket_id |
[const]
XrlRouter& _xr | _xr |
[protected]
string _ss | _ss |
[protected]
string _sid | _sid |
[protected]
bool _pending | _pending |
[protected]