class FibConfig

Forwarding Table Interface. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Protected Members


Detailed Description

Abstract class.

 FibConfig (FeaNode& fea_node, const IfTree& system_config_iftree, const IfTree& merged_config_iftree)

FibConfig

Constructor.

Parameters:

fea_nodethe FEA node.
system_config_iftreethe system interface configuration tree to use.
merged_config_iftreethe merged system-user interface configuration tree to use.
 ~FibConfig ()

~FibConfig

[virtual]

Virtual destructor (in case this class is used as a base class).

EventLoop&  eventloop ()

eventloop

Get a reference to the EventLoop instance.

Returns: a reference to the EventLoop instance.

NexthopPortMapper&  nexthop_port_mapper ()

nexthop_port_mapper

Get a reference to the NexthopPortMapper instance.

Returns: a reference to the NexthopPortMapper instance.

const IfTree&  system_config_iftree ()

system_config_iftree

[const]

Get a reference to the system interface configuration.

Returns: a reference to the system interface configuration.

const IfTree&  merged_config_iftree ()

merged_config_iftree

[const]

Get a reference to the merged system-user interface configuration.

Returns: a reference to the merged system-user interface configuration.

ProcessStatus  status (string& reason)

status

[const]

Get the status code.

Parameters:

reasonthe human-readable reason for any failure.

Returns: the status code.

int  start_transaction (uint32_t& tid, string& error_msg)

start_transaction

Start FIB-related transaction.

Parameters:

tidthe return-by-reference new transaction ID.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  commit_transaction (uint32_t tid, string& error_msg)

commit_transaction

Commit FIB-related transaction.

Parameters:

tidthe transaction ID.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  abort_transaction (uint32_t tid, string& error_msg)

abort_transaction

Abort FIB-related transaction.

Parameters:

tidthe transaction ID.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  add_transaction_operation (uint32_t tid, const TransactionManager::Operation& op, string& error_msg)

add_transaction_operation

Add operation to FIB-related transaction.

Parameters:

tidthe transaction ID.
opthe operation to add.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  register_fibconfig_forwarding (FibConfigForwarding* fibconfig_forwarding, bool is_exclusive)

register_fibconfig_forwarding

Register FibConfigForwarding plugin.

Parameters:

fibconfig_forwardingthe plugin to register.
is_exclusiveif true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  unregister_fibconfig_forwarding (FibConfigForwarding* fibconfig_forwarding)

unregister_fibconfig_forwarding

Unregister FibConfigForwarding plugin.

Parameters:

fibconfig_forwardingthe plugin to unregister.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  register_fibconfig_entry_get (FibConfigEntryGet* fibconfig_entry_get, bool is_exclusive)

register_fibconfig_entry_get

Register FibConfigEntryGet plugin.

Parameters:

fibconfig_entry_getthe plugin to register.
is_exclusiveif true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  unregister_fibconfig_entry_get (FibConfigEntryGet* fibconfig_entry_get)

unregister_fibconfig_entry_get

Unregister FibConfigEntryGet plugin.

Parameters:

fibconfig_entry_getthe plugin to unregister.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  register_fibconfig_entry_set (FibConfigEntrySet* fibconfig_entry_set, bool is_exclusive)

register_fibconfig_entry_set

Register FibConfigEntrySet plugin.

Parameters:

fibconfig_entry_setthe plugin to register.
is_exclusiveif true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  unregister_fibconfig_entry_set (FibConfigEntrySet* fibconfig_entry_set)

unregister_fibconfig_entry_set

Unregister FibConfigEntrySet plugin.

Parameters:

fibconfig_entry_setthe plugin to unregister.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  register_fibconfig_entry_observer (FibConfigEntryObserver* fibconfig_entry_observer, bool is_exclusive)

register_fibconfig_entry_observer

Register FibConfigEntryObserver plugin.

Parameters:

fibconfig_entry_observerthe plugin to register.
is_exclusiveif true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  unregister_fibconfig_entry_observer (FibConfigEntryObserver* fibconfig_entry_observer)

unregister_fibconfig_entry_observer

Unregister FibConfigEntryObserver plugin.

Parameters:

fibconfig_entry_observerthe plugin to unregister.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  register_fibconfig_table_get (FibConfigTableGet* fibconfig_table_get, bool is_exclusive)

