Kea 2.7.6
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
160
168
176
182 std::string getConflictResolutionMode() const;
183
188 if (subnet_) {
189 return (subnet_->getID());
190 } else {
191 return (0);
192 }
193 }
194
195private:
197 ConstSubnetPtr subnet_;
198
200 bool d2_client_enabled_;
201};
202
204typedef boost::shared_ptr<DdnsParams> DdnsParamsPtr;
205
210public:
213
214
215 static const uint32_t CFGSEL_NONE = 0x00000000;
217 static const uint32_t CFGSEL_SUBNET4 = 0x00000001;
219 static const uint32_t CFGSEL_SUBNET6 = 0x00000002;
221 static const uint32_t CFGSEL_IFACE4 = 0x00000004;
223 static const uint32_t CFGSEL_IFACE6 = 0x00000008;
225 static const uint32_t CFGSEL_DDNS = 0x00000010;
227 static const uint32_t CFGSEL_SUBNET = 0x00000003;
229 static const uint32_t CFGSEL_GLOBALS = 0x00000020;
231 static const uint32_t CFGSEL_CFG_CTL = 0x00000040;
233 static const uint32_t CFGSEL_ALL4 = 0x00000035;
235 static const uint32_t CFGSEL_ALL6 = 0x0000003A;
237 static const uint32_t CFGSEL_ALL = 0xFFFFFFFF;
239
243 SrvConfig();
244
250 SrvConfig(const uint32_t sequence);
251
270 std::string getConfigSummary(const uint32_t selection) const;
271
275 uint32_t getSequence() const {
276 return (sequence_);
277 }
278
289 bool sequenceEquals(const SrvConfig& other);
290
298 return (cfg_iface_);
299 }
300
308 return (cfg_iface_);
309 }
310
319 return (cfg_option_def_);
320 }
321
330 return (cfg_option_def_);
331 }
332
340 return (cfg_option_);
341 }
342
350 return (cfg_option_);
351 }
352
358 return (cfg_subnets4_);
359 }
360
367 return (cfg_shared_networks4_);
368 }
369
376 return (cfg_shared_networks6_);
377 }
378
384 return (cfg_subnets4_);
385 }
386
392 return (cfg_subnets6_);
393 }
394
400 return (cfg_subnets6_);
401 }
402
408 return (cfg_hosts_);
409 }
410
416 return (cfg_hosts_);
417 }
418
425 return (cfg_rsoo_);
426 }
427
433 return (cfg_rsoo_);
434 }
435
442 return (cfg_expiration_);
443 }
444
451 return (cfg_expiration_);
452 }
453
460 return (cfg_duid_);
461 }
462
469 return (cfg_duid_);
470 }
471
478 return (cfg_db_access_);
479 }
480
487 return (cfg_db_access_);
488 }
489
496 return (cfg_host_operations4_);
497 }
498
505 return (cfg_host_operations4_);
506 }
507
514 return (cfg_host_operations6_);
515 }
516
523 return (cfg_host_operations6_);
524 }
525
530 return (cfg_consist_);
531 }
532
537 return (cfg_consist_);
538 }
539
541
547 return (cfg_mac_source_);
548 }
549
555 return (cfg_mac_source_);
556 }
557
562 return (unix_control_socket_);
563 }
564
569 unix_control_socket_ = control_socket;
570 }
571
576 return (http_control_socket_);
577 }
578
583 http_control_socket_ = control_socket;
584 }
585
590 return (dhcp_queue_control_);
591 }
592
596 void setDHCPQueueControl(const isc::data::ConstElementPtr dhcp_queue_control) {
597 dhcp_queue_control_ = dhcp_queue_control;
598 }
599
604 return (dhcp_multi_threading_);
605 }
606
610 void setDHCPMultiThreading(const isc::data::ConstElementPtr dhcp_multi_threading) {
611 dhcp_multi_threading_ = dhcp_multi_threading;
612 }
613
619 return (class_dictionary_);
620 }
621
627 return (class_dictionary_);
628 }
629
634 class_dictionary_ = dictionary;
635 }
636
641 return (hooks_config_);
642 }
643
648 return (hooks_config_);
649 }
650
660 DdnsParamsPtr getDdnsParams(const ConstSubnet4Ptr& subnet) const;
661
671 DdnsParamsPtr getDdnsParams(const ConstSubnet6Ptr& subnet) const;
672
689 void copy(SrvConfig& new_config) const;
690
693
694
703 bool equals(const SrvConfig& other) const;
704
713 bool nequals(const SrvConfig& other) const {
714 return (!equals(other));
715 }
716
725 bool operator==(const SrvConfig& other) const {
726 return (equals(other));
727 }
728
737 bool operator!=(const SrvConfig& other) const {
738 return (nequals(other));
739 }
740
742
797 virtual void merge(ConfigBase& other);
798
804 void updateStatistics();
805
811 void removeStatistics();
812
819 void setDeclinePeriod(const uint32_t decline_timer) {
820 decline_timer_ = decline_timer;
821 }
822
828 uint32_t getDeclinePeriod() const {
829 return (decline_timer_);
830 }
831
838 void setEchoClientId(const bool echo) {
839 echo_v4_client_id_ = echo;
840 }
841
845 bool getEchoClientId() const {
846 return (echo_v4_client_id_);
847 }
848
855 void setDhcp4o6Port(uint16_t port) {
856 dhcp4o6_port_ = port;
857 }
858
864 uint16_t getDhcp4o6Port() const {
865 return (dhcp4o6_port_);
866 }
867
872 return (d2_client_config_);
873 }
874
879 return (d2_client_config_);
880 }
881
885 void setD2ClientConfig(const D2ClientConfigPtr& d2_client_config) {
886 d2_client_config_ = d2_client_config;
887 }
888
896 return (configured_globals_);
897 }
898
906 return (configured_globals_);
907 }
908
915 return (configured_globals_->get(name));
916 }
917
924 return (configured_globals_->get(index));
925 }
926
934 configured_globals_->clear();
935 lenient_option_parsing_ = false;
936 ignore_dhcp_server_identifier_ = false;
937 ignore_rai_link_selection_ = false;
938 exclude_first_last_24_ = false;
939 unix_control_socket_.reset();
940 http_control_socket_.reset();
941 d2_client_config_.reset(new D2ClientConfig());
942 cfg_expiration_.reset(new CfgExpiration());
943 dhcp_multi_threading_.reset();
944 cfg_consist_.reset(new CfgConsistency());
945 cfg_duid_.reset(new CfgDUID());
946 dhcp_queue_control_.reset();
947 }
948
953
956
961 void addConfiguredGlobal(const std::string& name, isc::data::ConstElementPtr value) {
962 configured_globals_->set(name, value);
963 }
964
968 void sanityChecksLifetime(const std::string& name) const;
969
975 void sanityChecksLifetime(const SrvConfig& target_config,
976 const std::string& name) const;
977
987
997 void setIPReservationsUnique(const bool unique);
998
1004 void setReservationsLookupFirst(const bool first) {
1005 reservations_lookup_first_ = first;
1006 }
1007
1014 return (reservations_lookup_first_);
1015 }
1016
1020 virtual isc::data::ElementPtr toElement() const;
1021
1026 void setLenientOptionParsing(bool const value) {
1027 lenient_option_parsing_ = value;
1028 }
1029
1034 return lenient_option_parsing_;
1035 }
1036
1041 void setIgnoreServerIdentifier(bool const value) {
1042 ignore_dhcp_server_identifier_ = value;
1043 }
1044
1049 return (ignore_dhcp_server_identifier_);
1050 }
1051
1056 void setIgnoreRAILinkSelection(bool const value) {
1057 ignore_rai_link_selection_ = value;
1058 }
1059
1064 return ignore_rai_link_selection_;
1065 }
1066
1071 void setExcludeFirstLast24(bool const value) {
1072 exclude_first_last_24_ = value;
1073 }
1074
1079 return exclude_first_last_24_;
1080 }
1081
1089 void configureLowerLevelLibraries() const;
1090
1091private:
1092
1101 void merge4(SrvConfig& other);
1102
1111 void merge6(SrvConfig& other);
1112
1135 void mergeGlobals(SrvConfig& other);
1136
1159 void mergeGlobalMaps(SrvConfig& other);
1160
1162 uint32_t sequence_;
1163
1168 CfgIfacePtr cfg_iface_;
1169
1174 CfgOptionDefPtr cfg_option_def_;
1175
1180 CfgOptionPtr cfg_option_;
1181
1183 CfgSubnets4Ptr cfg_subnets4_;
1184
1186 CfgSubnets6Ptr cfg_subnets6_;
1187
1189 CfgSharedNetworks4Ptr cfg_shared_networks4_;
1190
1192 CfgSharedNetworks6Ptr cfg_shared_networks6_;
1193
1198 CfgHostsPtr cfg_hosts_;
1199
1201 CfgMACSource cfg_mac_source_;
1202
1207 CfgRSOOPtr cfg_rsoo_;
1208
1211 CfgExpirationPtr cfg_expiration_;
1212
1214 CfgDUIDPtr cfg_duid_;
1215
1218 CfgDbAccessPtr cfg_db_access_;
1219
1222 CfgHostOperationsPtr cfg_host_operations4_;
1223
1226 CfgHostOperationsPtr cfg_host_operations6_;
1227
1229 isc::data::ConstElementPtr unix_control_socket_;
1230
1232 isc::config::HttpCommandConfigPtr http_control_socket_;
1233
1235 isc::data::ConstElementPtr dhcp_queue_control_;
1236
1238 isc::data::ConstElementPtr dhcp_multi_threading_;
1239
1241 ClientClassDictionaryPtr class_dictionary_;
1242
1244 isc::hooks::HooksConfig hooks_config_;
1245
1250 uint32_t decline_timer_;
1251
1253 bool echo_v4_client_id_;
1254
1259 uint16_t dhcp4o6_port_;
1260
1262 D2ClientConfigPtr d2_client_config_;
1263
1265 CfgGlobalsPtr configured_globals_;
1266
1268 CfgConsistencyPtr cfg_consist_;
1269
1272
1273
1274 bool lenient_option_parsing_;
1276 bool ignore_dhcp_server_identifier_;
1278 bool ignore_rai_link_selection_;
1280 bool exclude_first_last_24_;
1282
1288 bool reservations_lookup_first_;
1289};
1290
1293
1294
1295typedef boost::shared_ptr<SrvConfig> SrvConfigPtr;
1296
1298typedef boost::shared_ptr<const SrvConfig> ConstSrvConfigPtr;
1300
1301} // namespace dhcp
1302} // namespace isc
1303
1304#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.
util::Optional< uint32_t > getTtl() const
Returns explicit TTL to use.
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:187
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
util::Optional< uint32_t > getTtlMax() const
Returns the maximum TTL to use.
DdnsParams()
Default constructor.
Definition srv_config.h:52
util::Optional< uint32_t > getTtlMin() const
Returns the minimum TTL to use.
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:209
const isc::data::ConstElementPtr getUnixControlSocketInfo() const
Returns information about UNIX control socket.
Definition srv_config.h:561
ClientClassDictionaryPtr getClientClassDictionary()
Returns pointer to the dictionary of global client class definitions.
Definition srv_config.h:618
static const uint32_t CFGSEL_SUBNET4
Number of IPv4 subnets.
Definition srv_config.h:217
ConstCfgOptionDefPtr getCfgOptionDef() const
Returns pointer to the const object representing user-defined option definitions.
Definition srv_config.h:329
const ConstCfgOptionPtr getCfgOption() const
Returns pointer to the const object holding options.
Definition srv_config.h:349
void setDhcp4o6Port(uint16_t port)
Sets DHCP4o6 IPC port.
Definition srv_config.h:855
void addConfiguredGlobal(const std::string &name, isc::data::ConstElementPtr value)
Adds a parameter to the collection configured globals.
Definition srv_config.h:961
void setUnixControlSocketInfo(const isc::data::ConstElementPtr &control_socket)
Sets information about the UNIX control socket.
Definition srv_config.h:568
CfgGlobalsPtr getConfiguredGlobals()
Returns non-const pointer to configured global parameters.
Definition srv_config.h:895
ConstCfgGlobalsPtr getConfiguredGlobals() const
Returns const pointer to configured global parameters.
Definition srv_config.h:905
void setLenientOptionParsing(bool const value)
Set lenient option parsing compatibility flag.
bool getReservationsLookupFirst() const
Returns whether the server does host reservations lookup before lease lookup.
const ClientClassDictionaryPtr getClientClassDictionary() const
Returns pointer to const dictionary of global client class definitions.
Definition srv_config.h:626
const D2ClientConfigPtr getD2ClientConfig() const
Returns pointer to const D2 client configuration.
Definition srv_config.h:878
void sanityChecksDdnsTtlParameters() const
Conducts sanity checks on global DDNS ttl parameters: ddns-ttl, ddns-ttl-percent, ddns-ttl-min,...
void clearConfiguredGlobals()
Removes all configured global parameters.
Definition srv_config.h:933
void setClientClassDictionary(const ClientClassDictionaryPtr &dictionary)
Sets the client class dictionary.
Definition srv_config.h:633
ConstCfgSubnets6Ptr getCfgSubnets6() const
Returns pointer to const object holding subnets configuration for DHCPv6.
Definition srv_config.h:399
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:237
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:468
bool nequals(const SrvConfig &other) const
Compares two objects for inequality.
Definition srv_config.h:713
bool operator!=(const SrvConfig &other) const
other An object to be compared with this object.
Definition srv_config.h:737
isc::data::ConstElementPtr getConfiguredGlobal(std::string name) const
Returns pointer to a given configured global parameter.
Definition srv_config.h:914
ConstCfgConsistencyPtr getConsistency() const
Returns const pointer to object holding sanity checks flags.
Definition srv_config.h:536
CfgSharedNetworks6Ptr getCfgSharedNetworks6() const
Returns pointer to non-const object holding configuration of shared networks in DHCPv6.
Definition srv_config.h:375
static const uint32_t CFGSEL_ALL6
IPv6 related config.
Definition srv_config.h:235
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:885
void setHttpControlSocketInfo(const isc::config::HttpCommandConfigPtr &control_socket)
Sets information about the HTTP/HTTPS control socket.
Definition srv_config.h:582
static const uint32_t CFGSEL_NONE
Nothing selected.
Definition srv_config.h:215
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:221
CfgDUIDPtr getCfgDUID()
Returns pointer to the object holding configuration of the server identifier.
Definition srv_config.h:459
bool sequenceEquals(const SrvConfig &other)
Compares configuration sequence with other sequence.
static const uint32_t CFGSEL_GLOBALS
Configured globals.
Definition srv_config.h:229
isc::data::ConstElementPtr getConfiguredGlobal(int index) const
Returns pointer to a given configured global parameter.
Definition srv_config.h:923
CfgConsistencyPtr getConsistency()
Returns non-const pointer to object holding sanity checks flags.
Definition srv_config.h:529
CfgSubnets4Ptr getCfgSubnets4()
Returns pointer to non-const object holding subnets configuration for DHCPv4.
Definition srv_config.h:357
CfgSubnets6Ptr getCfgSubnets6()
Returns pointer to non-const object holding subnets configuration for DHCPv6.
Definition srv_config.h:391
CfgOptionDefPtr getCfgOptionDef()
Return pointer to non-const object representing user-defined option definitions.
Definition srv_config.h:318
uint16_t getDhcp4o6Port() const
Returns DHCP4o6 IPC port.
Definition srv_config.h:864
D2ClientConfigPtr getD2ClientConfig()
Returns pointer to the D2 client configuration.
Definition srv_config.h:871
bool operator==(const SrvConfig &other) const
Equality operator.
Definition srv_config.h:725
CfgRSOOPtr getCfgRSOO()
Returns pointer to the non-const object representing set of RSOO-enabled options.
Definition srv_config.h:424
CfgHostOperationsPtr getCfgHostOperations6()
Returns pointer to the object holding general configuration for host reservations in DHCPv6.
Definition srv_config.h:513
void setReservationsLookupFirst(const bool first)
Sets whether the server does host reservations lookup before lease lookup.
ConstCfgHostOperationsPtr getCfgHostOperations6() const
Returns const pointer to the object holding general configuration for host reservations in DHCPv6.
Definition srv_config.h:522
const isc::data::ConstElementPtr getDHCPMultiThreading() const
Returns DHCP multi threading information.
Definition srv_config.h:603
bool getEchoClientId() const
Returns whether server should send back client-id in DHCPv4.
Definition srv_config.h:845
void setDHCPQueueControl(const isc::data::ConstElementPtr dhcp_queue_control)
Sets information about the dhcp queue control.
Definition srv_config.h:596
isc::config::HttpCommandConfigPtr getHttpControlSocketInfo() const
Returns information about HTTP/HTTPS control socket.
Definition srv_config.h:575
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:307
ConstCfgExpirationPtr getCfgExpiration() const
Returns pointer to the const object holding configuration pertaining to processing expired leases.
Definition srv_config.h:450
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:589
const isc::hooks::HooksConfig & getHooksConfig() const
Returns const reference to configured hooks libraries.
Definition srv_config.h:647
bool equals(const SrvConfig &other) const
Compares two objects for equality.
uint32_t getSequence() const
Returns configuration sequence number.
Definition srv_config.h:275
CfgIfacePtr getCfgIface()
Returns non-const pointer to interface configuration.
Definition srv_config.h:297
static const uint32_t CFGSEL_DDNS
DDNS enabled/disabled.
Definition srv_config.h:225
void setDeclinePeriod(const uint32_t decline_timer)
Sets decline probation-period.
Definition srv_config.h:819
uint32_t getDeclinePeriod() const
Returns probation-period.
Definition srv_config.h:828
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:415
CfgExpirationPtr getCfgExpiration()
Returns pointer to the object holding configuration pertaining to processing expired leases.
Definition srv_config.h:441
const CfgMACSource & getMACSources() const
Returns const reference to an array that stores MAC/hardware address sources.
Definition srv_config.h:554
CfgOptionPtr getCfgOption()
Returns pointer to the non-const object holding options.
Definition srv_config.h:339
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
bool getLenientOptionParsing() const
Get lenient option parsing compatibility flag.
ConstCfgRSOOPtr getCfgRSOO() const
Returns pointer to the const object representing set of RSOO-enabled options.
Definition srv_config.h:432
static const uint32_t CFGSEL_SUBNET6
Number of IPv6 subnets.
Definition srv_config.h:219
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:640
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:486
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:227
static const uint32_t CFGSEL_ALL4
IPv4 related config.
Definition srv_config.h:233
void setDHCPMultiThreading(const isc::data::ConstElementPtr dhcp_multi_threading)
Sets information about the dhcp multi threading.
Definition srv_config.h:610
CfgDbAccessPtr getCfgDbAccess()
Returns pointer to the object holding configuration of the lease and host database connection paramet...
Definition srv_config.h:477
void setEchoClientId(const bool echo)
Sets whether server should send back client-id in DHCPv4.
Definition srv_config.h:838
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:366
CfgHostsPtr getCfgHosts()
Returns pointer to the non-const objects representing host reservations for different IPv4 and IPv6 s...
Definition srv_config.h:407
static const uint32_t CFGSEL_IFACE6
Number of v6 ifaces.
Definition srv_config.h:223
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:383
static const uint32_t CFGSEL_CFG_CTL
Config control info.
Definition srv_config.h:231
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:504
CfgHostOperationsPtr getCfgHostOperations4()
Returns pointer to the object holding general configuration for host reservations in DHCPv4.
Definition srv_config.h:495
CfgMACSource & getMACSources()
Returns non-const reference to an array that stores MAC/hardware address sources.
Definition srv_config.h:546
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:204
boost::shared_ptr< SrvConfig > SrvConfigPtr
Non-const pointer to the SrvConfig.
boost::shared_ptr< CfgSubnets6 > CfgSubnets6Ptr
Non-const pointer.
boost::shared_ptr< CfgExpiration > CfgExpirationPtr
Pointer to the Non-const object.
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.