|
|
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]
bool send (const string& interface, const string& vif,
A dst, A src,
uint8_t* data, uint32_t len)
| send |
[pure virtual]
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]
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:
cb | the 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:
cb | the 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:
cb | the callback to register. |
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 metric,
bool equal,
bool discard, const PolicyTags& policytags)
| add_route |
[pure virtual]
Add route
Parameters:
net | network |
metric | to network |
equal | true if this in another route to the same destination. |
discard | true if this is a discard route. |
policytags | policy info to the RIB. |
bool replace_route (IPNet<A> net,
A nexthop,
uint32_t metric,
bool equal,
bool discard, const PolicyTags& policytags)
| replace_route |
[pure virtual]
Replace route
Parameters:
net | network |
metric | to network |
equal | true if this in another route to the same destination. |
discard | true if this is a discard route. |
policytags | policy info to the RIB. |
bool delete_route (IPNet<A> net)
| delete_route |
[pure virtual]
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]