register_fibconfig_table_get

Register FibConfigTableGet plugin.

Parameters:

fibconfig_table_getthe plugin to register.
is_exclusiveif true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  unregister_fibconfig_table_get (FibConfigTableGet* fibconfig_table_get)

unregister_fibconfig_table_get

Unregister FibConfigTableGet plugin.

Parameters:

fibconfig_table_getthe plugin to unregister.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  register_fibconfig_table_set (FibConfigTableSet* fibconfig_table_set, bool is_exclusive)

register_fibconfig_table_set

Register FibConfigTableSet plugin.

Parameters:

fibconfig_table_setthe plugin to register.
is_exclusiveif true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  unregister_fibconfig_table_set (FibConfigTableSet* fibconfig_table_set)

unregister_fibconfig_table_set

Unregister FibConfigTableSet plugin.

Parameters:

fibconfig_table_setthe plugin to unregister.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  register_fibconfig_table_observer (FibConfigTableObserver* fibconfig_table_observer, bool is_exclusive)

register_fibconfig_table_observer

Register FibConfigTableObserver plugin.

Parameters:

fibconfig_table_observerthe plugin to register.
is_exclusiveif true, the plugin is registered as the exclusive plugin, otherwise is added to the list of plugins.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  unregister_fibconfig_table_observer (FibConfigTableObserver* fibconfig_table_observer)

unregister_fibconfig_table_observer

Unregister FibConfigTableObserver plugin.

Parameters:

fibconfig_table_observerthe plugin to unregister.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  start (string& error_msg)

start

Start operation.

Parameters:

error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  stop (string& error_msg)

stop

Stop operation.

Parameters:

error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  start_configuration (string& error_msg)

start_configuration

Start a configuration interval.

All modifications must be within a marked "configuration" interval.

Parameters:

error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  end_configuration (string& error_msg)

end_configuration

End of configuration interval.

Parameters:

error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

bool  unicast_forwarding_entries_retain_on_startup4 ()

unicast_forwarding_entries_retain_on_startup4

[const]

Test whether the IPv4 unicast forwarding engine retains existing XORP forwarding entries on startup.

Returns: true if the XORP unicast forwarding entries are retained, otherwise false.

bool  unicast_forwarding_entries_retain_on_shutdown4 ()

unicast_forwarding_entries_retain_on_shutdown4

[const]

Test whether the IPv4 unicast forwarding engine retains existing XORP forwarding entries on shutdown.

Returns: true if the XORP unicast forwarding entries are retained, otherwise false.

bool  unicast_forwarding_entries_retain_on_startup6 ()

unicast_forwarding_entries_retain_on_startup6

[const]

Test whether the IPv6 unicast forwarding engine retains existing XORP forwarding entries on startup.

Returns: true if the XORP unicast forwarding entries are retained, otherwise false.

bool  unicast_forwarding_entries_retain_on_shutdown6 ()

unicast_forwarding_entries_retain_on_shutdown6

[const]

Test whether the IPv6 unicast forwarding engine retains existing XORP forwarding entries on shutdown.

Returns: true if the XORP unicast forwarding entries are retained, otherwise false.

int  set_unicast_forwarding_entries_retain_on_startup4 (bool retain, string& error_msg)

set_unicast_forwarding_entries_retain_on_startup4

Set the IPv4 unicast forwarding engine whether to retain existing XORP forwarding entries on startup.

Parameters:

retainif true, then retain the XORP forwarding entries, otherwise delete them.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  set_unicast_forwarding_entries_retain_on_shutdown4 (bool retain, string& error_msg)

set_unicast_forwarding_entries_retain_on_shutdown4

Set the IPv4 unicast forwarding engine whether to retain existing XORP forwarding entries on shutdown.

Parameters:

retainif true, then retain the XORP forwarding entries, otherwise delete them.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  set_unicast_forwarding_entries_retain_on_startup6 (bool retain, string& error_msg)

set_unicast_forwarding_entries_retain_on_startup6

Set the IPv6 unicast forwarding engine whether to retain existing XORP forwarding entries on startup.

Parameters:

retainif true, then retain the XORP forwarding entries, otherwise delete them.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  set_unicast_forwarding_entries_retain_on_shutdown6 (bool retain, string& error_msg)

