|
|
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:
ifname | interface 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:
ifname | name 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:
ifn | interface 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:
ifn | interface 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, bool do_finalize_state)
| 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_config | config to align state with. |
do_finalize_state | if true, and if there are any items in the aligned config marked for deletion, then remove those items. More specifically, if true, then IfTree::finalize_state() will be called at the end. |
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]
inline IfTree::IfMap::iterator
get_if (const string& ifn)
| get_if |
[protected]
inline IfTree::IfMap::const_iterator
get_if (const string& ifn)
| get_if |
[protected const]
Generated by: pavlin on possum.icir.org on Mon Jun 9 13:23:54 2003, using kdoc 2.0a54+XORP. |