|
xorp
|
Forwarding Table Interface. More...
#include <fibconfig.hh>
Public Member Functions | |
| FibConfig (FeaNode &fea_node, const IfTree &system_config_iftree, const IfTree &merged_config_iftree) | |
| Constructor. | |
| virtual | ~FibConfig () |
| Virtual destructor (in case this class is used as a base class). | |
| EventLoop & | eventloop () |
| Get a reference to the EventLoop instance. | |
| NexthopPortMapper & | nexthop_port_mapper () |
| Get a reference to the NexthopPortMapper instance. | |
| const IfTree & | system_config_iftree () const |
| Get a reference to the system interface configuration. | |
| const IfTree & | merged_config_iftree () const |
| Get a reference to the merged system-user interface configuration. | |
| ProcessStatus | status (string &reason) const |
| Get the status code. | |
| int | start_transaction (uint32_t &tid, string &error_msg) |
| Start FIB-related transaction. | |
| int | commit_transaction (uint32_t tid, string &error_msg) |
| Commit FIB-related transaction. | |
| int | abort_transaction (uint32_t tid, string &error_msg) |
| Abort FIB-related transaction. | |
| int | add_transaction_operation (uint32_t tid, const TransactionManager::Operation &op, string &error_msg) |
| Add operation to FIB-related transaction. | |
| int | register_fibconfig_forwarding (FibConfigForwarding *fibconfig_forwarding, bool is_exclusive) |
| Register FibConfigForwarding plugin. | |
| int | unregister_fibconfig_forwarding (FibConfigForwarding *fibconfig_forwarding) |
| Unregister FibConfigForwarding plugin. | |
| int | register_fibconfig_entry_get (FibConfigEntryGet *fibconfig_entry_get, bool is_exclusive) |
| Register FibConfigEntryGet plugin. | |
| int | unregister_fibconfig_entry_get (FibConfigEntryGet *fibconfig_entry_get) |
| Unregister FibConfigEntryGet plugin. | |
| int | register_fibconfig_entry_set (FibConfigEntrySet *fibconfig_entry_set, bool is_exclusive) |
| Register FibConfigEntrySet plugin. | |
| int | unregister_fibconfig_entry_set (FibConfigEntrySet *fibconfig_entry_set) |
| Unregister FibConfigEntrySet plugin. | |
| int | register_fibconfig_entry_observer (FibConfigEntryObserver *fibconfig_entry_observer, bool is_exclusive) |
| Register FibConfigEntryObserver plugin. | |
| int | unregister_fibconfig_entry_observer (FibConfigEntryObserver *fibconfig_entry_observer) |
| Unregister FibConfigEntryObserver plugin. | |
| int | register_fibconfig_table_get (FibConfigTableGet *fibconfig_table_get, bool is_exclusive) |
| Register FibConfigTableGet plugin. | |
| int | unregister_fibconfig_table_get (FibConfigTableGet *fibconfig_table_get) |
| Unregister FibConfigTableGet plugin. | |
| int | register_fibconfig_table_set (FibConfigTableSet *fibconfig_table_set, bool is_exclusive) |
| Register FibConfigTableSet plugin. | |
| int | unregister_fibconfig_table_set (FibConfigTableSet *fibconfig_table_set) |
| Unregister FibConfigTableSet plugin. | |
| int | register_fibconfig_table_observer (FibConfigTableObserver *fibconfig_table_observer, bool is_exclusive) |
| Register FibConfigTableObserver plugin. | |
| int | unregister_fibconfig_table_observer (FibConfigTableObserver *fibconfig_table_observer) |
| Unregister FibConfigTableObserver plugin. | |
| int | start (string &error_msg) |
| Start operation. | |
| int | stop (string &error_msg) |
| Stop operation. | |
| int | start_configuration (string &error_msg) |
| Start a configuration interval. | |
| int | end_configuration (string &error_msg) |
| End of configuration interval. | |
| bool | unicast_forwarding_entries_retain_on_startup4 () const |
| Test whether the IPv4 unicast forwarding engine retains existing XORP forwarding entries on startup. | |
| bool | unicast_forwarding_entries_retain_on_shutdown4 () const |
| Test whether the IPv4 unicast forwarding engine retains existing XORP forwarding entries on shutdown. | |
| bool | unicast_forwarding_entries_retain_on_startup6 () const |
| Test whether the IPv6 unicast forwarding engine retains existing XORP forwarding entries on startup. | |
| bool | unicast_forwarding_entries_retain_on_shutdown6 () const |
| Test whether the IPv6 unicast forwarding engine retains existing XORP forwarding entries on shutdown. | |
| int | set_unicast_forwarding_entries_retain_on_startup4 (bool retain, string &error_msg) |
| Set the IPv4 unicast forwarding engine whether to retain existing XORP forwarding entries on startup. | |
| int | set_unicast_forwarding_entries_retain_on_shutdown4 (bool retain, string &error_msg) |
| Set the IPv4 unicast forwarding engine whether to retain existing XORP forwarding entries on shutdown. | |
| int | set_unicast_forwarding_entries_retain_on_startup6 (bool retain, string &error_msg) |
| Set the IPv6 unicast forwarding engine whether to retain existing XORP forwarding entries on startup. | |
| int | set_unicast_forwarding_entries_retain_on_shutdown6 (bool retain, string &error_msg) |
| Set the IPv6 unicast forwarding engine whether to retain existing XORP forwarding entries on shutdown. | |
| bool | unicast_forwarding_table_id_is_configured (int family) const |
| Test whether the unicast forwarding table ID for a given address family is configured. | |
| uint32_t | unicast_forwarding_table_id (int family) const |
| Get the unicast forwarding table ID for a given address family. | |
| bool | unicast_forwarding_table_id4_is_configured () const |
| Test whether the IPv4 unicast forwarding table ID is configured. | |
| uint32_t | unicast_forwarding_table_id4 () const |
| Get the IPv4 unicast forwarding table ID. | |
| bool | unicast_forwarding_table_id6_is_configured () const |
| Test whether the IPv6 unicast forwarding table ID is configured. | |
| uint32_t | unicast_forwarding_table_id6 () const |
| Get the IPv6 unicast forwarding table ID. | |
| uint32_t | get_netlink_filter_table_id () const |
| If IPv4 and IPv6 table ids are configured, and configured to the same thing, we can attempt to filter the netlink route messages on that table id. | |
| void | propagate_table_id_change () |
| int | set_unicast_forwarding_table_id4 (bool is_configured, uint32_t table_id, string &error_msg) |
| Set the IPv4 unicast forwarding table ID to be used. | |
| int | set_unicast_forwarding_table_id6 (bool is_configured, uint32_t table_id, string &error_msg) |
| Set the IPv6 unicast forwarding table ID to be used. | |
| int | unicast_forwarding_enabled4 (bool &ret_value, string &error_msg) const |
| Test whether the IPv4 unicast forwarding engine is enabled or disabled to forward packets. | |
| int | unicast_forwarding_enabled6 (bool &ret_value, string &error_msg) const |
| Test whether the IPv6 unicast forwarding engine is enabled or disabled to forward packets. | |
| int | accept_rtadv_enabled6 (bool &ret_value, string &error_msg) const |
| Test whether the acceptance of IPv6 Router Advertisement messages is enabled or disabled. | |
| int | set_unicast_forwarding_enabled4 (bool v, string &error_msg) |
| Set the IPv4 unicast forwarding engine to enable or disable forwarding of packets. | |
| int | set_unicast_forwarding_enabled6 (bool v, string &error_msg) |
| Set the IPv6 unicast forwarding engine to enable or disable forwarding of packets. | |
| int | set_accept_rtadv_enabled6 (bool v, string &error_msg) |
| Enable or disable the acceptance of IPv6 Router Advertisement messages from other routers. | |
| virtual int | add_entry4 (const Fte4 &fte) |
| Add a single IPv4 forwarding entry. | |
| virtual int | delete_entry4 (const Fte4 &fte) |
| Delete a single IPv4 forwarding entry. | |
| virtual int | set_table4 (const list< Fte4 > &fte_list) |
| Set the IPv4 unicast forwarding table. | |
| virtual int | delete_all_entries4 () |
| Delete all entries in the IPv4 unicast forwarding table. | |
| virtual int | lookup_route_by_dest4 (const IPv4 &dst, Fte4 &fte) |
| Lookup an IPv4 route by destination address. | |
| virtual int | lookup_route_by_network4 (const IPv4Net &dst, Fte4 &fte) |
| Lookup an IPv4 route by network address. | |
| virtual int | get_table4 (list< Fte4 > &fte_list) |
| Obtain the IPv4 unicast forwarding table. | |
| virtual int | add_entry6 (const Fte6 &fte) |
| Add a single IPv6 forwarding entry. | |
| virtual int | set_table6 (const list< Fte6 > &fte_list) |
| Set the IPv6 unicast forwarding table. | |
| virtual int | delete_entry6 (const Fte6 &fte) |
| Delete a single IPv6 forwarding entry. | |
| virtual int | delete_all_entries6 () |
| Delete all entries in the IPv6 unicast forwarding table. | |
| virtual int | lookup_route_by_dest6 (const IPv6 &dst, Fte6 &fte) |
| Lookup an IPv6 route by destination address. | |
| virtual int | lookup_route_by_network6 (const IPv6Net &dst, Fte6 &fte) |
| Lookup an IPv6 route by network address. | |
| virtual int | get_table6 (list< Fte6 > &fte_list) |
| Obtain the IPv6 unicast forwarding table. | |
| int | add_fib_table_observer (FibTableObserverBase *fib_table_observer) |
| Add a FIB table observer. | |
| int | delete_fib_table_observer (FibTableObserverBase *fib_table_observer) |
| Delete a FIB table observer. | |
| void | propagate_fib_changes (const list< FteX > &fte_list, const FibConfigTableObserver *fibconfig_table_observer) |
| Propagate FIB changes to all FIB table observers. | |
| Trie4 & | trie4 () |
| Get the IPv4 Trie (used for testing purpose). | |
| Trie6 & | trie6 () |
| Get the IPv6 Trie (used for testing purpose). | |
Protected Attributes | |
| Trie4 | _trie4 |
| Trie6 | _trie6 |
Private Attributes | |
| FeaNode & | _fea_node |
| EventLoop & | _eventloop |
| Profile & | _profile |
| NexthopPortMapper & | _nexthop_port_mapper |
| const IfTree & | _system_config_iftree |
| const IfTree & | _merged_config_iftree |
| FibConfigTransactionManager * | _ftm |
| list< FibConfigForwarding * > | _fibconfig_forwarding_plugins |
| list< FibConfigEntryGet * > | _fibconfig_entry_gets |
| list< FibConfigEntrySet * > | _fibconfig_entry_sets |
| list< FibConfigEntryObserver * > | _fibconfig_entry_observers |
| list< FibConfigTableGet * > | _fibconfig_table_gets |
| list< FibConfigTableSet * > | _fibconfig_table_sets |
| list< FibConfigTableObserver * > | _fibconfig_table_observers |
| bool | _unicast_forwarding_entries_retain_on_startup4 |
| bool | _unicast_forwarding_entries_retain_on_shutdown4 |
| bool | _unicast_forwarding_entries_retain_on_startup6 |
| bool | _unicast_forwarding_entries_retain_on_shutdown6 |
| uint32_t | _unicast_forwarding_table_id4 |
| bool | _unicast_forwarding_table_id4_is_configured |
| uint32_t | _unicast_forwarding_table_id6 |
| bool | _unicast_forwarding_table_id6_is_configured |
| bool | _is_running |
| list< FibTableObserverBase * > | _fib_table_observers |
Forwarding Table Interface.
Abstract class.
| int FibConfig::abort_transaction | ( | uint32_t | tid, |
| string & | error_msg | ||
| ) |
| int FibConfig::accept_rtadv_enabled6 | ( | bool & | ret_value, |
| string & | error_msg | ||
| ) | const |
Test whether the acceptance of IPv6 Router Advertisement messages is enabled or disabled.
| ret_value | if true on return, then the acceptance of IPv6 Router Advertisement messages is enabled, otherwise is disabled. |
| error_msg | the error message (if error). |
| int FibConfig::add_entry4 | ( | const Fte4 & | fte | ) | [virtual] |
| int FibConfig::add_entry6 | ( | const Fte6 & | fte | ) | [virtual] |
| int FibConfig::add_fib_table_observer | ( | FibTableObserverBase * | fib_table_observer | ) |
Add a FIB table observer.
| fib_table_observer | the FIB table observer to add. |
| int FibConfig::add_transaction_operation | ( | uint32_t | tid, |
| const TransactionManager::Operation & | op, | ||
| string & | error_msg | ||
| ) |
| int FibConfig::commit_transaction | ( | uint32_t | tid, |
| string & | error_msg | ||
| ) |
| int FibConfig::delete_all_entries4 | ( | ) | [virtual] |
| int FibConfig::delete_all_entries6 | ( | ) | [virtual] |
| int FibConfig::delete_entry4 | ( | const Fte4 & | fte | ) | [virtual] |
| int FibConfig::delete_entry6 | ( | const Fte6 & | fte | ) | [virtual] |
| int FibConfig::delete_fib_table_observer | ( | FibTableObserverBase * | fib_table_observer | ) |
Delete a FIB table observer.
| fib_table_observer | the FIB table observer to delete. |
| int FibConfig::end_configuration | ( | string & | error_msg | ) |
End of configuration interval.
| error_msg | the error message (if error). |
| EventLoop& FibConfig::eventloop | ( | ) | [inline] |
| uint32_t FibConfig::get_netlink_filter_table_id | ( | ) | const |
| int FibConfig::get_table4 | ( | list< Fte4 > & | fte_list | ) | [virtual] |
| int FibConfig::get_table6 | ( | list< Fte6 > & | fte_list | ) | [virtual] |
Lookup an IPv4 route by destination address.
| dst | host address to resolve. |
| fte | return-by-reference forwarding table entry. |
Lookup an IPv6 route by destination address.
| dst | host address to resolve. |
| fte | return-by-reference forwarding table entry. |
Lookup an IPv4 route by network address.
| dst | network address to resolve. |
| fte | return-by-reference forwarding table entry. |
Lookup an IPv6 route by network address.
| dst | network address to resolve. |
| fte | return-by-reference forwarding table entry. |
| const IfTree& FibConfig::merged_config_iftree | ( | ) | const [inline] |
| NexthopPortMapper& FibConfig::nexthop_port_mapper | ( | ) | [inline] |
Get a reference to the NexthopPortMapper instance.
| void FibConfig::propagate_fib_changes | ( | const list< FteX > & | fte_list, |
| const FibConfigTableObserver * | fibconfig_table_observer | ||
| ) |
| int FibConfig::register_fibconfig_entry_get | ( | FibConfigEntryGet * | fibconfig_entry_get, |
| bool | is_exclusive | ||
| ) |
Register FibConfigEntryGet plugin.
| fibconfig_entry_get | the plugin to register. |
| is_exclusive | if true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins. |
| int FibConfig::register_fibconfig_entry_observer | ( | FibConfigEntryObserver * | fibconfig_entry_observer, |
| bool | is_exclusive | ||
| ) |
Register FibConfigEntryObserver plugin.
| fibconfig_entry_observer | the plugin to register. |
| is_exclusive | if true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins. |
| int FibConfig::register_fibconfig_entry_set | ( | FibConfigEntrySet * | fibconfig_entry_set, |
| bool | is_exclusive | ||
| ) |
Register FibConfigEntrySet plugin.
| fibconfig_entry_set | the plugin to register. |
| is_exclusive | if true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins. |
| int FibConfig::register_fibconfig_forwarding | ( | FibConfigForwarding * | fibconfig_forwarding, |
| bool | is_exclusive | ||
| ) |
Register FibConfigForwarding plugin.
| fibconfig_forwarding | the plugin to register. |
| is_exclusive | if true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins. |
| int FibConfig::register_fibconfig_table_get | ( | FibConfigTableGet * | fibconfig_table_get, |
| bool | is_exclusive | ||
| ) |
Register FibConfigTableGet plugin.
| fibconfig_table_get | the plugin to register. |
| is_exclusive | if true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins. |
| int FibConfig::register_fibconfig_table_observer | ( | FibConfigTableObserver * | fibconfig_table_observer, |
| bool | is_exclusive | ||
| ) |
Register FibConfigTableObserver plugin.
| fibconfig_table_observer | the plugin to register. |
| is_exclusive | if true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins. |
| int FibConfig::register_fibconfig_table_set | ( | FibConfigTableSet * | fibconfig_table_set, |
| bool | is_exclusive | ||
| ) |
Register FibConfigTableSet plugin.
| fibconfig_table_set | the plugin to register. |
| is_exclusive | if true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins. |
| int FibConfig::set_accept_rtadv_enabled6 | ( | bool | v, |
| string & | error_msg | ||
| ) |
Enable or disable the acceptance of IPv6 Router Advertisement messages from other routers.
It should be enabled for hosts, and disabled for routers.
| v | if true, then enable the acceptance of IPv6 Router Advertisement messages, otherwise disable it. |
| error_msg | the error message (if error). |
| int FibConfig::set_table4 | ( | const list< Fte4 > & | fte_list | ) | [virtual] |
| int FibConfig::set_table6 | ( | const list< Fte6 > & | fte_list | ) | [virtual] |
| int FibConfig::set_unicast_forwarding_enabled4 | ( | bool | v, |
| string & | error_msg | ||
| ) |
| int FibConfig::set_unicast_forwarding_enabled6 | ( | bool | v, |
| string & | error_msg | ||
| ) |
| int FibConfig::set_unicast_forwarding_entries_retain_on_shutdown4 | ( | bool | retain, |
| string & | error_msg | ||
| ) |
| int FibConfig::set_unicast_forwarding_entries_retain_on_shutdown6 | ( | bool | retain, |
| string & | error_msg | ||
| ) |
| int FibConfig::set_unicast_forwarding_entries_retain_on_startup4 | ( | bool | retain, |
| string & | error_msg | ||
| ) |
| int FibConfig::set_unicast_forwarding_entries_retain_on_startup6 | ( | bool | retain, |
| string & | error_msg | ||
| ) |
| int FibConfig::set_unicast_forwarding_table_id4 | ( | bool | is_configured, |
| uint32_t | table_id, | ||
| string & | error_msg | ||
| ) |
Set the IPv4 unicast forwarding table ID to be used.
| is_configured | if true, the forwarding table ID is configured, otherwise the default table should be used. |
| table_id | the IPv4 unicast forwarding table ID to be used. |
| error_msg | the error message (if error). |
| int FibConfig::set_unicast_forwarding_table_id6 | ( | bool | is_configured, |
| uint32_t | table_id, | ||
| string & | error_msg | ||
| ) |
Set the IPv6 unicast forwarding table ID to be used.
| is_configured | if true, the forwarding table ID is configured, otherwise the default table should be used. |
| table_id | the IPv6 unicast forwarding table ID to be used. |
| error_msg | the error message (if error). |
| int FibConfig::start | ( | string & | error_msg | ) |
Start operation.
| error_msg | the error message (if error). |
| int FibConfig::start_configuration | ( | string & | error_msg | ) |
Start a configuration interval.
All modifications must be within a marked "configuration" interval.
| error_msg | the error message (if error). |
| int FibConfig::start_transaction | ( | uint32_t & | tid, |
| string & | error_msg | ||
| ) |
| ProcessStatus FibConfig::status | ( | string & | reason | ) | const |
| int FibConfig::stop | ( | string & | error_msg | ) |
Stop operation.
| error_msg | the error message (if error). |
| const IfTree& FibConfig::system_config_iftree | ( | ) | const [inline] |
| Trie4& FibConfig::trie4 | ( | ) | [inline] |
| Trie6& FibConfig::trie6 | ( | ) | [inline] |
| int FibConfig::unicast_forwarding_enabled4 | ( | bool & | ret_value, |
| string & | error_msg | ||
| ) | const |
| int FibConfig::unicast_forwarding_enabled6 | ( | bool & | ret_value, |
| string & | error_msg | ||
| ) | const |
| bool FibConfig::unicast_forwarding_entries_retain_on_shutdown4 | ( | ) | const [inline] |
| bool FibConfig::unicast_forwarding_entries_retain_on_shutdown6 | ( | ) | const [inline] |
| bool FibConfig::unicast_forwarding_entries_retain_on_startup4 | ( | ) | const [inline] |
| bool FibConfig::unicast_forwarding_entries_retain_on_startup6 | ( | ) | const [inline] |
| uint32_t FibConfig::unicast_forwarding_table_id | ( | int | family | ) | const |
| uint32_t FibConfig::unicast_forwarding_table_id4 | ( | ) | const [inline] |
| bool FibConfig::unicast_forwarding_table_id4_is_configured | ( | ) | const [inline] |
| uint32_t FibConfig::unicast_forwarding_table_id6 | ( | ) | const [inline] |
| bool FibConfig::unicast_forwarding_table_id6_is_configured | ( | ) | const [inline] |
| bool FibConfig::unicast_forwarding_table_id_is_configured | ( | int | family | ) | const |
| int FibConfig::unregister_fibconfig_entry_get | ( | FibConfigEntryGet * | fibconfig_entry_get | ) |
Unregister FibConfigEntryGet plugin.
| fibconfig_entry_get | the plugin to unregister. |
| int FibConfig::unregister_fibconfig_entry_observer | ( | FibConfigEntryObserver * | fibconfig_entry_observer | ) |
Unregister FibConfigEntryObserver plugin.
| fibconfig_entry_observer | the plugin to unregister. |
| int FibConfig::unregister_fibconfig_entry_set | ( | FibConfigEntrySet * | fibconfig_entry_set | ) |
Unregister FibConfigEntrySet plugin.
| fibconfig_entry_set | the plugin to unregister. |
| int FibConfig::unregister_fibconfig_forwarding | ( | FibConfigForwarding * | fibconfig_forwarding | ) |
Unregister FibConfigForwarding plugin.
| fibconfig_forwarding | the plugin to unregister. |
| int FibConfig::unregister_fibconfig_table_get | ( | FibConfigTableGet * | fibconfig_table_get | ) |
Unregister FibConfigTableGet plugin.
| fibconfig_table_get | the plugin to unregister. |
| int FibConfig::unregister_fibconfig_table_observer | ( | FibConfigTableObserver * | fibconfig_table_observer | ) |
Unregister FibConfigTableObserver plugin.
| fibconfig_table_observer | the plugin to unregister. |
| int FibConfig::unregister_fibconfig_table_set | ( | FibConfigTableSet * | fibconfig_table_set | ) |
Unregister FibConfigTableSet plugin.
| fibconfig_table_set | the plugin to unregister. |