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
16
namespace
isc
{
17
namespace
host_cache
{
18
20
class
HCConfigParser
:
public
data::SimpleParser
{
21
public
:
22
28
void
parse
(
HostCache
& hcref,
const
data::ConstElementPtr
&
config
);
29
31
static
const
data::SimpleDefaults
HOST_CACHE_DEFAULTS
;
32
34
static
const
int64_t
MAXIMUM
= 1000000000ULL;
35
};
36
38
class
HCEntryParser
:
public
data::SimpleParser
{
39
public
:
40
47
dhcp::HostPtr
parse
(
const
data::ConstElementPtr
& entry);
48
};
49
51
class
HCEntryListParser
:
public
data::SimpleParser
{
52
public
:
53
60
dhcp::HostCollection
parse
(
const
data::ConstElementPtr
& entry_list) {
61
auto
& entries = entry_list->listValue();
62
dhcp::HostCollection
hosts;
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
isc::data::SimpleParser
A simple parser.
Definition
lib/cc/simple_parser.h:68
isc::host_cache::HCConfigParser
Configuration parser for Host Cache.
Definition
host_cache_parsers.h:20
isc::host_cache::HCConfigParser::MAXIMUM
static const int64_t MAXIMUM
Absolute maximum number of elements.
Definition
host_cache_parsers.h:34
isc::host_cache::HCConfigParser::HOST_CACHE_DEFAULTS
static const data::SimpleDefaults HOST_CACHE_DEFAULTS
Defaults for Host Cache configuration.
Definition
host_cache_parsers.h:31
isc::host_cache::HCConfigParser::parse
void parse(HostCache &hcref, const data::ConstElementPtr &config)
Parses Host Cache configuration.
Definition
host_cache_parsers.cc:30
isc::host_cache::HCEntryListParser
Host cache content parser.
Definition
host_cache_parsers.h:51
isc::host_cache::HCEntryListParser::parse
dhcp::HostCollection parse(const data::ConstElementPtr &entry_list)
Parses Host Cache entries.
Definition
host_cache_parsers.h:60
isc::host_cache::HCEntryParser
Host cache entry parser.
Definition
host_cache_parsers.h:38
isc::host_cache::HCEntryParser::parse
dhcp::HostPtr parse(const data::ConstElementPtr &entry)
Parses Host Cache entry.
Definition
host_cache_parsers.cc:62
isc::host_cache::HostCache
Host Cache implementation.
Definition
host_cache.h:35
container.h
data.h
host.h
host_cache.h
simple_parser.h
isc::config
Definition
command_interpreter.cc:23
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition
data.h:29
isc::data::SimpleDefaults
std::vector< SimpleDefault > SimpleDefaults
This specifies all default values in a given scope (e.g. a subnet).
Definition
lib/cc/simple_parser.h:39
isc::dhcp::HostPtr
boost::shared_ptr< Host > HostPtr
Pointer to the Host object.
Definition
host.h:837
isc::dhcp::HostCollection
std::vector< HostPtr > HostCollection
Collection of the Host objects.
Definition
host.h:846
isc::host_cache
Definition
container.h:22
isc
Defines the logger used by the top-level component of kea-lfc.
Definition
agent_parser.cc:148
src
hooks
dhcp
host_cache
host_cache_parsers.h
Generated on Fri Aug 29 2025 13:13:10 for Kea by
1.13.2