Kea  2.5.2
srv_config.h
Go to the documentation of this file.
1 // Copyright (C) 2014-2023 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>
11 #include <dhcpsrv/cfg_db_access.h>
12 #include <dhcpsrv/cfg_duid.h>
13 #include <dhcpsrv/cfg_expiration.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>
19 #include <dhcpsrv/cfg_option_def.h>
20 #include <dhcpsrv/cfg_rsoo.h>
22 #include <dhcpsrv/cfg_subnets4.h>
23 #include <dhcpsrv/cfg_subnets6.h>
24 #include <dhcpsrv/cfg_mac_source.h>
27 #include <dhcpsrv/d2_client_cfg.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/strutil.h>
35 
36 #include <boost/shared_ptr.hpp>
37 #include <vector>
38 #include <stdint.h>
39 
40 namespace isc {
41 namespace dhcp {
42 
43 class CfgMgr;
44 
48 class DdnsParams {
49 public:
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 
170 private:
172  SubnetPtr subnet_;
173 
175  bool d2_client_enabled_;
176 };
177 
179 typedef boost::shared_ptr<DdnsParams> DdnsParamsPtr;
180 
185 public:
188 
189  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 
529  const CfgMACSource& getMACSources() const {
530  return (cfg_mac_source_);
531  }
532 
537  return (control_socket_);
538  }
539 
543  void setControlSocketInfo(const isc::data::ConstElementPtr& control_socket) {
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  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  }
897 
902 
905 
910  void addConfiguredGlobal(const std::string& name, isc::data::ConstElementPtr value) {
911  configured_globals_->set(name, value);
912  }
913 
917  void sanityChecksLifetime(const std::string& name) const;
918 
924  void sanityChecksLifetime(const SrvConfig& target_config,
925  const std::string& name) const;
926 
950  static void moveDdnsParams(isc::data::ElementPtr srv_elem);
951 
961  void setIPReservationsUnique(const bool unique);
962 
968  void setReservationsLookupFirst(const bool first) {
969  reservations_lookup_first_ = first;
970  }
971 
978  return (reservations_lookup_first_);
979  }
980 
984  virtual isc::data::ElementPtr toElement() const;
985 
990  void setLenientOptionParsing(bool const value) {
991  lenient_option_parsing_ = value;
992  }
993 
997  bool getLenientOptionParsing() const {
998  return lenient_option_parsing_;
999  }
1000 
1005  void setIgnoreServerIdentifier(bool const value) {
1006  ignore_dhcp_server_identifier_ = value;
1007  }
1008 
1013  return (ignore_dhcp_server_identifier_);
1014  }
1015 
1020  void setIgnoreRAILinkSelection(bool const value) {
1021  ignore_rai_link_selection_ = value;
1022  }
1023 
1028  return ignore_rai_link_selection_;
1029  }
1030 
1035  void setExcludeFirstLast24(bool const value) {
1036  exclude_first_last_24_ = value;
1037  }
1038 
1042  bool getExcludeFirstLast24() const {
1043  return exclude_first_last_24_;
1044  }
1045 
1053  void configureLowerLevelLibraries() const;
1054 
1055 private:
1056 
1065  void merge4(SrvConfig& other);
1066 
1075  void merge6(SrvConfig& other);
1076 
1099  void mergeGlobals(SrvConfig& other);
1100 
1102  uint32_t sequence_;
1103 
1108  CfgIfacePtr cfg_iface_;
1109 
1114  CfgOptionDefPtr cfg_option_def_;
1115 
1120  CfgOptionPtr cfg_option_;
1121 
1123  CfgSubnets4Ptr cfg_subnets4_;
1124 
1126  CfgSubnets6Ptr cfg_subnets6_;
1127 
1129  CfgSharedNetworks4Ptr cfg_shared_networks4_;
1130 
1132  CfgSharedNetworks6Ptr cfg_shared_networks6_;
1133 
1138  CfgHostsPtr cfg_hosts_;
1139 
1141  CfgMACSource cfg_mac_source_;
1142 
1147  CfgRSOOPtr cfg_rsoo_;
1148 
1151  CfgExpirationPtr cfg_expiration_;
1152 
1154  CfgDUIDPtr cfg_duid_;
1155 
1158  CfgDbAccessPtr cfg_db_access_;
1159 
1162  CfgHostOperationsPtr cfg_host_operations4_;
1163 
1166  CfgHostOperationsPtr cfg_host_operations6_;
1167 
1169  isc::data::ConstElementPtr control_socket_;
1170 
1172  isc::data::ConstElementPtr dhcp_queue_control_;
1173 
1175  isc::data::ConstElementPtr dhcp_multi_threading_;
1176 
1178  ClientClassDictionaryPtr class_dictionary_;
1179 
1181  isc::hooks::HooksConfig hooks_config_;
1182 
1187  uint32_t decline_timer_;
1188 
1190  bool echo_v4_client_id_;
1191 
1196  uint16_t dhcp4o6_port_;
1197 
1199  D2ClientConfigPtr d2_client_config_;
1200 
1202  CfgGlobalsPtr configured_globals_;
1203 
1205  CfgConsistencyPtr cfg_consist_;
1206 
1209 
1210  bool lenient_option_parsing_;
1213  bool ignore_dhcp_server_identifier_;
1215  bool ignore_rai_link_selection_;
1217  bool exclude_first_last_24_;
1219 
1225  bool reservations_lookup_first_;
1226 };
1227 
1230 
1231 typedef boost::shared_ptr<SrvConfig> SrvConfigPtr;
1233 
1235 typedef boost::shared_ptr<const SrvConfig> ConstSrvConfigPtr;
1237 
1238 } // namespace dhcp
1239 } // namespace isc
1240 
1241 #endif // DHCPSRV_CONFIG_H
Wrapper class that holds MAC/hardware address sources.
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:989
D2ClientConfig::ReplaceClientNameMode getReplaceClientNameMode() const
Returns how Kea should handle the domain-name supplied by the client.
Definition: srv_config.cc:953
std::string getGeneratedPrefix() const
Returns the Prefix Kea should use when generating domain-names.
Definition: srv_config.cc:962
util::Optional< double > getTtlPercent() const
Returns percent of lease lifetime to use for TTL.
Definition: srv_config.cc:1026
isc::util::str::StringSanitizerPtr getHostnameSanitizer() const
Returns a regular expression string sanitizer.
Definition: srv_config.cc:998
std::string getHostnameCharSet() const
Returns the regular expression describing invalid characters for client hostnames.
Definition: srv_config.cc:980
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:1035
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:971
bool getUpdateOnRenew() const
Returns whether or not DNS should be updated when leases renew.
Definition: srv_config.cc:1017
bool getOverrideNoUpdate() const
Returns whether or not Kea should perform updates, even if client requested no updates.
Definition: srv_config.cc:936
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:927
bool getOverrideClientUpdate() const
Returns whether or not Kea should perform updates, even if client requested delegation.
Definition: srv_config.cc:944
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:863
const ConstCfgOptionPtr getCfgOption() const
Returns pointer to the const object holding options.
Definition: srv_config.h:324
CfgMACSource & getMACSources()
Returns non-const reference to an array that stores MAC/hardware address sources.
Definition: srv_config.h:521
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:910
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:990
bool getReservationsLookupFirst() const
Returns whether the server does host reservations lookup before lease lookup.
Definition: srv_config.h:977
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:170
void extractConfiguredGlobals(isc::data::ConstElementPtr config)
Saves scalar elements from the global scope of a configuration.
Definition: srv_config.cc:398
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:1005
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:1027
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:328
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:913
void configureLowerLevelLibraries() const
Convenience method to propagate configuration parameters through inversion of control.
Definition: srv_config.cc:922
void setIgnoreRAILinkSelection(bool const value)
Set ignore RAI Link Selection compatibility flag.
Definition: srv_config.h:1020
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:117
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:968
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:413
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:76
const isc::data::ConstElementPtr getDHCPQueueControl() const
Returns DHCP queue control information.
Definition: srv_config.h:550
bool equals(const SrvConfig &other) const
Compares two objects for equality.
Definition: srv_config.cc:144
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
const CfgMACSource & getMACSources() const
Returns const reference to an array that stores MAC/hardware address sources.
Definition: srv_config.h:529
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
isc::hooks::HooksConfig & getHooksConfig()
Returns non-const reference to configured hooks libraries.
Definition: srv_config.h:601
void removeStatistics()
Removes statistics.
Definition: srv_config.cc:282
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
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:602
bool getLenientOptionParsing() const
Get lenient option parsing compatibility flag.
Definition: srv_config.h:997
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:1042
void updateStatistics()
Updates statistics.
Definition: srv_config.cc:290
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:1035
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:122
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:1012
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:851
SrvConfig()
Default constructor.
Definition: srv_config.cc:35
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
const isc::hooks::HooksConfig & getHooksConfig() const
Returns const reference to configured hooks libraries.
Definition: srv_config.h:608
Wrapper class that holds hooks libraries configuration.
Definition: hooks_config.h:36
Base class for all configurations.
Definition: config_base.h:33
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:26
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:163
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:1235
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:1232
boost::shared_ptr< CfgSubnets6 > CfgSubnets6Ptr
Non-const pointer.
Definition: cfg_subnets6.h:349
boost::shared_ptr< CfgExpiration > CfgExpirationPtr
boost::shared_ptr< CfgGlobals > CfgGlobalsPtr
Non-const shared pointer to a CfgGlobals instance.
Definition: cfg_globals.h:160
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:351
boost::shared_ptr< const CfgSubnets4 > ConstCfgSubnets4Ptr
Const pointer.
Definition: cfg_subnets4.h:354
boost::shared_ptr< const CfgSubnets6 > ConstCfgSubnets6Ptr
Const pointer.
Definition: cfg_subnets6.h:352
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
boost::shared_ptr< StringSanitizer > StringSanitizerPtr
Type representing the pointer to the StringSanitizer.
Definition: strutil.h:359
Defines the logger used by the top-level component of kea-lfc.