Kea 2.7.5
base_network_parser.h
Go to the documentation of this file.
1// Copyright (C) 2019-2024 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 BASE_NETWORK_PARSER_H
8#define BASE_NETWORK_PARSER_H
9
10#include <cc/data.h>
11#include <cc/simple_parser.h>
12#include <dhcpsrv/cfg_globals.h>
13#include <dhcpsrv/network.h>
14
15namespace isc {
16namespace dhcp {
17
21protected:
22
38 void parseCommon(const data::ConstElementPtr& network_data,
39 NetworkPtr& network);
40
55 void parseTeePercents(const data::ConstElementPtr& network_data,
56 NetworkPtr& network);
57
71 void parseCacheParams(const data::ConstElementPtr& network_data,
72 NetworkPtr& network);
73
92 void parseDdnsParams(const data::ConstElementPtr& network_data,
93 NetworkPtr& network);
94
104 void parseAllocatorParams(const data::ConstElementPtr& network_data,
105 NetworkPtr& network);
106
117 void parsePdAllocatorParams(const data::ConstElementPtr& network_data,
118 Network6Ptr& network);
119
127 void parseOfferLft(const data::ConstElementPtr& network_data,
128 Network4Ptr& network);
129public:
130 typedef std::function<void(const isc::dhcp::ClientClass&)> ClassAdderFunc;
131
140 ClassAdderFunc adder_func);
141
149 ClassAdderFunc adder_func);
150};
151
152} // end of namespace isc::dhcp
153} // end of namespace isc
154
155#endif
Common configuration parser for shared networks and subnets.
void parseCacheParams(const data::ConstElementPtr &network_data, NetworkPtr &network)
Parses parameters related to lease cache settings.
void parseAllocatorParams(const data::ConstElementPtr &network_data, NetworkPtr &network)
Parses parameters pertaining to allocator selection.
static void getClientClassesElem(data::ConstElementPtr params, ClassAdderFunc adder_func)
Fetches the element for either 'client-classes' or deprecated 'client-class'.
void parseDdnsParams(const data::ConstElementPtr &network_data, NetworkPtr &network)
Parses parameters pertaining to DDNS behavior.
void parseCommon(const data::ConstElementPtr &network_data, NetworkPtr &network)
Parses common parameters.
static void getAdditionalClassesElem(data::ConstElementPtr params, ClassAdderFunc adder_func)
Fetches the element for either 'evaluate-additional-classes' or deprecated 'require-client-classes'.
void parseTeePercents(const data::ConstElementPtr &network_data, NetworkPtr &network)
Parses parameters related to "percent" timers settings.
void parsePdAllocatorParams(const data::ConstElementPtr &network_data, Network6Ptr &network)
Parses parameters pertaining to prefix delegation allocator selection.
std::function< void(const isc::dhcp::ClientClass &) ClassAdderFunc)
void parseOfferLft(const data::ConstElementPtr &network_data, Network4Ptr &network)
Parses offer-lifetime parameter (v4 only)
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
std::string ClientClass
Defines a single class name.
Definition classify.h:43
boost::shared_ptr< Network4 > Network4Ptr
Pointer to the Network4 object.
Definition network.h:1416
boost::shared_ptr< Network6 > Network6Ptr
Pointer to the Network6 object.
Definition network.h:1421
boost::shared_ptr< Network > NetworkPtr
Pointer to the Network object.
Definition network.h:73
Defines the logger used by the top-level component of kea-lfc.