Kea 2.7.5
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>
34#include <util/optional.h>
35#include <util/str.h>
36
37#include <boost/shared_ptr.hpp>
38#include <vector>
39#include <stdint.h>
40
41namespace isc {
42namespace dhcp {
43
44class CfgMgr;
45
50public:
52 DdnsParams() : subnet_(), d2_client_enabled_(false) {}
53
61 DdnsParams(const ConstSubnet4Ptr& subnet, bool d2_client_enabled)
62 : subnet_(boost::dynamic_pointer_cast<const Subnet>(subnet)),
63 d2_client_enabled_(d2_client_enabled) {}
64
72 DdnsParams(const ConstSubnet6Ptr& subnet, bool d2_client_enabled)
73 : subnet_(boost::dynamic_pointer_cast<const Subnet>(subnet)),
74 d2_client_enabled_(d2_client_enabled) {}
75
82 bool getEnableUpdates() const;
83
88 bool getOverrideNoUpdate() const;
89
94 bool getOverrideClientUpdate() const;
95
101
105 std::string getGeneratedPrefix() const;
106
111 std::string getQualifyingSuffix() const;
112
117 std::string getHostnameCharSet() const;
118
123 std::string getHostnameCharReplacement() const;
124
135
143 bool getUpdateOnRenew() const;
144
152
158 std::string getConflictResolutionMode() const;
159
164 if (subnet_) {
165 return (subnet_->getID());
166 } else {
167 return (0);
168 }
169 }
170
171private:
173 ConstSubnetPtr subnet_;
174
176 bool d2_client_enabled_;
177};
178
180typedef boost::shared_ptr<DdnsParams> DdnsParamsPtr;
181
186public:
189
190
191 static const uint32_t CFGSEL_NONE = 0x00000000;
193 static const uint32_t CFGSEL_SUBNET4 = 0x00000001;
195 static const uint32_t CFGSEL_SUBNET6 = 0x00000002;
197 static const uint32_t CFGSEL_IFACE4 = 0x00000004;
199 static const uint32_t CFGSEL_IFACE6 = 0x00000008;
201 static const uint32_t CFGSEL_DDNS = 0x00000010;
203 static const uint32_t CFGSEL_SUBNET = 0x00000003;
205 static const uint32_t CFGSEL_GLOBALS = 0x00000020;
207 static const uint32_t CFGSEL_CFG_CTL = 0x00000040;
209 static const uint32_t CFGSEL_ALL4 = 0x00000035;
211 static const uint32_t CFGSEL_ALL6 = 0x0000003A;
213 static const uint32_t CFGSEL_ALL = 0xFFFFFFFF;
215
219 SrvConfig();
220
226 SrvConfig(const uint32_t sequence);
227
246 std::string getConfigSummary(const uint32_t selection) const;
247
251 uint32_t getSequence() const {
252 return (sequence_);
253 }
254
265 bool sequenceEquals(const SrvConfig& other);
266
274 return (cfg_iface_);
275 }
276
284 return (cfg_iface_);
285 }
286
295 return (cfg_option_def_);
296 }
297
306 return (cfg_option_def_);
307 }
308
316 return (cfg_option_);
317 }
318
326 return (cfg_option_);
327 }
328
334 return (cfg_subnets4_);
335 }
336
343 return (cfg_shared_networks4_);
344 }
345
352 return (cfg_shared_networks6_);
353 }
354
360 return (cfg_subnets4_);
361 }
362
368 return (cfg_subnets6_);
369 }
370
376 return (cfg_subnets6_);
377 }
378
384 return (cfg_hosts_);
385 }
386
392 return (cfg_hosts_);
393 }
394
401 return (cfg_rsoo_);
402 }
403
409 return (cfg_rsoo_);
410 }
411
418 return (cfg_expiration_);
419 }
420
427 return (cfg_expiration_);
428 }
429
436 return (cfg_duid_);
437 }
438
445 return (cfg_duid_);
446 }
447
454 return (cfg_db_access_);
455 }
456
463 return (cfg_db_access_);
464 }
465
472 return (cfg_host_operations4_);
473 }
474
481 return (cfg_host_operations4_);
482 }
483
490 return (cfg_host_operations6_);
491 }
492
499 return (cfg_host_operations6_);
500 }
501
506 return (cfg_consist_);
507 }
508
513 return (cfg_consist_);
514 }
515
517
523 return (cfg_mac_source_);
524 }
525
531 return (cfg_mac_source_);
532 }
533
538 return (unix_control_socket_);
539 }
540
545 unix_control_socket_ = control_socket;
546 }
547
552 return (http_control_socket_);
553 }
554
559 http_control_socket_ = control_socket;
560 }
561
566 return (dhcp_queue_control_);
567 }
568
572 void setDHCPQueueControl(const isc::data::ConstElementPtr dhcp_queue_control) {
573 dhcp_queue_control_ = dhcp_queue_control;
574 }
575
580 return (dhcp_multi_threading_);
581 }
582
586 void setDHCPMultiThreading(const isc::data::ConstElementPtr dhcp_multi_threading) {
587 dhcp_multi_threading_ = dhcp_multi_threading;
588 }
589
595 return (class_dictionary_);
596 }
597
603 return (class_dictionary_);
604 }
605
610 class_dictionary_ = dictionary;
611 }
612
617 return (hooks_config_);
618 }
619
624 return (hooks_config_);
625 }
626
636 DdnsParamsPtr getDdnsParams(const ConstSubnet4Ptr& subnet) const;
637
647 DdnsParamsPtr getDdnsParams(const ConstSubnet6Ptr& subnet) const;
648
665 void copy(SrvConfig& new_config) const;
666
669
670
679 bool equals(const SrvConfig& other) const;
680
689 bool nequals(const SrvConfig& other) const {
690 return (!equals(other));
691 }
692
701 bool operator==(const SrvConfig& other) const {
702 return (equals(other));
703 }
704
713 bool operator!=(const SrvConfig& other) const {
714 return (nequals(other));
715 }
716
718
773 virtual void merge(ConfigBase& other);
774
780 void updateStatistics();
781
787 void removeStatistics();
788
795 void setDeclinePeriod(const uint32_t decline_timer) {
796 decline_timer_ = decline_timer;
797 }
798
804 uint32_t getDeclinePeriod() const {
805 return (decline_timer_);
806 }
807
814 void setEchoClientId(const bool echo) {
815 echo_v4_client_id_ = echo;
816 }
817
821 bool getEchoClientId() const {
822 return (echo_v4_client_id_);
823 }
824
831 void setDhcp4o6Port(uint16_t port) {
832 dhcp4o6_port_ = port;
833 }
834
840 uint16_t getDhcp4o6Port() const {
841 return (dhcp4o6_port_);
842 }
843
848 return (d2_client_config_);
849 }
850
855 return (d2_client_config_);
856 }
857
861 void setD2ClientConfig(const D2ClientConfigPtr& d2_client_config) {
862 d2_client_config_ = d2_client_config;
863 }
864
872 return (configured_globals_);
873 }
874
882 return (configured_globals_);
883 }
884
891 return (configured_globals_->get(name));
892 }
893
900 return (configured_globals_->get(index));
901 }
902
910 configured_globals_->clear();
911 lenient_option_parsing_ = false;
912 ignore_dhcp_server_identifier_ = false;
913 ignore_rai_link_selection_ = false;
914 exclude_first_last_24_ = false;
915 unix_control_socket_.reset();
916 http_control_socket_.reset();
917 d2_client_config_.reset(new D2ClientConfig());
918 cfg_expiration_.reset(new CfgExpiration());
919 dhcp_multi_threading_.reset();
920 cfg_consist_.reset(new CfgConsistency());
921 cfg_duid_.reset(new CfgDUID());
922 dhcp_queue_control_.reset();
923 }
924
929
932
937 void addConfiguredGlobal(const std::string& name, isc::data::ConstElementPtr value) {
938 configured_globals_->set(name, value);
939 }
940
944 void sanityChecksLifetime(const std::string& name) const;
945
951 void sanityChecksLifetime(const SrvConfig& target_config,
952 const std::string& name) const;
953
963 void setIPReservationsUnique(const bool unique);
964
970 void setReservationsLookupFirst(const bool first) {
971 reservations_lookup_first_ = first;
972 }
973
980 return (reservations_lookup_first_);
981 }
982
986 virtual isc::data::ElementPtr toElement() const;
987
992 void setLenientOptionParsing(bool const value) {
993 lenient_option_parsing_ = value;
994 }
995
1000 return lenient_option_parsing_;
1001 }
1002
1007 void setIgnoreServerIdentifier(bool const value) {
1008 ignore_dhcp_server_identifier_ = value;
1009 }
1010
1015 return (ignore_dhcp_server_identifier_);
1016 }
1017
1022 void setIgnoreRAILinkSelection(bool const value) {
1023 ignore_rai_link_selection_ = value;
1024 }
1025
1030 return ignore_rai_link_selection_;
1031 }
1032
1037 void setExcludeFirstLast24(bool const value) {
1038 exclude_first_last_24_ = value;
1039 }
1040
1045 return exclude_first_last_24_;
1046 }
1047
1055 void configureLowerLevelLibraries() const;
1056
1057private:
1058
1067 void merge4(SrvConfig& other);
1068
1077 void merge6(SrvConfig& other);
1078
1101 void mergeGlobals(SrvConfig& other);
1102
1125 void mergeGlobalMaps(SrvConfig& other);
1126
1128 uint32_t sequence_;
1129
1134 CfgIfacePtr cfg_iface_;
1135
1140 CfgOptionDefPtr cfg_option_def_;
1141
1146 CfgOptionPtr cfg_option_;
1147
1149 CfgSubnets4Ptr cfg_subnets4_;
1150
1152 CfgSubnets6Ptr cfg_subnets6_;
1153
1155 CfgSharedNetworks4Ptr cfg_shared_networks4_;
1156
1158 CfgSharedNetworks6Ptr cfg_shared_networks6_;
1159
1164 CfgHostsPtr cfg_hosts_;
1165
1167 CfgMACSource cfg_mac_source_;
1168
1173 CfgRSOOPtr cfg_rsoo_;
1174
1177 CfgExpirationPtr cfg_expiration_;
1178
1180 CfgDUIDPtr cfg_duid_;
1181
1184 CfgDbAccessPtr cfg_db_access_;
1185
1188 CfgHostOperationsPtr cfg_host_operations4_;
1189
1192 CfgHostOperationsPtr cfg_host_operations6_;
1193
1195 isc::data::ConstElementPtr unix_control_socket_;
1196
1198 isc::config::HttpCommandConfigPtr http_control_socket_;
1199
1201 isc::data::ConstElementPtr dhcp_queue_control_;
1202
1204 isc::data::ConstElementPtr dhcp_multi_threading_;
1205
1207 ClientClassDictionaryPtr class_dictionary_;
1208
1210 isc::hooks::HooksConfig hooks_config_;
1211
1216 uint32_t decline_timer_;
1217
1219 bool echo_v4_client_id_;
1220
1225 uint16_t dhcp4o6_port_;
1226
1228 D2ClientConfigPtr d2_client_config_;
1229
1231 CfgGlobalsPtr configured_globals_;
1232
1234 CfgConsistencyPtr cfg_consist_;
1235
1238
1239
1240 bool lenient_option_parsing_;
1242 bool ignore_dhcp_server_identifier_;
1244 bool ignore_rai_link_selection_;
1246 bool exclude_first_last_24_;
1248
1254 bool reservations_lookup_first_;
1255};
1256
1259
1260
1261typedef boost::shared_ptr<SrvConfig> SrvConfigPtr;
1262
1264typedef boost::shared_ptr<const SrvConfig> ConstSrvConfigPtr;
1266
1267} // namespace dhcp
1268} // namespace isc
1269
1270#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.
ReplaceClientNameMode
Defines the client name replacement modes.
Convenience container for conveying DDNS behavioral parameters It is intended to be created per Packe...
Definition srv_config.h:49
std::string getHostnameCharReplacement() const
Returns the string to replace invalid characters when scrubbing hostnames.
D2ClientConfig::ReplaceClientNameMode getReplaceClientNameMode() const
Returns how Kea should handle the domain-name supplied by the client.
std::string getGeneratedPrefix() const
Returns the Prefix Kea should use when generating domain-names.
util::Optional< double > getTtlPercent() const
Returns percent of lease lifetime to use for TTL.
isc::util::str::StringSanitizerPtr getHostnameSanitizer() const
Returns a regular expression string sanitizer.
std::string getHostnameCharSet() const
Returns the regular expression describing invalid characters for client hostnames.
DdnsParams(const ConstSubnet6Ptr &subnet, bool d2_client_enabled)
Constructor for DHCPv6 subnets.
Definition srv_config.h:72
SubnetID getSubnetId() const
Returns the subnet-id of the subnet associated with these parameters.
Definition srv_config.h:163
std::string getConflictResolutionMode() const
Returns the DDNS config resolution mode for kea-dhcp-ddns.
std::string getQualifyingSuffix() const
Returns the suffix Kea should use when to qualify partial domain-names.
bool getUpdateOnRenew() const
Returns whether or not DNS should be updated when leases renew.
bool getOverrideNoUpdate() const
Returns whether or not Kea should perform updates, even if client requested no updates.
DdnsParams(const ConstSubnet4Ptr &subnet, bool d2_client_enabled)
Constructor for DHCPv4 subnets.
Definition srv_config.h:61
DdnsParams()
Default constructor.
Definition srv_config.h:52
bool getEnableUpdates() const
Returns whether or not DHCP DDNS updating is enabled.
bool getOverrideClientUpdate() const
Returns whether or not Kea should perform updates, even if client requested delegation.
Specifies current DHCP configuration.
Definition srv_config.h:185
const isc::data::ConstElementPtr getUnixControlSocketInfo() const
Returns information about UNIX control socket.
Definition srv_config.h:537
ClientClassDictionaryPtr getClientClassDictionary()
Returns pointer to the dictionary of global client class definitions.
Definition srv_config.h:594
static const uint32_t CFGSEL_SUBNET4
Number of IPv4 subnets.
Definition srv_config.h:193
ConstCfgOptionDefPtr getCfgOptionDef() const
Returns pointer to the const object representing user-defined option definitions.
Definition srv_config.h:305
const ConstCfgOptionPtr getCfgOption() const
Returns pointer to the const object holding options.
Definition srv_config.h:325
void setDhcp4o6Port(uint16_t port)
Sets DHCP4o6 IPC port.
Definition srv_config.h:831
void addConfiguredGlobal(const std::string &name, isc::data::ConstElementPtr value)
Adds a parameter to the collection configured globals.
Definition srv_config.h:937
void setUnixControlSocketInfo(const isc::data::ConstElementPtr &control_socket)
Sets information about the UNIX control socket.
Definition srv_config.h:544
CfgGlobalsPtr getConfiguredGlobals()
Returns non-const pointer to configured global parameters.
Definition srv_config.h:871
ConstCfgGlobalsPtr getConfiguredGlobals() const
Returns const pointer to configured global parameters.
Definition srv_config.h:881
void setLenientOptionParsing(bool const value)
Set lenient option parsing compatibility flag.
Definition srv_config.h:992
bool getReservationsLookupFirst() const
Returns whether the server does host reservations lookup before lease lookup.
Definition srv_config.h:979
const ClientClassDictionaryPtr getClientClassDictionary() const
Returns pointer to const dictionary of global client class definitions.
Definition srv_config.h:602
const D2ClientConfigPtr getD2ClientConfig() const
Returns pointer to const D2 client configuration.
Definition srv_config.h:854
void clearConfiguredGlobals()
Removes all configured global parameters.
Definition srv_config.h:909
void setClientClassDictionary(const ClientClassDictionaryPtr &dictionary)
Sets the client class dictionary.
Definition srv_config.h:609
ConstCfgSubnets6Ptr getCfgSubnets6() const
Returns pointer to const object holding subnets configuration for DHCPv6.
Definition srv_config.h:375
virtual void merge(ConfigBase &other)
Merges the configuration specified as a parameter into this configuration.
void extractConfiguredGlobals(isc::data::ConstElementPtr config)
Saves scalar elements from the global scope of a configuration.
static const uint32_t CFGSEL_ALL
Whole config.
Definition srv_config.h:213
void setIgnoreServerIdentifier(bool const value)
Set ignore DHCP Server Identifier compatibility flag.
ConstCfgDUIDPtr getCfgDUID() const
Returns const pointer to the object holding configuration of the server identifier.
Definition srv_config.h:444
bool nequals(const SrvConfig &other) const
Compares two objects for inequality.
Definition srv_config.h:689
bool operator!=(const SrvConfig &other) const
other An object to be compared with this object.
Definition srv_config.h:713
isc::data::ConstElementPtr getConfiguredGlobal(std::string name) const
Returns pointer to a given configured global parameter.
Definition srv_config.h:890
ConstCfgConsistencyPtr getConsistency() const
Returns const pointer to object holding sanity checks flags.
Definition srv_config.h:512
CfgSharedNetworks6Ptr getCfgSharedNetworks6() const
Returns pointer to non-const object holding configuration of shared networks in DHCPv6.
Definition srv_config.h:351
static const uint32_t CFGSEL_ALL6
IPv6 related config.
Definition srv_config.h:211
bool getIgnoreRAILinkSelection() const
Get ignore RAI Link Selection compatibility flag.
void setD2ClientConfig(const D2ClientConfigPtr &d2_client_config)
Sets the D2 client configuration.
Definition srv_config.h:861
void setHttpControlSocketInfo(const isc::config::HttpCommandConfigPtr &control_socket)
Sets information about the HTTP/HTTPS control socket.
Definition srv_config.h:558
static const uint32_t CFGSEL_NONE
Nothing selected.
Definition srv_config.h:191
void applyDefaultsConfiguredGlobals(const isc::data::SimpleDefaults &defaults)
Applies defaults to global parameters.
void setIPReservationsUnique(const bool unique)
Configures the server to allow or disallow specifying multiple hosts with the same IP address/subnet.
void configureLowerLevelLibraries() const
Convenience method to propagate configuration parameters through inversion of control.
void setIgnoreRAILinkSelection(bool const value)
Set ignore RAI Link Selection compatibility flag.
static const uint32_t CFGSEL_IFACE4
Number of enabled ifaces.
Definition srv_config.h:197
CfgDUIDPtr getCfgDUID()
Returns pointer to the object holding configuration of the server identifier.
Definition srv_config.h:435
bool sequenceEquals(const SrvConfig &other)
Compares configuration sequence with other sequence.
static const uint32_t CFGSEL_GLOBALS
Configured globals.
Definition srv_config.h:205
isc::data::ConstElementPtr getConfiguredGlobal(int index) const
Returns pointer to a given configured global parameter.
Definition srv_config.h:899
CfgConsistencyPtr getConsistency()
Returns non-const pointer to object holding sanity checks flags.
Definition srv_config.h:505
CfgSubnets4Ptr getCfgSubnets4()
Returns pointer to non-const object holding subnets configuration for DHCPv4.
Definition srv_config.h:333
CfgSubnets6Ptr getCfgSubnets6()
Returns pointer to non-const object holding subnets configuration for DHCPv6.
Definition srv_config.h:367
CfgOptionDefPtr getCfgOptionDef()
Return pointer to non-const object representing user-defined option definitions.
Definition srv_config.h:294
uint16_t getDhcp4o6Port() const
Returns DHCP4o6 IPC port.
Definition srv_config.h:840
D2ClientConfigPtr getD2ClientConfig()
Returns pointer to the D2 client configuration.
Definition srv_config.h:847
bool operator==(const SrvConfig &other) const
Equality operator.
Definition srv_config.h:701
CfgRSOOPtr getCfgRSOO()
Returns pointer to the non-const object representing set of RSOO-enabled options.
Definition srv_config.h:400
CfgHostOperationsPtr getCfgHostOperations6()
Returns pointer to the object holding general configuration for host reservations in DHCPv6.
Definition srv_config.h:489
void setReservationsLookupFirst(const bool first)
Sets whether the server does host reservations lookup before lease lookup.
Definition srv_config.h:970
ConstCfgHostOperationsPtr getCfgHostOperations6() const
Returns const pointer to the object holding general configuration for host reservations in DHCPv6.
Definition srv_config.h:498
const isc::data::ConstElementPtr getDHCPMultiThreading() const
Returns DHCP multi threading information.
Definition srv_config.h:579
bool getEchoClientId() const
Returns whether server should send back client-id in DHCPv4.
Definition srv_config.h:821
void setDHCPQueueControl(const isc::data::ConstElementPtr dhcp_queue_control)
Sets information about the dhcp queue control.
Definition srv_config.h:572
isc::config::HttpCommandConfigPtr getHttpControlSocketInfo() const
Returns information about HTTP/HTTPS control socket.
Definition srv_config.h:551
DdnsParamsPtr getDdnsParams(const ConstSubnet4Ptr &subnet) const
Fetches the DDNS parameters for a given DHCPv4 subnet.
void sanityChecksLifetime(const std::string &name) const
Conducts sanity checks on global lifetime parameters.
ConstCfgIfacePtr getCfgIface() const
Returns const pointer to interface configuration.
Definition srv_config.h:283
ConstCfgExpirationPtr getCfgExpiration() const
Returns pointer to the const object holding configuration pertaining to processing expired leases.
Definition srv_config.h:426
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:565
const isc::hooks::HooksConfig & getHooksConfig() const
Returns const reference to configured hooks libraries.
Definition srv_config.h:623
bool equals(const SrvConfig &other) const
Compares two objects for equality.
uint32_t getSequence() const
Returns configuration sequence number.
Definition srv_config.h:251
CfgIfacePtr getCfgIface()
Returns non-const pointer to interface configuration.
Definition srv_config.h:273
static const uint32_t CFGSEL_DDNS
DDNS enabled/disabled.
Definition srv_config.h:201
void setDeclinePeriod(const uint32_t decline_timer)
Sets decline probation-period.
Definition srv_config.h:795
uint32_t getDeclinePeriod() const
Returns probation-period.
Definition srv_config.h:804
void removeStatistics()
Removes statistics.
ConstCfgHostsPtr getCfgHosts() const
Returns pointer to the const objects representing host reservations for different IPv4 and IPv6 subne...
Definition srv_config.h:391
CfgExpirationPtr getCfgExpiration()
Returns pointer to the object holding configuration pertaining to processing expired leases.
Definition srv_config.h:417
const CfgMACSource & getMACSources() const
Returns const reference to an array that stores MAC/hardware address sources.
Definition srv_config.h:530
CfgOptionPtr getCfgOption()
Returns pointer to the non-const object holding options.
Definition srv_config.h:315
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
bool getLenientOptionParsing() const
Get lenient option parsing compatibility flag.
Definition srv_config.h:999
ConstCfgRSOOPtr getCfgRSOO() const
Returns pointer to the const object representing set of RSOO-enabled options.
Definition srv_config.h:408
static const uint32_t CFGSEL_SUBNET6
Number of IPv6 subnets.
Definition srv_config.h:195
bool getExcludeFirstLast24() const
Get exclude .0 and .255 addresses in subnets bigger than /24 flag.
isc::hooks::HooksConfig & getHooksConfig()
Returns non-const reference to configured hooks libraries.
Definition srv_config.h:616
void updateStatistics()
Updates statistics.
ConstCfgDbAccessPtr getCfgDbAccess() const
Returns const pointer to the object holding configuration of the lease and host database connection p...
Definition srv_config.h:462
void setExcludeFirstLast24(bool const value)
Set exclude .0 and .255 addresses in subnets bigger than /24 flag.
static const uint32_t CFGSEL_SUBNET
Number of all subnets.
Definition srv_config.h:203
static const uint32_t CFGSEL_ALL4
IPv4 related config.
Definition srv_config.h:209
void setDHCPMultiThreading(const isc::data::ConstElementPtr dhcp_multi_threading)
Sets information about the dhcp multi threading.
Definition srv_config.h:586
CfgDbAccessPtr getCfgDbAccess()
Returns pointer to the object holding configuration of the lease and host database connection paramet...
Definition srv_config.h:453
void setEchoClientId(const bool echo)
Sets whether server should send back client-id in DHCPv4.
Definition srv_config.h:814
void copy(SrvConfig &new_config) const
Copies the current configuration to a new configuration.
CfgSharedNetworks4Ptr getCfgSharedNetworks4() const
Returns pointer to non-const object holding configuration of shared networks in DHCPv4;.
Definition srv_config.h:342
CfgHostsPtr getCfgHosts()
Returns pointer to the non-const objects representing host reservations for different IPv4 and IPv6 s...
Definition srv_config.h:383
static const uint32_t CFGSEL_IFACE6
Number of v6 ifaces.
Definition srv_config.h:199
bool getIgnoreServerIdentifier() const
Get ignore DHCP Server Identifier compatibility flag.
ConstCfgSubnets4Ptr getCfgSubnets4() const
Returns pointer to const object holding subnets configuration for DHCPv4.
Definition srv_config.h:359
static const uint32_t CFGSEL_CFG_CTL
Config control info.
Definition srv_config.h:207
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:480
CfgHostOperationsPtr getCfgHostOperations4()
Returns pointer to the object holding general configuration for host reservations in DHCPv4.
Definition srv_config.h:471
CfgMACSource & getMACSources()
Returns non-const reference to an array that stores MAC/hardware address sources.
Definition srv_config.h:522
Wrapper class that holds hooks libraries configuration.
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< HttpCommandConfig > HttpCommandConfigPtr
Pointer to a HttpCommandConfig object.
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.
boost::shared_ptr< const CfgHosts > ConstCfgHostsPtr
Const pointer.
Definition cfg_hosts.h:976
boost::shared_ptr< D2ClientConfig > D2ClientConfigPtr
Defines a pointer for D2ClientConfig instances.
boost::shared_ptr< const SrvConfig > ConstSrvConfigPtr
Const pointer to the SrvConfig.
boost::shared_ptr< CfgOption > CfgOptionPtr
Non-const pointer.
Definition cfg_option.h:832
boost::shared_ptr< const Subnet6 > ConstSubnet6Ptr
A const pointer to a Subnet6 object.
Definition subnet.h:623
boost::shared_ptr< const Subnet4 > ConstSubnet4Ptr
A const pointer to a Subnet4 object.
Definition subnet.h:458
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< 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:180
boost::shared_ptr< SrvConfig > SrvConfigPtr
Non-const pointer to the SrvConfig.
boost::shared_ptr< CfgSubnets6 > CfgSubnets6Ptr
Non-const pointer.
boost::shared_ptr< CfgExpiration > CfgExpirationPtr
boost::shared_ptr< CfgGlobals > CfgGlobalsPtr
Non-const shared pointer to a CfgGlobals instance.
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:973
boost::shared_ptr< CfgSubnets4 > CfgSubnets4Ptr
Non-const pointer.
boost::shared_ptr< const CfgSubnets4 > ConstCfgSubnets4Ptr
Const pointer.
boost::shared_ptr< const CfgSubnets6 > ConstCfgSubnets6Ptr
Const pointer.
boost::shared_ptr< CfgConsistency > CfgConsistencyPtr
Type used to for pointing to CfgConsistency structure.
boost::shared_ptr< const Subnet > ConstSubnetPtr
A generic pointer to either const Subnet4 or const Subnet6 object.
Definition subnet.h:452
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:835
std::unique_ptr< StringSanitizer > StringSanitizerPtr
Type representing the pointer to the StringSanitizer.
Definition str.h:263
Defines the logger used by the top-level component of kea-lfc.