|
|
Base class for RIP Port I/O classes.
RIP Port I/O classes provide support for reading and writing to RIP Ports.
typedef A Addr | Addr |
typedef PortIOUserBase<A> PortIOUser | PortIOUser |
PortIOBase (PortIOUser& user,
const string& ifname,
const string& vifname,
const Addr& address)
| PortIOBase |
Constructor associating a Port I/O User object with I/O object.
~PortIOBase ()
| ~PortIOBase |
[virtual]
bool send (const Addr& dst_addr,
uint16_t dst_port,
const uint8_t* rip_packet,
size_t rip_packet_bytes)
| send |
[pure virtual]
Send RIP packet to Port.
The invoker of this method is expected to be the associated Port I/O User instance. The invoker is responsible for the packet data in the send request and should not decommission the data until it receives the PortIOUserBase<A>::send_completion callback. If the request to send fails immediately the send_completion callback is not called for the associated data.
Parameters:
dst_addr | address to send packet. |
dst_port | port to send packet to. |
rip_packet | pointer to rip packet. |
rip_packet_bytes | size of packet to write. |
Returns: false on immediately detectable failure, true otherwise.
bool pending ()
| pending |
[const pure virtual]
Check if send request is pending.
Returns: true if a send request is pending, false otherwise.
inline const string& ifname ()
| ifname |
[const]
Get Interface name associated with I/O.
inline const string& vifname ()
| vifname |
[const]
Get Virtual Interface name associated with I/O.
inline const Addr& address ()
| address |
[const]
Get associated address.
inline size_t max_route_entries_per_packet ()
| max_route_entries_per_packet |
[const]
Get the maximum number of route entries in a packet.
inline bool set_max_route_entries_per_packet (size_t max_entries)
| set_max_route_entries_per_packet |
Set the maximum number of route entries in a packet.
Returns: true on success, false if route entries per packet is fixed.
inline bool enabled ()
| enabled |
[const]
Get enabled status of I/O system.
inline void set_enabled (bool en)
| set_enabled |
Set enabled status of I/O system. The user object associated with the I/O system will be notified through PortIOBase<A>::port_io_enable_change() if the enabled state changes.
Parameters:
en | new enable state. |
PortIOUser& _user | _user |
[protected]
string _ifname | _ifname |
[protected]
string _vifname | _vifname |
[protected]
Addr _addr | _addr |
[protected]
size_t _max_rte_pp | _max_rte_pp |
[protected]
bool _en | _en |
[protected]
template <typename A>
PortIOBase (PortIOUser& user,
const string& ifname,
const string& vifname,
const Addr& addr)
| PortIOBase |
[protected]
template <typename A>
~PortIOBase ()
| ~PortIOBase |
[protected]
template <>
inline bool
set_max_route_entries_per_packet (size_t)
| set_max_route_entries_per_packet |
[protected]
template <>
inline bool
set_max_route_entries_per_packet (size_t max_entries)
| set_max_route_entries_per_packet |
[protected]
template <typename A>
inline void
set_enabled (bool en)
| set_enabled |
[protected]
Generated by: pavlin on possum.icir.org on Thu Aug 28 12:52:20 2003, using kdoc 2.0a54+XORP. |