Kea 2.5.8
srv_config.h
Go to the documentation of this file.
1// Copyright (C) 2014-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 DHCPSRV_CONFIG_H
8#define DHCPSRV_CONFIG_H
9
10#include <cc/cfg_to_element.h>
12#include <dhcpsrv/cfg_duid.h>
14#include <dhcpsrv/cfg_globals.h>
16#include <dhcpsrv/cfg_hosts.h>
17#include <dhcpsrv/cfg_iface.h>
18#include <dhcpsrv/cfg_option.h>
20#include <dhcpsrv/cfg_rsoo.h>
28#include <process/config_base.h>
29#include <hooks/hooks_config.h>
30#include <cc/data.h>
31#include <cc/user_context.h>
32#include <cc/simple_parser.h>
33#include <util/optional.h>
34#include <util/str.h>
35
36#include <boost/shared_ptr.hpp>
37#include <vector>
38#include <stdint.h>
39
40namespace isc {
41namespace dhcp {
42
43class CfgMgr;
44
49public:
51 DdnsParams() : subnet_(), d2_client_enabled_(false) {};
52
60 DdnsParams(const Subnet4Ptr& subnet, bool d2_client_enabled)
61 : subnet_(boost::dynamic_pointer_cast<Subnet>(subnet)),
62 d2_client_enabled_(d2_client_enabled) {}
63
71 DdnsParams(const Subnet6Ptr& subnet, bool d2_client_enabled)
72 : subnet_(boost::dynamic_pointer_cast<Subnet>(subnet)),
73 d2_client_enabled_(d2_client_enabled) {}
74
81 bool getEnableUpdates() const;
82
87 bool getOverrideNoUpdate() const;
88
93 bool getOverrideClientUpdate() const;
94
100
104 std::string getGeneratedPrefix() const;
105
110 std::string getQualifyingSuffix() const;
111
116 std::string getHostnameCharSet() const;
117
122 std::string getHostnameCharReplacement() const;
123
134
142 bool getUpdateOnRenew() const;
143
151
157 std::string getConflictResolutionMode() const;
158
163 if (subnet_) {
164 return (subnet_->getID());
165 } else {
166 return (0);
167 }
168 }
169
170private:
172 SubnetPtr subnet_;
173
175 bool d2_client_enabled_;
176};
177
179typedef boost::shared_ptr<DdnsParams> DdnsParamsPtr;
180
185public:
188
189
190 static const uint32_t CFGSEL_NONE = 0x00000000;
192 static const uint32_t CFGSEL_SUBNET4 = 0x00000001;
194 static const uint32_t CFGSEL_SUBNET6 = 0x00000002;
196 static const uint32_t CFGSEL_IFACE4 = 0x00000004;
198 static const uint32_t CFGSEL_IFACE6 = 0x00000008;
200 static const uint32_t CFGSEL_DDNS = 0x00000010;
202 static const uint32_t CFGSEL_SUBNET = 0x00000003;
204 static const uint32_t CFGSEL_GLOBALS = 0x00000020;
206 static const uint32_t CFGSEL_CFG_CTL = 0x00000040;
208 static const uint32_t CFGSEL_ALL4 = 0x00000035;
210 static const uint32_t CFGSEL_ALL6 = 0x0000003A;
212 static const uint32_t CFGSEL_ALL = 0xFFFFFFFF;
214
218 SrvConfig();
219
225 SrvConfig(const uint32_t sequence);
226
245 std::string getConfigSummary(const uint32_t selection) const;
246
250 uint32_t getSequence() const {
251 return (sequence_);
252 }
253
264 bool sequenceEquals(const SrvConfig& other);
265
273 return (cfg_iface_);
274 }
275
283 return (cfg_iface_);
284 }
285
294 return (cfg_option_def_);
295 }
296
305 return (cfg_option_def_);
306 }
307
315 return (cfg_option_);
316 }
317
325 return (cfg_option_);
326 }
327
333 return (cfg_subnets4_);
334 }
335
342 return (cfg_shared_networks4_);
343 }
344
351 return (cfg_shared_networks6_);
352 }
353
359 return (cfg_subnets4_);
360 }
361
367 return (cfg_subnets6_);
368 }
369
375 return (cfg_subnets6_);
376 }
377
383 return (cfg_hosts_);
384 }
385
391 return (cfg_hosts_);
392 }
393
400 return (cfg_rsoo_);
401 }
402
408 return (cfg_rsoo_);
409 }
410
417 return (cfg_expiration_);
418 }
419
426 return (cfg_expiration_);
427 }
428
435 return (cfg_duid_);
436 }
437
444 return (cfg_duid_);
445 }
446
453 return (cfg_db_access_);
454 }
455
462 return (cfg_db_access_);
463 }
464
471 return (cfg_host_operations4_);
472 }
473
480 return (cfg_host_operations4_);
481 }
482
489 return (cfg_host_operations6_);
490 }
491
498 return (cfg_host_operations6_);
499 }
500
505 return (cfg_consist_);
506 }
507
512 return (cfg_consist_);
513 }
514
516
522 return (cfg_mac_source_);
523 }
524
530 return (cfg_mac_source_);
531 }
532
537 return (control_socket_);
538 }
539
544 control_socket_ = control_socket;
545 }
546
551 return (dhcp_queue_control_);
552 }
553
557 void setDHCPQueueControl(const isc::data::ConstElementPtr dhcp_queue_control) {
558 dhcp_queue_control_ = dhcp_queue_control;
559 }
560
565 return (dhcp_multi_threading_);
566 }
567
571 void setDHCPMultiThreading(const isc::data::ConstElementPtr dhcp_multi_threading) {
572 dhcp_multi_threading_ = dhcp_multi_threading;
573 }
574
580 return (class_dictionary_);
581 }
582
588 return (class_dictionary_);
589 }
590
595 class_dictionary_ = dictionary;
596 }
597
602 return (hooks_config_);
603 }
604
609 return (hooks_config_);
610 }
611
621 DdnsParamsPtr getDdnsParams(const Subnet4Ptr& subnet) const;
622
632 DdnsParamsPtr getDdnsParams(const Subnet6Ptr& subnet) const;
633
650 void copy(SrvConfig& new_config) const;
651
654
655
664 bool equals(const SrvConfig& other) const;
665
674 bool nequals(const SrvConfig& other) const {
675 return (!equals(other));
676 }
677
686 bool operator==(const SrvConfig& other) const {
687 return (equals(other));
688 }
689
698 bool operator!=(const SrvConfig& other) const {
699 return (nequals(other));
700 }
701
703
758 virtual void merge(ConfigBase& other);
759
765 void updateStatistics();
766
772 void removeStatistics();
773
780 void setDeclinePeriod(const uint32_t decline_timer) {
781 decline_timer_ = decline_timer;
782 }
783
789 uint32_t getDeclinePeriod() const {
790 return (decline_timer_);
791 }
792
799 void setEchoClientId(const bool echo) {
800 echo_v4_client_id_ = echo;
801 }
802
806 bool getEchoClientId() const {
807 return (echo_v4_client_id_);
808 }
809
816 void setDhcp4o6Port(uint16_t port) {
817 dhcp4o6_port_ = port;
818 }
819
825 uint16_t getDhcp4o6Port() const {
826 return (dhcp4o6_port_);
827 }
828
833 return (d2_client_config_);
834 }
835
840 return (d2_client_config_);
841 }
842
846 void setD2ClientConfig(const D2ClientConfigPtr& d2_client_config) {
847 d2_client_config_ = d2_client_config;
848 }
849
857 return (configured_globals_);
858 }
859
867 return (configured_globals_);
868 }
869
876 return (configured_globals_->get(name));
877 }
878
885 return (configured_globals_->get(index));
886 }
887
895 configured_globals_->clear();
896 lenient_option_parsing_ = false;
897 ignore_dhcp_server_identifier_ = false;
898 ignore_rai_link_selection_ = false;
899 exclude_first_last_24_ = false;
900 control_socket_.reset();
901 d2_client_config_.reset(new D2ClientConfig());
902 cfg_expiration_.reset(new CfgExpiration());
903 dhcp_multi_threading_.reset();
904 cfg_consist_.reset(new CfgConsistency());
905 cfg_duid_.reset(new CfgDUID());
906 dhcp_queue_control_.reset();
907 }
908
913
916
921 void addConfiguredGlobal(const std::string& name, isc::data::ConstElementPtr value) {
922 configured_globals_->set(name, value);
923 }
924
928 void sanityChecksLifetime(const std::string& name) const;
929
935 void sanityChecksLifetime(const SrvConfig& target_config,
936 const std::string& name) const;
937
961 static void moveDdnsParams(isc::data::ElementPtr srv_elem);
962
972 void setIPReservationsUnique(const bool unique);
973
979 void setReservationsLookupFirst(const bool first) {
980 reservations_lookup_first_ = first;
981 }
982
989 return (reservations_lookup_first_);
990 }
991
995 virtual isc::data::ElementPtr toElement() const;
996
1001 void setLenientOptionParsing(bool const value) {
1002 lenient_option_parsing_ = value;
1003 }
1004
1009 return lenient_option_parsing_;
1010 }
1011
1016 void setIgnoreServerIdentifier(bool const value) {
1017 ignore_dhcp_server_identifier_ = value;
1018 }
1019
1024 return (ignore_dhcp_server_identifier_);
1025 }
1026
1031 void setIgnoreRAILinkSelection(bool const value) {
1032 ignore_rai_link_selection_ = value;
1033 }
1034
1039 return ignore_rai_link_selection_;
1040 }
1041
1046 void setExcludeFirstLast24(bool const value) {
1047 exclude_first_last_24_ = value;
1048 }
1049
1054 return exclude_first_last_24_;
1055 }
1056
1064 void configureLowerLevelLibraries() const;
1065
1066private:
1067
1076 void merge4(SrvConfig& other);
1077
1086 void merge6(SrvConfig& other);
1087
1110 void mergeGlobals(SrvConfig& other);
1111
1134 void mergeGlobalMaps(SrvConfig& other);
1135
1137 uint32_t sequence_;
1138
1143 CfgIfacePtr cfg_iface_;
1144
1149 CfgOptionDefPtr cfg_option_def_;
1150
1155 CfgOptionPtr cfg_option_;
1156
1158 CfgSubnets4Ptr cfg_subnets4_;
1159
1161 CfgSubnets6Ptr cfg_subnets6_;
1162
1164 CfgSharedNetworks4Ptr cfg_shared_networks4_;
1165
1167 CfgSharedNetworks6Ptr cfg_shared_networks6_;
1168
1173 CfgHostsPtr cfg_hosts_;
1174
1176 CfgMACSource cfg_mac_source_;
1177
1182 CfgRSOOPtr cfg_rsoo_;
1183
1186 CfgExpirationPtr cfg_expiration_;
1187
1189 CfgDUIDPtr cfg_duid_;
1190
1193 CfgDbAccessPtr cfg_db_access_;
1194
1197 CfgHostOperationsPtr cfg_host_operations4_;
1198
1201 CfgHostOperationsPtr cfg_host_operations6_;
1202
1204 isc::data::ConstElementPtr control_socket_;
1205
1207 isc::data::ConstElementPtr dhcp_queue_control_;
1208
1210 isc::data::ConstElementPtr dhcp_multi_threading_;
1211
1213 ClientClassDictionaryPtr class_dictionary_;
1214
1216 isc::hooks::HooksConfig hooks_config_;
1217
1222 uint32_t decline_timer_;
1223
1225 bool echo_v4_client_id_;
1226
1231 uint16_t dhcp4o6_port_;
1232
1234 D2ClientConfigPtr d2_client_config_;
1235
1237 CfgGlobalsPtr configured_globals_;
1238
1240 CfgConsistencyPtr cfg_consist_;
1241
1244
1245
1246 bool lenient_option_parsing_;
1248 bool ignore_dhcp_server_identifier_;
1250 bool ignore_rai_link_selection_;
1252 bool exclude_first_last_24_;
1254
1260 bool reservations_lookup_first_;
1261};
1262
1265
1266
1267typedef boost::shared_ptr<SrvConfig> SrvConfigPtr;
1268
1270typedef boost::shared_ptr<const SrvConfig> ConstSrvConfigPtr;
1272
1273} // namespace dhcp
1274} // namespace isc
1275
1276#endif // DHCPSRV_CONFIG_H
Parameters for various consistency checks.
Holds manual configuration of the server identifier (DUID).
Definition: cfg_duid.h:30
Holds configuration parameters pertaining to lease expiration and lease affinity.
Wrapper class that holds MAC/hardware address sources.
Acts as a storage vault for D2 client configuration.
Definition: d2_client_cfg.h:57
ReplaceClientNameMode
Defines the client name replacement modes.
Definition: d2_client_cfg.h:76
Convenience container for conveying DDNS behavioral parameters It is intended to be created per Packe...
Definition: srv_config.h:48
std::string getHostnameCharReplacement() const
Returns the string to replace invalid characters when scrubbing hostnames.
Definition: srv_config.cc:1093
D2ClientConfig::ReplaceClientNameMode getReplaceClientNameMode() const
Returns how Kea should handle the domain-name supplied by the client.
Definition: srv_config.cc:1057
std::string getGeneratedPrefix() const
Returns the Prefix Kea should use when generating domain-names.
Definition: srv_config.cc:1066
util::Optional< double > getTtlPercent() const
Returns percent of lease lifetime to use for TTL.
Definition: srv_config.cc:1130
isc::util::str::StringSanitizerPtr getHostnameSanitizer() const
Returns a regular expression string sanitizer.
Definition: srv_config.cc:1102
std::string getHostnameCharSet() const
Returns the regular expression describing invalid characters for client hostnames.
Definition: srv_config.cc:1084
SubnetID getSubnetId() const
Returns the subnet-id of the subnet associated with these parameters.
Definition: srv_config.h:162
std::string getConflictResolutionMode() const
Returns the DDNS config resolution mode for kea-dhcp-ddns.
Definition: srv_config.cc:1139
DdnsParams(const Subnet4Ptr &subnet, bool d2_client_enabled)
Constructor for DHPCv4 subnets.
Definition: srv_config.h:60
std::string getQualifyingSuffix() const
Returns the suffix Kea should use when to qualify partial domain-names.
Definition: srv_config.cc:1075
bool getUpdateOnRenew() const
Returns whether or not DNS should be updated when leases renew.
Definition: srv_config.cc:1121
bool getOverrideNoUpdate() const
Returns whether or not Kea should perform updates, even if client requested no updates.
Definition: srv_config.cc:1040
DdnsParams(const Subnet6Ptr &subnet, bool d2_client_enabled)
Constructor for DHPCv6 subnets.
Definition: srv_config.h:71
DdnsParams()
Default constructor.
Definition: srv_config.h:51
bool getEnableUpdates() const
Returns whether or not DHCP DDNS updating is enabled.
Definition: srv_config.cc:1031
bool getOverrideClientUpdate() const
Returns whether or not Kea should perform updates, even if client requested delegation.
Definition: srv_config.cc:1048
Specifies current DHCP configuration.
Definition: srv_config.h:184
ClientClassDictionaryPtr getClientClassDictionary()
Returns pointer to the dictionary of global client class definitions.
Definition: srv_config.h:579
static const uint32_t CFGSEL_SUBNET4
Number of IPv4 subnets.
Definition: srv_config.h:192
ConstCfgOptionDefPtr getCfgOptionDef() const
Returns pointer to the const object representing user-defined option definitions.
Definition: srv_config.h:304
static void moveDdnsParams(isc::data::ElementPtr srv_elem)
Moves deprecated parameters from dhcp-ddns element to global element.
Definition: srv_config.cc:967
const ConstCfgOptionPtr getCfgOption() const
Returns pointer to the const object holding options.
Definition: srv_config.h:324
void setDhcp4o6Port(uint16_t port)
Sets DHCP4o6 IPC port.
Definition: srv_config.h:816
void addConfiguredGlobal(const std::string &name, isc::data::ConstElementPtr value)
Adds a parameter to the collection configured globals.
Definition: srv_config.h:921
CfgGlobalsPtr getConfiguredGlobals()
Returns non-const pointer to configured global parameters.
Definition: srv_config.h:856
ConstCfgGlobalsPtr getConfiguredGlobals() const
Returns const pointer to configured global parameters.
Definition: srv_config.h:866
void setLenientOptionParsing(bool const value)
Set lenient option parsing compatibility flag.
Definition: srv_config.h:1001
bool getReservationsLookupFirst() const
Returns whether the server does host reservations lookup before lease lookup.
Definition: srv_config.h:988
const ClientClassDictionaryPtr getClientClassDictionary() const
Returns pointer to const dictionary of global client class definitions.
Definition: srv_config.h:587
const D2ClientConfigPtr getD2ClientConfig() const
Returns pointer to const D2 client configuration.
Definition: srv_config.h:839
void clearConfiguredGlobals()
Removes all configured global parameters.
Definition: srv_config.h:894
void setClientClassDictionary(const ClientClassDictionaryPtr &dictionary)
Sets the client class dictionary.
Definition: srv_config.h:594
ConstCfgSubnets6Ptr getCfgSubnets6() const
Returns pointer to const object holding subnets configuration for DHCPv6.
Definition: srv_config.h:374
virtual void merge(ConfigBase &other)
Merges the configuration specified as a parameter into this configuration.
Definition: srv_config.cc:179
void extractConfiguredGlobals(isc::data::ConstElementPtr config)
Saves scalar elements from the global scope of a configuration.
Definition: srv_config.cc:509
static const uint32_t CFGSEL_ALL
Whole config.
Definition: srv_config.h:212
void setIgnoreServerIdentifier(bool const value)
Set ignore DHCP Server Identifier compatibility flag.
Definition: srv_config.h:1016
ConstCfgDUIDPtr getCfgDUID() const
Returns const pointer to the object holding configuration of the server identifier.
Definition: srv_config.h:443
bool nequals(const SrvConfig &other) const
Compares two objects for inequality.
Definition: srv_config.h:674
bool operator!=(const SrvConfig &other) const
other An object to be compared with this object.
Definition: srv_config.h:698
isc::data::ConstElementPtr getConfiguredGlobal(std::string name) const
Returns pointer to a given configured global parameter.
Definition: srv_config.h:875
ConstCfgConsistencyPtr getConsistency() const
Returns const pointer to object holding sanity checks flags.
Definition: srv_config.h:511
CfgSharedNetworks6Ptr getCfgSharedNetworks6() const
Returns pointer to non-const object holding configuration of shared networks in DHCPv6.
Definition: srv_config.h:350
static const uint32_t CFGSEL_ALL6
IPv6 related config.
Definition: srv_config.h:210
bool getIgnoreRAILinkSelection() const
Get ignore RAI Link Selection compatibility flag.
Definition: srv_config.h:1038
void setD2ClientConfig(const D2ClientConfigPtr &d2_client_config)
Sets the D2 client configuration.
Definition: srv_config.h:846
static const uint32_t CFGSEL_NONE
Nothing selected.
Definition: srv_config.h:190
void applyDefaultsConfiguredGlobals(const isc::data::SimpleDefaults &defaults)
Applies defaults to global parameters.
Definition: srv_config.cc:439
void setIPReservationsUnique(const bool unique)
Configures the server to allow or disallow specifying multiple hosts with the same IP address/subnet.
Definition: srv_config.cc:1017
void configureLowerLevelLibraries() const
Convenience method to propagate configuration parameters through inversion of control.
Definition: srv_config.cc:1026
void setIgnoreRAILinkSelection(bool const value)
Set ignore RAI Link Selection compatibility flag.
Definition: srv_config.h:1031
static const uint32_t CFGSEL_IFACE4
Number of enabled ifaces.
Definition: srv_config.h:196
CfgDUIDPtr getCfgDUID()
Returns pointer to the object holding configuration of the server identifier.
Definition: srv_config.h:434
bool sequenceEquals(const SrvConfig &other)
Compares configuration sequence with other sequence.
Definition: srv_config.cc:127
static const uint32_t CFGSEL_GLOBALS
Configured globals.
Definition: srv_config.h:204
isc::data::ConstElementPtr getConfiguredGlobal(int index) const
Returns pointer to a given configured global parameter.
Definition: srv_config.h:884
CfgConsistencyPtr getConsistency()
Returns non-const pointer to object holding sanity checks flags.
Definition: srv_config.h:504
CfgSubnets4Ptr getCfgSubnets4()
Returns pointer to non-const object holding subnets configuration for DHCPv4.
Definition: srv_config.h:332
CfgSubnets6Ptr getCfgSubnets6()
Returns pointer to non-const object holding subnets configuration for DHCPv6.
Definition: srv_config.h:366
CfgOptionDefPtr getCfgOptionDef()
Return pointer to non-const object representing user-defined option definitions.
Definition: srv_config.h:293
uint16_t getDhcp4o6Port() const
Returns DHCP4o6 IPC port.
Definition: srv_config.h:825
D2ClientConfigPtr getD2ClientConfig()
Returns pointer to the D2 client configuration.
Definition: srv_config.h:832
bool operator==(const SrvConfig &other) const
Equality operator.
Definition: srv_config.h:686
CfgRSOOPtr getCfgRSOO()
Returns pointer to the non-const object representing set of RSOO-enabled options.
Definition: srv_config.h:399
CfgHostOperationsPtr getCfgHostOperations6()
Returns pointer to the object holding general configuration for host reservations in DHCPv6.
Definition: srv_config.h:488
void setReservationsLookupFirst(const bool first)
Sets whether the server does host reservations lookup before lease lookup.
Definition: srv_config.h:979
ConstCfgHostOperationsPtr getCfgHostOperations6() const
Returns const pointer to the object holding general configuration for host reservations in DHCPv6.
Definition: srv_config.h:497
const isc::data::ConstElementPtr getDHCPMultiThreading() const
Returns DHCP multi threading information.
Definition: srv_config.h:564
bool getEchoClientId() const
Returns whether server should send back client-id in DHCPv4.
Definition: srv_config.h:806
void setDHCPQueueControl(const isc::data::ConstElementPtr dhcp_queue_control)
Sets information about the dhcp queue control.
Definition: srv_config.h:557
void sanityChecksLifetime(const std::string &name) const
Conducts sanity checks on global lifetime parameters.
Definition: srv_config.cc:524
ConstCfgIfacePtr getCfgIface() const
Returns const pointer to interface configuration.
Definition: srv_config.h:282
ConstCfgExpirationPtr getCfgExpiration() const
Returns pointer to the const object holding configuration pertaining to processing expired leases.
Definition: srv_config.h:425
std::string getConfigSummary(const uint32_t selection) const
Returns summary of the configuration in the textual format.
Definition: srv_config.cc:86
const isc::data::ConstElementPtr getDHCPQueueControl() const
Returns DHCP queue control information.
Definition: srv_config.h:550
const isc::hooks::HooksConfig & getHooksConfig() const
Returns const reference to configured hooks libraries.
Definition: srv_config.h:608
bool equals(const SrvConfig &other) const
Compares two objects for equality.
Definition: srv_config.cc:153
uint32_t getSequence() const
Returns configuration sequence number.
Definition: srv_config.h:250
CfgIfacePtr getCfgIface()
Returns non-const pointer to interface configuration.
Definition: srv_config.h:272
static const uint32_t CFGSEL_DDNS
DDNS enabled/disabled.
Definition: srv_config.h:200
void setDeclinePeriod(const uint32_t decline_timer)
Sets decline probation-period.
Definition: srv_config.h:780
uint32_t getDeclinePeriod() const
Returns probation-period.
Definition: srv_config.h:789
void removeStatistics()
Removes statistics.
Definition: srv_config.cc:395
ConstCfgHostsPtr getCfgHosts() const
Returns pointer to the const objects representing host reservations for different IPv4 and IPv6 subne...
Definition: srv_config.h:390
CfgExpirationPtr getCfgExpiration()
Returns pointer to the object holding configuration pertaining to processing expired leases.
Definition: srv_config.h:416
const CfgMACSource & getMACSources() const
Returns const reference to an array that stores MAC/hardware address sources.
Definition: srv_config.h:529
CfgOptionPtr getCfgOption()
Returns pointer to the non-const object holding options.
Definition: srv_config.h:314
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
Definition: srv_config.cc:713
bool getLenientOptionParsing() const
Get lenient option parsing compatibility flag.
Definition: srv_config.h:1008
ConstCfgRSOOPtr getCfgRSOO() const
Returns pointer to the const object representing set of RSOO-enabled options.
Definition: srv_config.h:407
static const uint32_t CFGSEL_SUBNET6
Number of IPv6 subnets.
Definition: srv_config.h:194
bool getExcludeFirstLast24() const
Get exclude .0 and .255 addresses in subnets bigger than /24 flag.
Definition: srv_config.h:1053
isc::hooks::HooksConfig & getHooksConfig()
Returns non-const reference to configured hooks libraries.
Definition: srv_config.h:601
void updateStatistics()
Updates statistics.
Definition: srv_config.cc:402
ConstCfgDbAccessPtr getCfgDbAccess() const
Returns const pointer to the object holding configuration of the lease and host database connection p...
Definition: srv_config.h:461
void setExcludeFirstLast24(bool const value)
Set exclude .0 and .255 addresses in subnets bigger than /24 flag.
Definition: srv_config.h:1046
static const uint32_t CFGSEL_SUBNET
Number of all subnets.
Definition: srv_config.h:202
static const uint32_t CFGSEL_ALL4
IPv4 related config.
Definition: srv_config.h:208
void setDHCPMultiThreading(const isc::data::ConstElementPtr dhcp_multi_threading)
Sets information about the dhcp multi threading.
Definition: srv_config.h:571
CfgDbAccessPtr getCfgDbAccess()
Returns pointer to the object holding configuration of the lease and host database connection paramet...
Definition: srv_config.h:452
void setEchoClientId(const bool echo)
Sets whether server should send back client-id in DHCPv4.
Definition: srv_config.h:799
void copy(SrvConfig &new_config) const
Copies the current configuration to a new configuration.
Definition: srv_config.cc:132
CfgSharedNetworks4Ptr getCfgSharedNetworks4() const
Returns pointer to non-const object holding configuration of shared networks in DHCPv4;.
Definition: srv_config.h:341
CfgHostsPtr getCfgHosts()
Returns pointer to the non-const objects representing host reservations for different IPv4 and IPv6 s...
Definition: srv_config.h:382
void setControlSocketInfo(const isc::data::ConstElementPtr &control_socket)
Sets information about the control socket.
Definition: srv_config.h:543
static const uint32_t CFGSEL_IFACE6
Number of v6 ifaces.
Definition: srv_config.h:198
bool getIgnoreServerIdentifier() const
Get ignore DHCP Server Identifier compatibility flag.
Definition: srv_config.h:1023
ConstCfgSubnets4Ptr getCfgSubnets4() const
Returns pointer to const object holding subnets configuration for DHCPv4.
Definition: srv_config.h:358
static const uint32_t CFGSEL_CFG_CTL
Config control info.
Definition: srv_config.h:206
const isc::data::ConstElementPtr getControlSocketInfo() const
Returns information about control socket.
Definition: srv_config.h:536
DdnsParamsPtr getDdnsParams(const Subnet4Ptr &subnet) const
Fetches the DDNS parameters for a given DHCPv4 subnet.
Definition: srv_config.cc:955
SrvConfig()
Default constructor.
Definition: srv_config.cc:45
ConstCfgHostOperationsPtr getCfgHostOperations4() const
Returns const pointer to the object holding general configuration for host reservations in DHCPv4.
Definition: srv_config.h:479
CfgHostOperationsPtr getCfgHostOperations4()
Returns pointer to the object holding general configuration for host reservations in DHCPv4.
Definition: srv_config.h:470
CfgMACSource & getMACSources()
Returns non-const reference to an array that stores MAC/hardware address sources.
Definition: srv_config.h:521
Wrapper class that holds hooks libraries configuration.
Definition: hooks_config.h:36
Base class for all configurations.
Definition: config_base.h:33
A template representing an optional value.
Definition: optional.h:36
Defines classes for storing client class definitions.
Defines the D2ClientConfig class.
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< Element > ElementPtr
Definition: data.h:28
boost::shared_ptr< const CfgOptionDef > ConstCfgOptionDefPtr
Const pointer.
boost::shared_ptr< CfgDUID > CfgDUIDPtr
Pointer to the Non-const object.
Definition: cfg_duid.h:161
boost::shared_ptr< CfgHostOperations > CfgHostOperationsPtr
Pointer to the Non-const object.
boost::shared_ptr< const CfgDUID > ConstCfgDUIDPtr
Pointer to the const object.
Definition: cfg_duid.h:164
boost::shared_ptr< const CfgGlobals > ConstCfgGlobalsPtr
Const shared pointer to a CfgGlobals instance.
Definition: cfg_globals.h:171
boost::shared_ptr< Subnet > SubnetPtr
A generic pointer to either Subnet4 or Subnet6 object.
Definition: subnet.h:489
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
Definition: subnet.h:498
boost::shared_ptr< const CfgHosts > ConstCfgHostsPtr
Const pointer.
Definition: cfg_hosts.h:944
boost::shared_ptr< D2ClientConfig > D2ClientConfigPtr
Defines a pointer for D2ClientConfig instances.
boost::shared_ptr< const SrvConfig > ConstSrvConfigPtr
Const pointer to the SrvConfig.
Definition: srv_config.h:1270
boost::shared_ptr< CfgOption > CfgOptionPtr
Non-const pointer.
Definition: cfg_option.h:803
boost::shared_ptr< CfgOptionDef > CfgOptionDefPtr
Non-const pointer.
boost::shared_ptr< CfgDbAccess > CfgDbAccessPtr
A pointer to the CfgDbAccess.
boost::shared_ptr< const CfgExpiration > ConstCfgExpirationPtr
Pointer to the const object.
boost::shared_ptr< const CfgIface > ConstCfgIfacePtr
A pointer to the const CfgIface.
Definition: cfg_iface.h:504
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
Definition: subnet.h:663
boost::shared_ptr< const CfgDbAccess > ConstCfgDbAccessPtr
A pointer to the const CfgDbAccess.
boost::shared_ptr< const CfgRSOO > ConstCfgRSOOPtr
Pointer to the const object.
Definition: cfg_rsoo.h:74
boost::shared_ptr< const CfgHostOperations > ConstCfgHostOperationsPtr
Pointer to the const object.
boost::shared_ptr< CfgIface > CfgIfacePtr
A pointer to the CfgIface .
Definition: cfg_iface.h:501
boost::shared_ptr< DdnsParams > DdnsParamsPtr
Defines a pointer for DdnsParams instances.
Definition: srv_config.h:179
boost::shared_ptr< SrvConfig > SrvConfigPtr
Non-const pointer to the SrvConfig.
Definition: srv_config.h:1267
boost::shared_ptr< CfgSubnets6 > CfgSubnets6Ptr
Non-const pointer.
Definition: cfg_subnets6.h:348
boost::shared_ptr< CfgExpiration > CfgExpirationPtr
boost::shared_ptr< CfgGlobals > CfgGlobalsPtr
Non-const shared pointer to a CfgGlobals instance.
Definition: cfg_globals.h:168
boost::shared_ptr< ClientClassDictionary > ClientClassDictionaryPtr
Defines a pointer to a ClientClassDictionary.
boost::shared_ptr< CfgSharedNetworks6 > CfgSharedNetworks6Ptr
Pointer to the configuration of IPv6 shared networks.
uint32_t SubnetID
Defines unique IPv4 or IPv6 subnet identifier.
Definition: subnet_id.h:25
boost::shared_ptr< CfgHosts > CfgHostsPtr
Non-const pointer.
Definition: cfg_hosts.h:941
boost::shared_ptr< CfgSubnets4 > CfgSubnets4Ptr
Non-const pointer.
Definition: cfg_subnets4.h:350
boost::shared_ptr< const CfgSubnets4 > ConstCfgSubnets4Ptr
Const pointer.
Definition: cfg_subnets4.h:353
boost::shared_ptr< const CfgSubnets6 > ConstCfgSubnets6Ptr
Const pointer.
Definition: cfg_subnets6.h:351
boost::shared_ptr< CfgConsistency > CfgConsistencyPtr
Type used to for pointing to CfgConsistency structure.
boost::shared_ptr< CfgSharedNetworks4 > CfgSharedNetworks4Ptr
Pointer to the configuration of IPv4 shared networks.
boost::shared_ptr< CfgRSOO > CfgRSOOPtr
Pointer to the Non-const object.
Definition: cfg_rsoo.h:71
boost::shared_ptr< const CfgConsistency > ConstCfgConsistencyPtr
Type used to for pointing to const CfgConsistency structure.
boost::shared_ptr< const CfgOption > ConstCfgOptionPtr
Const pointer.
Definition: cfg_option.h:806
std::unique_ptr< StringSanitizer > StringSanitizerPtr
Type representing the pointer to the StringSanitizer.
Definition: str.h:262
Defines the logger used by the top-level component of kea-lfc.