class PortIOBase

Base class for RIP Port I/O classes. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Protected Methods

Protected Members


Detailed Description

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, bool enabled = true)

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 vector<uint8_t>& rip_packet)

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_addraddress to send packet.
dst_portport to send packet to.
rip_packetvector containing rip packet to be sent.

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_enabled_change() if the enabled state changes.

Parameters:

ennew 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, bool en)

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 Wed Aug 2 15:36:43 2006, using kdoc $.