class IfTree

Container class for Fea Interface objects in a system. More...

Definition#include <iftree.hh>
InheritsIfTreeItem [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Protected Members


Detailed Description

Container class for Fea Interface objects in a system.

typedef map<const string, IfTreeInterface> IfMap

IfMap

bool  add_if (const string& ifname)

add_if

Create a new interface.

Parameters:
ifnameinterface name.

Returns: true on success, false if an interface with ifname already exists.

bool  remove_if (const string& ifname)

remove_if

Label interface as ready for deletion. Deletion does not occur until finalize_state() is called.

Parameters:
ifnamename of interface to be labelled.

Returns: true on success, false if ifname is invalid.

inline IfMap::iterator  get_if (const string& ifn)

get_if

Get iterator of corresponding to named interface.

Parameters:
ifninterface name to find iterator for.

Returns: iterator, will be equal to ifs().end() if invalid.

inline IfMap::const_iterator  get_if (const string& ifn)

get_if

[const]

Get iterator of corresponding to named interface.

Parameters:
ifninterface name to find iterator for.

Returns: iterator, will be equal to ifs().end() if invalid.

inline const IfMap&  ifs ()

ifs

[const]

inline IfMap&  ifs ()

ifs

IfTree&  align_with (const IfTree& user_config)

align_with

Align config such that only elements present in the config and a user supplied config are present. State information is taken from supplied user config.

Inside the FEA there may be multiple configuration representations, typically one the user modifies and one that mirrors the hardware. Errors may occur pushing the user config down onto the hardware and we need a method to update the user config from the h/w config that exists after the config push. We can't just copy the h/w config since the user config is restricted to configuration set by the user.

Parameters:
user_configconfig to align state with.

Returns: modified configuration structure.

void  finalize_state ()

finalize_state

Delete interfaces labelled as ready for deletion, call finalize_state() on remaining interfaces, and set state to NO_CHANGE.

Reimplemented from IfTreeItem.

string  str ()

str

[const]

Returns: string representation of IfTree.

Reimplemented from IfTreeItem.

IfMap _ifs

_ifs

[protected]


Generated by: pavlin on possum.icir.org on Mon Mar 10 19:34:57 2003, using kdoc 2.0a54+XORP.