set_unicast_forwarding_entries_retain_on_shutdown6

Set the IPv6 unicast forwarding engine whether to retain existing XORP forwarding entries on shutdown.

Parameters:

retainif true, then retain the XORP forwarding entries, otherwise delete them.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

bool  unicast_forwarding_table_id_is_configured (int family)

unicast_forwarding_table_id_is_configured

[const]

Test whether the unicast forwarding table ID for a given address family is configured.

Parameters:

familythe address family.

Returns: true if the unicast forwarding table ID for the given address family is configured, otherwise false.

uint32_t  unicast_forwarding_table_id (int family)

unicast_forwarding_table_id

[const]

Get the unicast forwarding table ID for a given address family.

Parameters:

familythe address family;

Returns: the unicast forwarding table ID for the given address family.

bool  unicast_forwarding_table_id4_is_configured ()

unicast_forwarding_table_id4_is_configured

[const]

Test whether the IPv4 unicast forwarding table ID is configured.

Returns: true if the IPv4 unicast forwarding table ID is configured, otherwise false.

uint32_t  unicast_forwarding_table_id4 ()

unicast_forwarding_table_id4

[const]

Get the IPv4 unicast forwarding table ID.

Returns: the IPv4 unicast forwarding table ID.

bool  unicast_forwarding_table_id6_is_configured ()

unicast_forwarding_table_id6_is_configured

[const]

Test whether the IPv6 unicast forwarding table ID is configured.

Returns: true if the IPv6 unicast forwarding table ID is configured, otherwise false.

uint32_t  unicast_forwarding_table_id6 ()

unicast_forwarding_table_id6

[const]

Get the IPv6 unicast forwarding table ID.

Returns: the IPv6 unicast forwarding table ID.

int  set_unicast_forwarding_table_id4 (bool is_configured, uint32_t table_id, string& error_msg)

set_unicast_forwarding_table_id4

Set the IPv4 unicast forwarding table ID to be used.

Parameters:

is_configuredif true, the forwarding table ID is configured, otherwise the default table should be used.
table_idthe IPv4 unicast forwarding table ID to be used.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  set_unicast_forwarding_table_id6 (bool is_configured, uint32_t table_id, string& error_msg)

set_unicast_forwarding_table_id6

Set the IPv6 unicast forwarding table ID to be used.

Parameters:

is_configuredif true, the forwarding table ID is configured, otherwise the default table should be used.
table_idthe IPv6 unicast forwarding table ID to be used.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  unicast_forwarding_enabled4 (bool& ret_value, string& error_msg)

unicast_forwarding_enabled4

[const]

Test whether the IPv4 unicast forwarding engine is enabled or disabled to forward packets.

Parameters:

ret_valueif true on return, then the IPv4 unicast forwarding is enabled, otherwise is disabled.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  unicast_forwarding_enabled6 (bool& ret_value, string& error_msg)

unicast_forwarding_enabled6

[const]

Test whether the IPv6 unicast forwarding engine is enabled or disabled to forward packets.

Parameters:

ret_valueif true on return, then the IPv6 unicast forwarding is enabled, otherwise is disabled.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  accept_rtadv_enabled6 (bool& ret_value, string& error_msg)

accept_rtadv_enabled6

[const]

Test whether the acceptance of IPv6 Router Advertisement messages is enabled or disabled.

Parameters:

ret_valueif true on return, then the acceptance of IPv6 Router Advertisement messages is enabled, otherwise is disabled.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  set_unicast_forwarding_enabled4 (bool v, string& error_msg)

set_unicast_forwarding_enabled4

Set the IPv4 unicast forwarding engine to enable or disable forwarding of packets.

Parameters:

vif true, then enable IPv4 unicast forwarding, otherwise disable it.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  set_unicast_forwarding_enabled6 (bool v, string& error_msg)

set_unicast_forwarding_enabled6

Set the IPv6 unicast forwarding engine to enable or disable forwarding of packets.

Parameters:

vif true, then enable IPv6 unicast forwarding, otherwise disable it.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  set_accept_rtadv_enabled6 (bool v, string& error_msg)

set_accept_rtadv_enabled6

Enable or disable the acceptance of IPv6 Router Advertisement messages from other routers. It should be enabled for hosts, and disabled for routers.

Parameters:

