Public Member Functions |
| | XrlIO (EventLoop &eventloop, XrlRouter &xrl_router, const string &feaname, const string &ribname) |
| | Construct an XrlIO instance.
|
|
| ~XrlIO () |
| | Destroy an XrlIO instance.
|
| int | startup () |
| | Startup operation.
|
| int | shutdown () |
| | Shutdown operation.
|
| void | component_up (string name) |
| | Called when internal subsystem comes up.
|
| void | component_down (string name) |
| | Called when internal subsystem goes down.
|
| void | receive (const string &sockid, const string &interface, const string &vif, const IPv4 &src, const uint16_t &sport, const vector< uint8_t > &payload) |
| | Receive UDP datagrams.
|
| bool | send (const string &interface, const string &vif, const IPv4 &src, const uint16_t &sport, const IPv4 &dst, const uint16_t &dport, uint8_t *data, const uint32_t &len) |
| | Send a UDP datagram on a specific link.
|
| bool | enable_interface_vif (const string &interface, const string &vif) |
| | Enable the interface/vif to receive frames.
|
| bool | disable_interface_vif (const string &interface, const string &vif) |
| | Disable this interface/vif from receiving frames.
|
| bool | enable_address (const string &interface, const string &vif, const IPv4 &address, const uint16_t &port, const IPv4 &all_nodes_address) |
| | Enable an IPv4 address and port for OLSR datagram reception and transmission.
|
| bool | disable_address (const string &interface, const string &vif, const IPv4 &address, const uint16_t &port) |
| | Disable an IPv4 address and port for OLSR datagram reception.
|
| bool | is_interface_enabled (const string &interface) const |
| | Test whether an interface is enabled.
|
| bool | is_vif_enabled (const string &interface, const string &vif) const |
| | Test whether an interface/vif is enabled.
|
| bool | is_vif_broadcast_capable (const string &interface, const string &vif) |
| | Test whether this interface/vif is broadcast capable.
|
| bool | is_vif_multicast_capable (const string &interface, const string &vif) |
| | Test whether this interface/vif is multicast capable.
|
|
bool | is_vif_loopback (const string &interface, const string &vif) |
| | Return true if the given vif is a loopback vif.
|
| bool | is_address_enabled (const string &interface, const string &vif, const IPv4 &address) const |
| | Test whether an interface/vif/address is enabled.
|
| bool | get_addresses (const string &interface, const string &vif, list< IPv4 > &addresses) const |
| | Get all addresses associated with this interface/vif.
|
| bool | get_broadcast_address (const string &interface, const string &vif, IPv4 &address) const |
| | Get the broadcast address associated with this vif.
|
| bool | get_broadcast_address (const string &interface, const string &vif, const IPv4 &address, IPv4 &bcast_address) const |
| | Get the broadcast address associated with this IPv4 address.
|
| bool | get_interface_id (const string &interface, uint32_t &interface_id) |
| | Get the interface ID.
|
| uint32_t | get_prefix_length (const string &interface, const string &vif, IPv4 address) |
| | Obtain the subnet prefix length for an interface/vif/address.
|
| uint32_t | get_mtu (const string &interface) |
| | Obtain the MTU for an interface.
|
|
void | register_rib () |
| | Register with the RIB.
|
|
void | unregister_rib () |
| | Remove registration from the RIB.
|
| void | rib_command_done (const XrlError &error, bool up, const char *comment) |
| | Callback method to: signal that an XRL command which has been sent to the RIB has returned.
|
| bool | add_route (IPv4Net net, IPv4 nexthop, uint32_t nexthop_id, uint32_t metric, const PolicyTags &policytags) |
| | Add route to RIB.
|
| bool | replace_route (IPv4Net net, IPv4 nexthop, uint32_t nexthop_id, uint32_t metric, const PolicyTags &policytags) |
| | Replace route in RIB.
|
| bool | delete_route (IPv4Net net) |
| | Delete route from RIB.
|
|
| XrlIO (EventLoop &eventloop, XrlRouter &xrl_router, const string &feaname, const string &ribname) |
| int | startup () |
| | Startup operation.
|
| int | shutdown () |
| | Shutdown operation.
|
|
void | component_up (string) |
| | Called when internal subsystem comes up.
|
|
void | component_down (string) |
| | Called when internal subsystem goes down.
|
|
void | recv (const string &interface, const string &vif, A src, A dst, uint8_t ip_protocol, int32_t ip_ttl, int32_t ip_tos, bool ip_router_alert, bool ip_internet_control, const vector< uint8_t > &payload) |
| | Receiver Raw frames.
|
|
bool | send (const string &interface, const string &vif, A dst, A src, int ttl, uint8_t *data, uint32_t len) |
| | Send Raw frames.
|
|
bool | enable_interface_vif (const string &interface, const string &vif) |
| | Enable the interface/vif to receive frames.
|
|
bool | disable_interface_vif (const string &interface, const string &vif) |
| | Disable this interface/vif from receiving frames.
|
| bool | is_interface_enabled (const string &interface) const |
| | Test whether an interface is enabled.
|
| bool | is_vif_enabled (const string &interface, const string &vif) const |
| | Test whether an interface/vif is enabled.
|
| bool | is_address_enabled (const string &interface, const string &vif, const A &address) const |
| | Test whether an interface/vif/address is enabled.
|
| bool | get_addresses (const string &interface, const string &vif, list< A > &addresses) const |
| | Get all addresses associated with this interface/vif.
|
| bool | get_link_local_address (const string &interface, const string &vif, A &address) |
| | Get a link local address for this interface/vif if available.
|
| bool | get_interface_id (const string &interface, uint32_t &interface_id) |
| | Get the interface ID.
|
| uint32_t | get_prefix_length (const string &interface, const string &vif, A address) |
| | Obtain the subnet prefix length for an interface/vif/address.
|
| uint32_t | get_mtu (const string &interface) |
| | Obtain the MTU for an interface.
|
|
bool | join_multicast_group (const string &interface, const string &vif, A mcast) |
| | On the interface/vif join this multicast group.
|
|
bool | leave_multicast_group (const string &interface, const string &vif, A mcast) |
| | On the interface/vif leave this multicast group.
|
|
void | register_rib () |
| | Register with the RIB.
|
|
void | unregister_rib () |
| | Remove registration from the RIB.
|
|
void | rib_command_done (const XrlError &error, bool up, const char *comment) |
| bool | add_route (IPNet< A > net, A nexthop, uint32_t nexthop_id, uint32_t metric, bool equal, bool discard, const PolicyTags &policytags) |
| | Add route to 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 in RIB.
|
|
bool | delete_route (IPNet< A > net) |
| | Delete route from RIB.
|
Private Member Functions |
| void | status_change (ServiceBase *service, ServiceStatus old_status, ServiceStatus new_status) |
| | A method invoked when the status of a service changes.
|
| const ServiceBase * | ifmgr_mirror_service_base () const |
| const IfMgrIfTree & | ifmgr_iftree () const |
|
void | tree_complete () |
| | An IfMgrHintObserver method invoked when the initial interface tree information has been received.
|
|
void | updates_made () |
| | An IfMgrHintObserver method invoked whenever the interface tree information has been changed.
|
| void | send_cb (const XrlError &xrl_error) |
| | Callback method to: signal that the XRL command to send a UDP datagram has returned.
|
| XrlPort * | find_port (const string &ifname, const string &vifname, const IPv4 &addr) |
| | Find OLSR port associated with interface, vif, address tuple.
|
| const XrlPort * | find_port (const string &ifname, const string &vifname, const IPv4 &addr) const |
| | Find OLSR port associated with interface, vif, address tuple.
|
| XrlPortList & | ports () |
| const XrlPortList & | ports () const |
|
void | try_start_next_port () |
| | Gradually start each XrlPort to avoid races with the FEA.
|
| void | status_change (ServiceBase *service, ServiceStatus old_status, ServiceStatus new_status) |
| | A method invoked when the status of a service changes.
|
| const ServiceBase * | ifmgr_mirror_service_base () const |
| | Obtain a pointer to the interface manager service base.
|
| const IfMgrIfTree & | ifmgr_iftree () const |
| | Obtain a reference to the interface manager's interface tree.
|
|
void | tree_complete () |
| | An IfMgrHintObserver method invoked when the initial interface tree information has been received.
|
|
void | updates_made () |
| | An IfMgrHintObserver method invoked whenever the interface tree information has been changed.
|
|
void | send_cb (const XrlError &xrl_error, string interface, string vif) |
|
void | enable_interface_vif_cb (const XrlError &xrl_error, string interface, string vif) |
|
void | disable_interface_vif_cb (const XrlError &xrl_error, string interface, string vif) |
|
void | join_multicast_group_cb (const XrlError &xrl_error, string interface, string vif) |
|
void | leave_multicast_group_cb (const XrlError &xrl_error, string interface, string vif) |
Private Attributes |
|
EventLoop & | _eventloop |
|
XrlRouter & | _xrl_router |
|
string | _feaname |
|
string | _ribname |
|
uint32_t | _component_count |
|
IfMgrXrlMirror | _ifmgr |
| | libfeaclient wrapper.
|
|
IfMgrIfTree | _iftree |
| | local copy of interface state obtained from libfeaclient.
|
|
XrlQueue | _rib_queue |
| | Queue of RIB add/delete XRL commands.
|
|
XrlPortList | _ports |
| | List of active XrlPorts.
|
|
XrlDeadPortMap | _dead_ports |
| | XrlPorts awaiting I/O shutdown.
|
|
XrlQueue< A > | _rib_queue |