![]() |
Kea
1.5.0
|
This class holds configuration of shared networks. More...
#include <cfg_shared_networks.h>
Inheritance diagram for isc::dhcp::CfgSharedNetworks< SharedNetworkPtrType, SharedNetworkCollection >:Public Member Functions | |
| void | add (const SharedNetworkPtrType &network) |
| Adds new shared network to the configuration. More... | |
| void | del (const std::string &name) |
| Deletes shared network from the configuration. More... | |
| SharedNetworkPtrType | getByName (const std::string &name) const |
| Retrieves shared network by name. More... | |
| virtual data::ElementPtr | toElement () const |
| Unparses shared networks configuration. More... | |
Public Member Functions inherited from isc::data::CfgToElement | |
| virtual | ~CfgToElement () |
| Destructor. More... | |
Protected Attributes | |
| SharedNetworkCollection | networks_ |
| Multi index container holding shared networks. More... | |
This class holds configuration of shared networks.
This is a generic class implementing basic functions such as shared network addition, removal and retrieval. It also dumps configuration in the JSON format.
There are specializations of this class implemented as CfgSharedNetworks4 and CfgSharedNetworks6 for IPv4 and IPv6 cases repspectively.
| Type | of the pointer to a shared network, i.e. SharedNetwork4Ptr or SharedNetwork6Ptr. |
Definition at line 34 of file cfg_shared_networks.h.
|
inline |
Adds new shared network to the configuration.
| network | Pointer to a network |
| isc::BadValue | when name is a duplicate of existing network's name. |
Definition at line 43 of file cfg_shared_networks.h.
|
inline |
Deletes shared network from the configuration.
| name | Name of the network to be deleted. |
| isc::BadValue | if the network can't be found. |
Definition at line 57 of file cfg_shared_networks.h.
|
inline |
Retrieves shared network by name.
| name | Name of the network to be retrieved. |
Definition at line 78 of file cfg_shared_networks.h.
Referenced by isc::dhcp::CfgSharedNetworks< SharedNetwork6Ptr, SharedNetwork6Collection >::add().
|
inlinevirtual |
Unparses shared networks configuration.
Implements isc::data::CfgToElement.
Definition at line 91 of file cfg_shared_networks.h.
|
protected |
Multi index container holding shared networks.
Definition at line 106 of file cfg_shared_networks.h.
Referenced by isc::dhcp::CfgSharedNetworks< SharedNetwork6Ptr, SharedNetwork6Collection >::add(), isc::dhcp::CfgSharedNetworks< SharedNetwork6Ptr, SharedNetwork6Collection >::del(), isc::dhcp::CfgSharedNetworks< SharedNetwork6Ptr, SharedNetwork6Collection >::getByName(), and isc::dhcp::CfgSharedNetworks< SharedNetwork6Ptr, SharedNetwork6Collection >::toElement().