|
|
The IfMgrIfTree is the top-level container of interface configuration state. The tree contains a collection of IfMgrIfAtom objects, each of which represents the configuration state of a physical interface.
typedef map<const string, IfMgrIfAtom> IfMap | IfMap |
inline const IfMap& ifs ()
| ifs |
[const]
Interface collection accessor.
inline IfMap& ifs ()
| ifs |
Interface collection accessor.
inline void clear ()
| clear |
const IfMgrIfAtom* find_if (const string& ifname)
| find_if |
[const]
Find interface.
Parameters:
ifname | name of interface to find. |
Returns: pointer to interface structure on success, 0 otherwise.
IfMgrIfAtom* find_if (const string& ifname)
| find_if |
Find interface.
Parameters:
ifname | name of interface to find. |
Returns: pointer to interface structure on success, 0 otherwise.
const IfMgrVifAtom* find_vif (const string& ifname,
const string& vifname)
| find_vif |
[const]
Find virtual interface.
Parameters:
ifname | name of interface responsible for virtual interface. |
vifname | name of virtual interface. |
Returns: pointer to virtual interface structure on success, 0 otherwise.
IfMgrVifAtom* find_vif (const string& ifname,
const string& vifname)
| find_vif |
Find virtual interface.
Parameters:
ifname | name of interface responsible for virtual interface. |
vifname | name of virtual interface. |
Returns: pointer to virtual interface structure on success, 0 otherwise.
const IfMgrIPv4Atom* find_addr (const string& ifname,
const string& vifname,
const IPv4& addr)
| find_addr |
[const]
Find IPv4 address structure.
Parameters:
ifname | name of interface responsible for address. |
vifname | name of virtual interface responsible for address. |
addr | IPv4 address. |
Returns: pointer to virtual interface structure on success, 0 otherwise.
IfMgrIPv4Atom* find_addr (const string& ifname,
const string& vifname,
const IPv4& addr)
| find_addr |
Find IPv4 address structure.
Parameters:
ifname | name of interface responsible for address. |
vifname | name of virtual interface responsible for address. |
addr | IPv4 address. |
Returns: pointer to virtual interface structure on success, 0 otherwise.
const IfMgrIPv6Atom* find_addr (const string& ifname,
const string& vifname,
const IPv6& addr)
| find_addr |
[const]
Find IPv6 address structure.
Parameters:
ifname | name of interface responsible for address. |
vifname | name of virtual interface responsible for address. |
addr | IPv6 address. |
Returns: pointer to virtual interface structure on success, 0 otherwise.
IfMgrIPv6Atom* find_addr (const string& ifname,
const string& vifname,
const IPv6& addr)
| find_addr |
Find IPv6 address structure.
Parameters:
ifname | name of interface responsible for address. |
vifname | name of virtual interface responsible for address. |
addr | IPv6 address. |
Returns: pointer to virtual interface structure on success, 0 otherwise.
bool operator== (const IfMgrIfTree& o)
| operator== |
[const]
Equality operator.
Parameters:
o | tree to compare against. |
Returns: true if this instance and o are the same, false otherwise.
bool is_my_addr (const IPv4& addr, string& ifname, string& vifname)
| is_my_addr |
[const]
Test if an IPv4 address belongs to an interface.
If an interface with the address is down, then the address is not considered to belong to that interface.
Parameters:
addr | the address to test. |
ifname | the return-by-reference name of the interface the address belongs to, or an empty string. |
vifname | the return-by-reference name of the vif the address belongs to, or an empty string. |
Returns: true if the address belongs to an interface, otherwise false.
bool is_my_addr (const IPv6& addr, string& ifname, string& vifname)
| is_my_addr |
[const]
Test if an IPv6 address belongs to an interface.
If an interface with the address is down, then the address is not considered to belong to that interface.
Parameters:
addr | the address to test. |
ifname | the return-by-reference name of the interface the address belongs to, or an empty string. |
vifname | the return-by-reference name of the vif the address belongs to, or an empty string. |
Returns: true if the address belongs to an interface, otherwise false.
bool is_my_addr (const IPvX& addr, string& ifname, string& vifname)
| is_my_addr |
[const]
Test if an IPvX address belongs to an interface.
If an interface with the address is down, then the address is not considered to belong to that interface.
Parameters:
addr | the address to test. |
ifname | the return-by-reference name of the interface the address belongs to, or an empty string. |
vifname | the return-by-reference name of the vif the address belongs to, or an empty string. |
Returns: true if the address belongs to an interface, otherwise false.
bool is_directly_connected (const IPv4& addr, string& ifname,
string& vifname)
| is_directly_connected |
[const]
Test if an IPv4 address is directly connected to an interface.
If an interface toward an address is down, then the address is not considered as directly connected.
Parameters:
addr | the address to test. |
ifname | the return-by-reference name of the interface toward the address if the address is directly connected otherwise an empty string. |
vifname | the return-by-reference name of the vif toward the address if the address is directly connected otherwise an empty string. |
Returns: true if the address is directly connected, otherwise false.
bool is_directly_connected (const IPv6& addr, string& ifname,
string& vifname)
| is_directly_connected |
[const]
Test if an IPv6 address is directly connected to an interface.
If an interface toward an address is down, then the address is not considered as directly connected.
Parameters:
addr | the address to test. |
ifname | the return-by-reference name of the interface toward the address if the address is directly connected otherwise an empty string. |
vifname | the return-by-reference name of the vif toward the address if the address is directly connected otherwise an empty string. |
Returns: true if the address is directly connected, otherwise false.
bool is_directly_connected (const IPvX& addr, string& ifname,
string& vifname)
| is_directly_connected |
[const]
Test if an IPvX address is directly connected to an interface.
If an interface toward an address is down, then the address is not considered as directly connected.
Parameters:
addr | the address to test. |
ifname | the return-by-reference name of the interface toward the address if the address is directly connected otherwise an empty string. |
vifname | the return-by-reference name of the vif toward the address if the address is directly connected otherwise an empty string. |
Returns: true if the address is directly connected, otherwise false.
IfMap _ifs | _ifs |
[protected]
inline void
clear ()
| clear |
[protected]