Kea
1.9.9-git
|
Collection of pointers to network interfaces. More...
#include <iface_mgr.h>
Public Types | |
typedef boost::multi_index_container< IfacePtr, boost::multi_index::indexed_by< boost::multi_index::sequenced<>, boost::multi_index::hashed_unique< boost::multi_index::const_mem_fun< Iface, uint32_t,&Iface::getIndex > >, boost::multi_index::hashed_unique< boost::multi_index::const_mem_fun< Iface, std::string,&Iface::getName > > > > | IfaceContainer |
Multi index container for network interfaces. More... | |
Public Member Functions | |
IfaceContainer::const_iterator | begin () const |
Begin iterator. More... | |
void | clear () |
Clear the collection. More... | |
bool | empty () const |
Empty predicate. More... | |
IfaceContainer::const_iterator | end () const |
End iterator. More... | |
IfacePtr | getIface (uint32_t ifindex) |
Lookup by interface index. More... | |
IfacePtr | getIface (const std::string &ifname) |
Lookup by interface name. More... | |
void | push_back (const IfacePtr &iface) |
Adds an interface to the collection. More... | |
size_t | size () const |
Return the number of interfaces. More... | |
Collection of pointers to network interfaces.
Definition at line 466 of file iface_mgr.h.
typedef boost::multi_index_container< IfacePtr, boost::multi_index::indexed_by< boost::multi_index::sequenced<>, boost::multi_index::hashed_unique< boost::multi_index::const_mem_fun< Iface, uint32_t, &Iface::getIndex > >, boost::multi_index::hashed_unique< boost::multi_index::const_mem_fun< Iface, std::string, &Iface::getName > > > > isc::dhcp::IfaceCollection::IfaceContainer |
Multi index container for network interfaces.
This container allows to search for a network interfaces using three indexes:
Definition at line 501 of file iface_mgr.h.
|
inline |
Begin iterator.
Definition at line 506 of file iface_mgr.h.
|
inline |
Clear the collection.
Definition at line 532 of file iface_mgr.h.
Referenced by isc::dhcp::IfaceMgr::clearIfaces().
|
inline |
Empty predicate.
Definition at line 520 of file iface_mgr.h.
|
inline |
End iterator.
Definition at line 513 of file iface_mgr.h.
IfacePtr isc::dhcp::IfaceCollection::getIface | ( | uint32_t | ifindex | ) |
Lookup by interface index.
ifindex | The index of the interface to find. |
Definition at line 808 of file iface_mgr.cc.
Referenced by isc::dhcp::IfaceMgr::getIface().
IfacePtr isc::dhcp::IfaceCollection::getIface | ( | const std::string & | ifname | ) |
Lookup by interface name.
ifname | The name of the interface to find. |
Definition at line 814 of file iface_mgr.cc.
|
inline |
Adds an interface to the collection.
The interface is added at the end of sequence.
iface | reference to Iface object. |
Definition at line 542 of file iface_mgr.h.
|
inline |
Return the number of interfaces.
Definition at line 527 of file iface_mgr.h.
Referenced by isc::dhcp::IfaceMgr::countIfaces().