Kea  1.9.9-git
cfg_hosts_util.h
Go to the documentation of this file.
1 // Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #ifndef CFG_HOSTS_UTIL_H
8 #define CFG_HOSTS_UTIL_H
9 
10 #include <cc/data.h>
11 #include <dhcpsrv/subnet_id.h>
12 
13 namespace isc {
14 namespace dhcp {
15 
18 class CfgHostsList {
19 public:
20 
22  typedef std::map<SubnetID, isc::data::ElementPtr> CfgHostsMap;
23 
30 
35 
37  void add(SubnetID id, isc::data::ElementPtr resv);
38 
44 
45 private:
47  CfgHostsMap map_;
48 };
49 
50 }
51 }
52 
53 #endif // CFG_HOSTS_UTIL_H
std::map< SubnetID, isc::data::ElementPtr > CfgHostsMap
The type of the internal map.
void internalize(isc::data::ConstElementPtr list)
Internalize a list Element.
Utility class to represent host reservation configurations internally as a map keyed by subnet IDs...
boost::shared_ptr< Element > ElementPtr
Definition: data.h:20
void add(SubnetID id, isc::data::ElementPtr resv)
Add a host reservation to the map.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:23
Defines the logger used by the top-level component of kea-dhcp-ddns.
isc::data::ElementPtr externalize() const
Externalize the map to a list Element.
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
Definition: lease.h:24