Kea 2.7.5
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
13namespace isc {
14namespace dhcp {
15
19public:
20
22 typedef std::map<SubnetID, isc::data::ElementPtr> CfgHostsMap;
23
30
35
37 void add(SubnetID id, isc::data::ElementPtr resv);
38
44
45private:
47 CfgHostsMap map_;
48};
49
50}
51}
52
53#endif // CFG_HOSTS_UTIL_H
Utility class to represent host reservation configurations internally as a map keyed by subnet IDs,...
std::map< SubnetID, isc::data::ElementPtr > CfgHostsMap
The type of the internal map.
isc::data::ConstElementPtr get(SubnetID id) const
Return the host reservations for a subnet ID.
void internalize(isc::data::ConstElementPtr list)
Internalize a list Element.
void add(SubnetID id, isc::data::ElementPtr resv)
Add a host reservation to the map.
isc::data::ElementPtr externalize() const
Externalize the map to a list Element.
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
boost::shared_ptr< Element > ElementPtr
Definition data.h:28
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Definition subnet_id.h:25
Defines the logger used by the top-level component of kea-lfc.