typedef A Addr | Addr |
typedef PortIOUserBase<A> PortIOUser | PortIOUser |
XrlPortIO (XrlRouter& xr,
PortIOUser& port,
const string& ifname,
const string& vifname,
const Addr& addr)
| XrlPortIO |
bool 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 RUNNING. Otherwise, it transitions to failed.
Returns: true on success, false on failure.
Reimplemented from ServiceBase.
bool shutdown ()
| shutdown |
Shutdown. Sends request to close socket and transitions into SHUTTING_DOWN state. When socket is closed transition to SHUTDOWN occurs.
Returns: true on success, false on failure.
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.
inline const string& socket_server ()
| socket_server |
[const]
Get name of socket server used to instantiate socket.
inline const string& socket_id ()
| socket_id |
[const]
XrlRouter& _xr | _xr |
[protected]
string _ss | _ss |
[protected]
string _sid | _sid |
[protected]
bool _pending | _pending |
[protected]