Kea 3.1.1
host_cache_parsers.h
Go to the documentation of this file.
1// Copyright (C) 2020-2025 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 HOST_CACHE_PARSER_H
8#define HOST_CACHE_PARSER_H
9
10#include <host_cache.h>
11#include <cc/data.h>
12#include <cc/simple_parser.h>
13#include <dhcpsrv/host.h>
14#include <container.h>
15
16namespace isc {
17namespace host_cache {
18
21public:
22
28 void parse(HostCache& hcref, const data::ConstElementPtr& config);
29
32
34 static const int64_t MAXIMUM = 1000000000ULL;
35};
36
39public:
40
48};
49
52public:
53
61 auto& entries = entry_list->listValue();
63 for (auto const& entry : entries) {
64 HCEntryParser parser;
65 hosts.push_back(parser.parse(entry));
66 }
67 return (hosts);
68 }
69};
70
71} // end of namespace isc::host_cache
72} // end of namespace isc
73
74#endif
Configuration parser for Host Cache.
static const int64_t MAXIMUM
Absolute maximum number of elements.
static const data::SimpleDefaults HOST_CACHE_DEFAULTS
Defaults for Host Cache configuration.
void parse(HostCache &hcref, const data::ConstElementPtr &config)
Parses Host Cache configuration.
dhcp::HostCollection parse(const data::ConstElementPtr &entry_list)
Parses Host Cache entries.
dhcp::HostPtr parse(const data::ConstElementPtr &entry)
Parses Host Cache entry.
Host Cache implementation.
Definition host_cache.h:35
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
std::vector< SimpleDefault > SimpleDefaults
This specifies all default values in a given scope (e.g. a subnet).
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
Definition host.h:837
std::vector< HostPtr > HostCollection
Collection of the Host objects.
Definition host.h:846
Defines the logger used by the top-level component of kea-lfc.