vif true, then enable the acceptance of IPv6 Router Advertisement messages, otherwise disable it.
error_msgthe error message (if error).

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  add_entry4 (const Fte4& fte)

add_entry4

[virtual]

Add a single IPv4 forwarding entry.

Must be within a configuration interval.

Parameters:

ftethe entry to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_entry4 (const Fte4& fte)

delete_entry4

[virtual]

Delete a single IPv4 forwarding entry.

Must be with a configuration interval.

Parameters:

ftethe entry to delete. Only destination and netmask are used.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  set_table4 (const list<Fte4>& fte_list)

set_table4

[virtual]

Set the IPv4 unicast forwarding table.

Parameters:

fte_listthe list with all entries to install into the IPv4 unicast forwarding table.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_all_entries4 ()

delete_all_entries4

[virtual]

Delete all entries in the IPv4 unicast forwarding table.

Must be within a configuration interval.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  lookup_route_by_dest4 (const IPv4& dst, Fte4& fte)

lookup_route_by_dest4

[virtual]

Lookup an IPv4 route by destination address.

Parameters:

dsthost address to resolve.
ftereturn-by-reference forwarding table entry.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  lookup_route_by_network4 (const IPv4Net& dst, Fte4& fte)

lookup_route_by_network4

[virtual]

Lookup an IPv4 route by network address.

Parameters:

dstnetwork address to resolve.
ftereturn-by-reference forwarding table entry.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  get_table4 (list<Fte4>& fte_list)

get_table4

[virtual]

Obtain the IPv4 unicast forwarding table.

Parameters:

fte_listthe return-by-reference list with all entries in the IPv4 unicast forwarding table.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  add_entry6 (const Fte6& fte)

add_entry6

[virtual]

Add a single IPv6 forwarding entry.

Must be within a configuration interval.

Parameters:

ftethe entry to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  set_table6 (const list<Fte6>& fte_list)

set_table6

[virtual]

Set the IPv6 unicast forwarding table.

Parameters:

fte_listthe list with all entries to install into the IPv6 unicast forwarding table.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_entry6 (const Fte6& fte)

delete_entry6

[virtual]

Delete a single IPv6 forwarding entry.

Must be within a configuration interval.

Parameters:

ftethe entry to delete. Only destination and netmask are used.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_all_entries6 ()

delete_all_entries6

[virtual]

Delete all entries in the IPv6 unicast forwarding table.

Must be within a configuration interval.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  lookup_route_by_dest6 (const IPv6& dst, Fte6& fte)

lookup_route_by_dest6

[virtual]

Lookup an IPv6 route by destination address.

Parameters:

dsthost address to resolve.
ftereturn-by-reference forwarding table entry.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  lookup_route_by_network6 (const IPv6Net& dst, Fte6& fte)

lookup_route_by_network6

[virtual]

Lookup an IPv6 route by network address.

Parameters:

dstnetwork address to resolve.
ftereturn-by-reference forwarding table entry.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  get_table6 (list<Fte6>& fte_list)

get_table6

[virtual]

Obtain the IPv6 unicast forwarding table.

Parameters:

fte_listthe return-by-reference list with all entries in the IPv6 unicast forwarding table.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  add_fib_table_observer (FibTableObserverBase* fib_table_observer)

add_fib_table_observer

Add a FIB table observer.

Parameters:

fib_table_observerthe FIB table observer to add.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  delete_fib_table_observer (FibTableObserverBase* fib_table_observer)

delete_fib_table_observer

Delete a FIB table observer.

Parameters:

fib_table_observerthe FIB table observer to delete.

Returns: XORP_OK on success, otherwise XORP_ERROR.

void  propagate_fib_changes (const list<FteX>& fte_list, const FibConfigTableObserver* fibconfig_table_observer)

propagate_fib_changes

Propagate FIB changes to all FIB table observers.

Parameters:

fte_listthe list with the FIB changes.
fibconfig_table_observerthe method that reports the FIB changes.
Trie4&  trie4 ()

trie4

Get the IPv4 Trie (used for testing purpose).

Returns: the IPv4 Trie.

Trie6&  trie6 ()

trie6

Get the IPv6 Trie (used for testing purpose).

Returns: the IPv6 Trie.

Trie4 _trie4

_trie4

[protected]

Trie6 _trie6

_trie6

[protected]


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