Kea  2.3.2-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:24
void add(SubnetID id, isc::data::ElementPtr resv)
Add a host reservation to the map.
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:27
Defines the logger used by the top-level component of kea-lfc.
isc::data::ElementPtr externalize() const
Externalize the map to a list Element.
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Definition: subnet_id.h:24