class IO

An abstract class that defines packet reception and transmission. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Protected Types

Protected Members


Detailed Description

An abstract class that defines packet reception and transmission. The details of how packets are received or transmitted are therefore hidden from the internals of the OSPF code.

 IO ()

IO

 ~IO ()

~IO

[virtual]

uint16_t  get_ip_protocol_number ()

get_ip_protocol_number

[const]

Get OSPF protocol number.

bool  send (const string& interface, const string& vif, A dst, A src, int ttl, uint8_t* data, uint32_t len)

send

[pure virtual]

Send Raw frames.

bool  set_ip_router_alert (bool alert)

set_ip_router_alert

Send router alerts in IP packets?

bool  get_ip_router_alert ()

get_ip_router_alert

[const]

Get router alert state.

typedef XorpCallback6<void, const string&, const string&, A, A, uint8_t*, uint32_t>::RefPtr ReceiveCallback

ReceiveCallback

void  register_receive (ReceiveCallback cb)

register_receive

Register for receiving raw frames.

bool  enable_interface_vif (const string& interface, const string& vif)

enable_interface_vif

[pure virtual]

Enable the interface/vif to receive frames.

bool  disable_interface_vif (const string& interface, const string& vif)

disable_interface_vif

[pure virtual]

Disable this interface/vif from receiving frames.

bool  is_interface_enabled (const string& interface)

is_interface_enabled

[const pure virtual]

Test whether this interface is enabled.

Returns: true if it exists and is enabled, otherwise false.

bool  is_vif_enabled (const string& interface, const string& vif)

is_vif_enabled

[const pure virtual]

Test whether this interface/vif is enabled.

Returns: true if it exists and is enabled, otherwise false.

bool  is_address_enabled (const string& interface, const string& vif, const A& address)

is_address_enabled

[const pure virtual]

Test whether this interface/vif/address is enabled.

Returns: true if it exists and is enabled, otherwise false.

typedef XorpCallback2<void, const string&, bool>::RefPtr InterfaceStatusCb

InterfaceStatusCb

typedef XorpCallback3<void, const string&, const string&, bool>::RefPtr VifStatusCb

VifStatusCb

typedef XorpCallback4<void, const string&, const string&, A, bool>::RefPtr AddressStatusCb

AddressStatusCb

void  register_interface_status (InterfaceStatusCb cb)

register_interface_status

Add a callback for tracking the interface status.

The callback will be invoked whenever the status of the interface is changed from disabled to enabled or vice-versa.

Parameters:

cbthe callback to register.
void  register_vif_status (VifStatusCb cb)

register_vif_status

Add a callback for tracking the interface/vif status.

The callback will be invoked whenever the status of the interface/vif is changed from disabled to enabled or vice-versa.

Parameters:

cbthe callback to register.
void  register_address_status (AddressStatusCb cb)

register_address_status

Add a callback for tracking the interface/vif/address status.

The callback will be invoked whenever the status of the tuple (interface, vif, address) is changed from disabled to enabled or vice-versa.

Parameters:

cbthe callback to register.
bool  get_addresses (const string& interface, const string& vif, list<A>& addresses)

get_addresses

[const pure virtual]

Get all addresses associated with this interface/vif.

Parameters:

interfacethe name of the interface
vifthe name of the vif
addresses(out argument) list of associated addresses

Returns: true if there are no errors.

bool  get_link_local_address (const string& interface, const string& vif, A& address)

get_link_local_address

[pure virtual]

Get a link local address for this interface/vif if available.

Parameters:

interfacethe name of the interface
vifthe name of the vif
address(out argument) set if address is found.

Returns: true if a link local address is available.

bool  get_interface_id (const string& interface, uint32_t& interface_id)

get_interface_id

[pure virtual]

Returns: the interface id for this interface.

uint32_t  get_prefix_length (const string& interface, const string& vif, A address)

get_prefix_length

[pure virtual]

Returns: prefix length for this address.

uint32_t  get_mtu (const string& interface)

get_mtu

[pure virtual]

Returns: the mtu for this interface.

bool  join_multicast_group (const string& interface, const string& vif, A mcast)

join_multicast_group

[pure virtual]

On the interface/vif join this multicast group.

bool  leave_multicast_group (const string& interface, const string& vif, A mcast)

leave_multicast_group

[pure virtual]

On the interface/vif leave this multicast group.

bool  add_route (IPNet<A> net, A nexthop, uint32_t nexthop_id, uint32_t metric, bool equal, bool discard, const PolicyTags& policytags)

add_route

[pure virtual]

Add route

Parameters:

netnetwork
nexthop_idinterface ID towards the nexthop
metricto network
equaltrue if this in another route to the same destination.
discardtrue if this is a discard route.
policytagspolicy info to the RIB.
bool  replace_route (IPNet<A> net, A nexthop, uint32_t nexthop_id, uint32_t metric, bool equal, bool discard, const PolicyTags& policytags)

replace_route

[pure virtual]

Replace route

Parameters:

netnetwork
nexthop_idinterface ID towards the nexthop
metricto network
equaltrue if this in another route to the same destination.
discardtrue if this is a discard route.
policytagspolicy info to the RIB.
bool  delete_route (IPNet<A> net)

delete_route

[pure virtual]

Delete route

void  set_interface_mapping (uint32_t interface_id, const string& interface, const string& vif)

set_interface_mapping

Store a mapping of the OSPF internal interface ID to interface/vif. This will be required by when installing a route.

bool  get_interface_vif_by_interface_id (uint32_t interface_id, string& interface, string& vif)

get_interface_vif_by_interface_id

Given an OSPF internal interface ID return the interface/vif.

ReceiveCallback _receive_cb

_receive_cb

[protected]

InterfaceStatusCb _interface_status_cb

_interface_status_cb

[protected]

VifStatusCb _vif_status_cb

_vif_status_cb

[protected]

AddressStatusCb _address_status_cb

_address_status_cb

[protected]

bool _ip_router_alert

_ip_router_alert

[protected]

interface_vif (struct)

interface_vif

[protected]

map<uint32_t, interface_vif> _interface_vif

_interface_vif

[protected]


Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:11:07 2009, using kdoc 2.0a54+XORP.