![]() |
Kea 3.2.0-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, unsigned int, &Iface::getIndex > >, boost::multi_index::hashed_unique< boost::multi_index::const_mem_fun< Iface, std::string, &Iface::getName > >, boost::multi_index::sequenced<> > > | IfaceContainer |
| Multi index container for network interfaces. | |
| typedef IfaceContainer::nth_index< 3 >::type | LruIndex |
| Type of LRU index. | |
| typedef LruIndex::iterator | LruIterator |
| Type of LRU iterator. | |
Public Member Functions | |
| IfaceContainer::const_iterator | begin () const |
| Begin iterator. | |
| void | clear () |
| Clear the collection. | |
| bool | empty () const |
| Empty predicate. | |
| IfaceContainer::const_iterator | end () const |
| End iterator. | |
| IfacePtr | getIface (const std::string &ifname) |
| Lookup by interface name. | |
| IfacePtr | getIface (const unsigned int ifindex) |
| Lookup by interface index. | |
| LruIndex & | getLru () |
| LRU index. | |
| void | push_back (const IfacePtr &iface) |
| Adds an interface to the collection. | |
| size_t | size () const |
| Return the number of interfaces. | |
Collection of pointers to network interfaces.
Definition at line 558 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, unsigned int, &Iface::getIndex > >, boost::multi_index::hashed_unique< boost::multi_index::const_mem_fun< Iface, std::string, &Iface::getName > >, boost::multi_index::sequenced<> > > 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 596 of file iface_mgr.h.
| typedef IfaceContainer::nth_index<3>::type isc::dhcp::IfaceCollection::LruIndex |
Type of LRU index.
Definition at line 613 of file iface_mgr.h.
| typedef LruIndex::iterator isc::dhcp::IfaceCollection::LruIterator |
Type of LRU iterator.
Definition at line 623 of file iface_mgr.h.
|
inline |
Begin iterator.
Definition at line 601 of file iface_mgr.h.
|
inline |
Clear the collection.
Definition at line 640 of file iface_mgr.h.
|
inline |
Empty predicate.
Definition at line 628 of file iface_mgr.h.
|
inline |
End iterator.
Definition at line 608 of file iface_mgr.h.
| IfacePtr isc::dhcp::IfaceCollection::getIface | ( | const std::string & | ifname | ) |
Lookup by interface name.
| ifname | The name of the interface to find. |
Definition at line 875 of file iface_mgr.cc.
References isc::util::MultiThreadingMgr::instance().
| IfacePtr isc::dhcp::IfaceCollection::getIface | ( | const unsigned int | ifindex | ) |
Lookup by interface index.
| ifindex | The index of the interface to find. |
Definition at line 870 of file iface_mgr.cc.
References isc::util::MultiThreadingMgr::instance().
|
inline |
|
inline |
Adds an interface to the collection.
The interface is added at the end of sequence.
| iface | reference to Iface object. |
Definition at line 650 of file iface_mgr.h.
|
inline |
Return the number of interfaces.
Definition at line 635 of file iface_mgr.h.
Referenced by isc::dhcp::ControlledDhcpv4Srv::commandInterfaceListHandler(), and isc::dhcp::ControlledDhcpv6Srv::commandInterfaceListHandler().