![]() |
Kea 3.0.0
|
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 > > > > | IfaceContainer |
| Multi index container for network interfaces. | |
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. | |
| 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 490 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 > > > > 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 525 of file iface_mgr.h.
|
inline |
Begin iterator.
Definition at line 530 of file iface_mgr.h.
|
inline |
Clear the collection.
Definition at line 556 of file iface_mgr.h.
|
inline |
Empty predicate.
Definition at line 544 of file iface_mgr.h.
|
inline |
End iterator.
Definition at line 537 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 817 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 812 of file iface_mgr.cc.
References isc::util::MultiThreadingMgr::instance().
|
inline |
Adds an interface to the collection.
The interface is added at the end of sequence.
| iface | reference to Iface object. |
Definition at line 566 of file iface_mgr.h.
|
inline |
Return the number of interfaces.
Definition at line 551 of file iface_mgr.h.