class IfConfig

Base class for pushing and pulling interface configurations down to the particular system. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods


Detailed Description

Base class for pushing and pulling interface configurations down to the particular system.

 IfConfig (FeaNode& fea_node)

IfConfig

Constructor.

Parameters:

fea_nodethe FEA node.
 ~IfConfig ()

~IfConfig

[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.

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 interface-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 interface-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 interface-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 interface-related transaction.

Parameters:

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

Returns: XORP_OK on success, otherwise XORP_ERROR.

NexthopPortMapper&  nexthop_port_mapper ()

nexthop_port_mapper

Get a reference to the NexthopPortMapper instance.

Returns: a reference to the NexthopPortMapper instance.

IfConfigUpdateReplicator&  ifconfig_update_replicator ()

ifconfig_update_replicator

Get the IfConfigUpdateReplicator instance.

Returns: a reference to the IfConfigUpdateReplicator instance (IfConfigUpdateReplicator).

IfConfigErrorReporterBase&  ifconfig_error_reporter ()

ifconfig_error_reporter

Get the error reporter associated with IfConfig.

Returns: the error reporter associated with IfConfig.

IfTree&  system_config ()

system_config

Get a reference to the system interface configuration.

Returns: a reference to the system interface configuration.

void  set_system_config (const IfTree& iftree)

set_system_config

Set the system interface configuration.

Parameters:

iftreethe system interface configuration.
IfTree&  user_config ()

user_config

Get a reference to the user interface configuration.

Returns: a reference to the user interface configuration.

void  set_user_config (const IfTree& iftree)

set_user_config

Set the user interface configuration.

Parameters:

iftreethe user interface configuration.
IfTree&  merged_config ()

merged_config

Get a reference to the merged system-user configuration.

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

void  set_merged_config (const IfTree& iftree)

set_merged_config

Set the merged system-user configuration.

Parameters:

iftreethe merged system-user configuration.
const IfTree&  original_config ()

original_config

Get a reference to the original interface configuration on startup.

Returns: a reference to the original interface configuration on startup.

bool  restore_original_config_on_shutdown ()

restore_original_config_on_shutdown

[const]

Test whether the original configuration should be restored on shutdown.

Returns: true of the original configuration should be restored on shutdown, otherwise false.

void  set_restore_original_config_on_shutdown (bool v)

set_restore_original_config_on_shutdown

Set the flag whether the original configuration should be restored on shutdown.

Parameters:

vif true the original configuration should be restored on shutdown.
int  register_ifconfig_property (IfConfigProperty* ifconfig_property, bool is_exclusive)

register_ifconfig_property

Register IfConfigProperty plugin.

Parameters:

ifconfig_propertythe 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_ifconfig_property (IfConfigProperty* ifconfig_property)

unregister_ifconfig_property

Unregister IfConfigProperty plugin.

Parameters:

ifconfig_propertythe plugin to unregister.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  register_ifconfig_get (IfConfigGet* ifconfig_get, bool is_exclusive)

register_ifconfig_get

Register IfConfigGet plugin.

Parameters:

ifconfig_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_ifconfig_get (IfConfigGet* ifconfig_get)

unregister_ifconfig_get

Unregister IfConfigGet plugin.

Parameters:

ifconfig_getthe plugin to unregister.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  register_ifconfig_set (IfConfigSet* ifconfig_set, bool is_exclusive)

register_ifconfig_set

Register IfConfigSet plugin.

Parameters:

ifconfig_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_ifconfig_set (IfConfigSet* ifconfig_set)

unregister_ifconfig_set

Unregister IfConfigSet plugin.

Parameters:

ifconfig_setthe plugin to unregister.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  register_ifconfig_observer (IfConfigObserver* ifconfig_observer, bool is_exclusive)

register_ifconfig_observer

Register IfConfigObserver plugin.

Parameters:

ifconfig_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_ifconfig_observer (IfConfigObserver* ifconfig_observer)

unregister_ifconfig_observer

Unregister IfConfigObserver plugin.

Parameters:

ifconfig_observerthe plugin to unregister.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  register_ifconfig_vlan_get (IfConfigVlanGet* ifconfig_vlan_get, bool is_exclusive)

register_ifconfig_vlan_get

Register IfConfigVlanGet plugin.

Parameters:

ifconfig_vlan_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_ifconfig_vlan_get (IfConfigVlanGet* ifconfig_vlan_get)

unregister_ifconfig_vlan_get

Unregister IfConfigVlanGet plugin.

Parameters:

ifconfig_vlan_getthe plugin to unregister.

Returns: XORP_OK on success, otherwise XORP_ERROR.

int  register_ifconfig_vlan_set (IfConfigVlanSet* ifconfig_vlan_set, bool is_exclusive)

register_ifconfig_vlan_set

Register IfConfigVlanSet plugin.

Parameters:

ifconfig_vlan_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_ifconfig_vlan_set (IfConfigVlanSet* ifconfig_vlan_set)

unregister_ifconfig_vlan_set

Unregister IfConfigVlanSet plugin.

Parameters:

ifconfig_vlan_setthe 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  push_config (IfTree& iftree)

push_config

Push interface configuration down to the system.

Errors are reported via the ifconfig_error_reporter() instance. Note that on return some of the interface configuration state may be modified.

Parameters:

iftreethe interface configuration to be pushed down.

Returns: XORP_OK on success, otherwise XORP_ERROR.

const string&  push_error ()

push_error

[const]

Get the error message associated with a push operation.

Returns: the error message associated with a push operation.

const IfTree&  pull_config ()

pull_config

Pull up current interface configuration from the system.

Returns: the current interface configuration from the system.

bool  report_update (const IfTreeInterface& fi)

report_update

Check IfTreeInterface and report updates to IfConfigUpdateReporter.

Parameters:

fithe IfTreeInterface interface instance to check.

Returns: true if there were updates to report, otherwise false.

bool  report_update (const IfTreeInterface& fi, const IfTreeVif& fv)

report_update

Check IfTreeVif and report updates to IfConfigUpdateReporter.

Parameters:

fithe IfTreeInterface interface instance to check.
fvthe IfTreeVif vif instance to check.

Returns: true if there were updates to report, otherwise false.

bool  report_update (const IfTreeInterface& fi, const IfTreeVif& fv, const IfTreeAddr4& fa)

report_update

Check IfTreeAddr4 and report updates to IfConfigUpdateReporter.

Parameters:

fithe IfTreeInterface interface instance to check.
fvthe IfTreeVif vif instance to check.
fathe IfTreeAddr4 address instance to check.

Returns: true if there were updates to report, otherwise false.

bool  report_update (const IfTreeInterface& fi, const IfTreeVif& fv, const IfTreeAddr6& fa)

report_update

Check IfTreeAddr6 and report updates to IfConfigUpdateReporter.

Parameters:

fithe IfTreeInterface interface instance to check.
fvthe IfTreeVif vif instance to check.
fathe IfTreeAddr6 address instance to check.

Returns: true if there were updates to report, otherwise false.

void  report_updates_completed ()

report_updates_completed

Report that updates were completed to IfConfigUpdateReporter.

void  report_updates (IfTree& iftree)

report_updates

Check every item within IfTree and report updates to IfConfigUpdateReporter.

Parameters:

iftreethe interface tree instance to check.

Generated by: bms on anglepoise.lon.incunabulum.net on Wed Jul 23 10:05:50 2008, using kdoc 2.0a54+XORP.