Kea  2.3.7
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  bool getUseConflictResolution() const;
152 
160 
165  if (subnet_) {
166  return (subnet_->getID());
167  } else {
168  return (0);
169  }
170  }
171 
172 private:
174  SubnetPtr subnet_;
175 
177  bool d2_client_enabled_;
178 };
179 
181 typedef boost::shared_ptr<DdnsParams> DdnsParamsPtr;
182 
187 public:
190 
191  static const uint32_t CFGSEL_NONE = 0x00000000;
194  static const uint32_t CFGSEL_SUBNET4 = 0x00000001;
196  static const uint32_t CFGSEL_SUBNET6 = 0x00000002;
198  static const uint32_t CFGSEL_IFACE4 = 0x00000004;
200  static const uint32_t CFGSEL_IFACE6 = 0x00000008;
202  static const uint32_t CFGSEL_DDNS = 0x00000010;
204  static const uint32_t CFGSEL_SUBNET = 0x00000003;
206  static const uint32_t CFGSEL_GLOBALS = 0x00000020;
208  static const uint32_t CFGSEL_CFG_CTL = 0x00000040;
210  static const uint32_t CFGSEL_ALL4 = 0x00000035;
212  static const uint32_t CFGSEL_ALL6 = 0x0000003A;
214  static const uint32_t CFGSEL_ALL = 0xFFFFFFFF;
216 
220  SrvConfig();
221 
227  SrvConfig(const uint32_t sequence);
228 
247  std::string getConfigSummary(const uint32_t selection) const;
248 
252  uint32_t getSequence() const {
253  return (sequence_);
254  }
255 
266  bool sequenceEquals(const SrvConfig& other);
267 
275  return (cfg_iface_);
276  }
277 
285  return (cfg_iface_);
286  }
287 
296  return (cfg_option_def_);
297  }
298 
307  return (cfg_option_def_);
308  }
309 
317  return (cfg_option_);
318  }
319 
327  return (cfg_option_);
328  }
329 
335  return (cfg_subnets4_);
336  }
337 
344  return (cfg_shared_networks4_);
345  }
346 
353  return (cfg_shared_networks6_);
354  }
355 
361  return (cfg_subnets4_);
362  }
363 
369  return (cfg_subnets6_);
370  }
371 
377  return (cfg_subnets6_);
378  }
379 
385  return (cfg_hosts_);
386  }
387 
393  return (cfg_hosts_);
394  }
395 
402  return (cfg_rsoo_);
403  }
404 
410  return (cfg_rsoo_);
411  }
412 
419  return (cfg_expiration_);
420  }
421 
428  return (cfg_expiration_);
429  }
430 
437  return (cfg_duid_);
438  }
439 
446  return (cfg_duid_);
447  }
448 
455  return (cfg_db_access_);
456  }
457 
464  return (cfg_db_access_);
465  }
466 
473  return (cfg_host_operations4_);
474  }
475 
482  return (cfg_host_operations4_);
483  }
484 
491  return (cfg_host_operations6_);
492  }
493 
500  return (cfg_host_operations6_);
501  }
502 
507  return (cfg_consist_);
508  }
509 
514  return (cfg_consist_);
515  }
516 
518 
524  return (cfg_mac_source_);
525  }
526 
531  const CfgMACSource& getMACSources() const {
532  return (cfg_mac_source_);
533  }
534 
539  return (control_socket_);
540  }
541 
545  void setControlSocketInfo(const isc::data::ConstElementPtr& control_socket) {
546  control_socket_ = control_socket;
547  }
548 
553  return (dhcp_queue_control_);
554  }
555 
559  void setDHCPQueueControl(const isc::data::ConstElementPtr dhcp_queue_control) {
560  dhcp_queue_control_ = dhcp_queue_control;
561  }
562 
567  return (dhcp_multi_threading_);
568  }
569 
573  void setDHCPMultiThreading(const isc::data::ConstElementPtr dhcp_multi_threading) {
574  dhcp_multi_threading_ = dhcp_multi_threading;
575  }
576 
582  return (class_dictionary_);
583  }
584 
590  return (class_dictionary_);
591  }
592 
597  class_dictionary_ = dictionary;
598  }
599 
604  return (hooks_config_);
605  }
606 
611  return (hooks_config_);
612  }
613 
623  DdnsParamsPtr getDdnsParams(const Subnet4Ptr& subnet) const;
624 
634  DdnsParamsPtr getDdnsParams(const Subnet6Ptr& subnet) const;
635 
652  void copy(SrvConfig& new_config) const;
653 
656 
657  bool equals(const SrvConfig& other) const;
667 
676  bool nequals(const SrvConfig& other) const {
677  return (!equals(other));
678  }
679 
688  bool operator==(const SrvConfig& other) const {
689  return (equals(other));
690  }
691 
700  bool operator!=(const SrvConfig& other) const {
701  return (nequals(other));
702  }
703 
705 
760  virtual void merge(ConfigBase& other);
761 
767  void updateStatistics();
768 
774  void removeStatistics();
775 
782  void setDeclinePeriod(const uint32_t decline_timer) {
783  decline_timer_ = decline_timer;
784  }
785 
791  uint32_t getDeclinePeriod() const {
792  return (decline_timer_);
793  }
794 
801  void setEchoClientId(const bool echo) {
802  echo_v4_client_id_ = echo;
803  }
804 
808  bool getEchoClientId() const {
809  return (echo_v4_client_id_);
810  }
811 
818  void setDhcp4o6Port(uint16_t port) {
819  dhcp4o6_port_ = port;
820  }
821 
827  uint16_t getDhcp4o6Port() const {
828  return (dhcp4o6_port_);
829  }
830 
835  return (d2_client_config_);
836  }
837 
842  return (d2_client_config_);
843  }
844 
848  void setD2ClientConfig(const D2ClientConfigPtr& d2_client_config) {
849  d2_client_config_ = d2_client_config;
850  }
851 
859  return (configured_globals_);
860  }
861 
869  return (configured_globals_);
870  }
871 
878  return (configured_globals_->get(name));
879  }
880 
887  return (configured_globals_->get(index));
888  }
889 
897  configured_globals_->clear();
898  }
899 
904 
907 
912  void addConfiguredGlobal(const std::string& name, isc::data::ConstElementPtr value) {
913  configured_globals_->set(name, value);
914  }
915 
919  void sanityChecksLifetime(const std::string& name) const;
920 
926  void sanityChecksLifetime(const SrvConfig& target_config,
927  const std::string& name) const;
928 
952  static void moveDdnsParams(isc::data::ElementPtr srv_elem);
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 
999  bool getLenientOptionParsing() const {
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 
1044  bool getExcludeFirstLast24() const {
1045  return exclude_first_last_24_;
1046  }
1047 
1055  void configureLowerLevelLibraries() const;
1056 
1057 private:
1058 
1067  void merge4(SrvConfig& other);
1068 
1077  void merge6(SrvConfig& other);
1078 
1101  void mergeGlobals(SrvConfig& other);
1102 
1104  uint32_t sequence_;
1105 
1110  CfgIfacePtr cfg_iface_;
1111 
1116  CfgOptionDefPtr cfg_option_def_;
1117 
1122  CfgOptionPtr cfg_option_;
1123 
1125  CfgSubnets4Ptr cfg_subnets4_;
1126 
1128  CfgSubnets6Ptr cfg_subnets6_;
1129 
1131  CfgSharedNetworks4Ptr cfg_shared_networks4_;
1132 
1134  CfgSharedNetworks6Ptr cfg_shared_networks6_;
1135 
1140  CfgHostsPtr cfg_hosts_;
1141 
1143  CfgMACSource cfg_mac_source_;
1144 
1149  CfgRSOOPtr cfg_rsoo_;
1150 
1153  CfgExpirationPtr cfg_expiration_;
1154 
1156  CfgDUIDPtr cfg_duid_;
1157 
1160  CfgDbAccessPtr cfg_db_access_;
1161 
1164  CfgHostOperationsPtr cfg_host_operations4_;
1165 
1168  CfgHostOperationsPtr cfg_host_operations6_;
1169 
1171  isc::data::ConstElementPtr control_socket_;
1172 
1174  isc::data::ConstElementPtr dhcp_queue_control_;
1175 
1177  isc::data::ConstElementPtr dhcp_multi_threading_;
1178 
1180  ClientClassDictionaryPtr class_dictionary_;
1181 
1183  isc::hooks::HooksConfig hooks_config_;
1184 
1189  uint32_t decline_timer_;
1190 
1192  bool echo_v4_client_id_;
1193 
1198  uint16_t dhcp4o6_port_;
1199 
1201  D2ClientConfigPtr d2_client_config_;
1202 
1204  CfgGlobalsPtr configured_globals_;
1205 
1207  CfgConsistencyPtr cfg_consist_;
1208 
1211 
1212  bool lenient_option_parsing_;
1215  bool ignore_dhcp_server_identifier_;
1217  bool ignore_rai_link_selection_;
1219  bool exclude_first_last_24_;
1221 
1227  bool reservations_lookup_first_;
1228 };
1229 
1232 
1233 typedef boost::shared_ptr<SrvConfig> SrvConfigPtr;
1235 
1237 typedef boost::shared_ptr<const SrvConfig> ConstSrvConfigPtr;
1239 
1240 } // namespace dhcp
1241 } // namespace isc
1242 
1243 #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
bool getUseConflictResolution() const
Returns whether or not keah-dhcp-ddns should use conflict resolution.
Definition: srv_config.cc:1026
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:1035
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:164
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:186
ClientClassDictionaryPtr getClientClassDictionary()
Returns pointer to the dictionary of global client class definitions.
Definition: srv_config.h:581
static const uint32_t CFGSEL_SUBNET4
Number of IPv4 subnets.
Definition: srv_config.h:194
ConstCfgOptionDefPtr getCfgOptionDef() const
Returns pointer to the const object representing user-defined option definitions.
Definition: srv_config.h:306
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:326
CfgMACSource & getMACSources()
Returns non-const reference to an array that stores MAC/hardware address sources.
Definition: srv_config.h:523
void setDhcp4o6Port(uint16_t port)
Sets DHCP4o6 IPC port.
Definition: srv_config.h:818
void addConfiguredGlobal(const std::string &name, isc::data::ConstElementPtr value)
Adds a parameter to the collection configured globals.
Definition: srv_config.h:912
CfgGlobalsPtr getConfiguredGlobals()
Returns non-const pointer to configured global parameters.
Definition: srv_config.h:858
ConstCfgGlobalsPtr getConfiguredGlobals() const
Returns const pointer to configured global parameters.
Definition: srv_config.h:868
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:589
const D2ClientConfigPtr getD2ClientConfig() const
Returns pointer to const D2 client configuration.
Definition: srv_config.h:841
void clearConfiguredGlobals()
Removes all configured global parameters.
Definition: srv_config.h:896
void setClientClassDictionary(const ClientClassDictionaryPtr &dictionary)
Sets the client class dictionary.
Definition: srv_config.h:596
ConstCfgSubnets6Ptr getCfgSubnets6() const
Returns pointer to const object holding subnets configuration for DHCPv6.
Definition: srv_config.h:376
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:214
void setIgnoreServerIdentifier(bool const value)
Set ignore DHCP Server Identifier compatibility flag.
Definition: srv_config.h:1007
ConstCfgDUIDPtr getCfgDUID() const
Returns const pointer to the object holding configuration of the server identifier.
Definition: srv_config.h:445
bool nequals(const SrvConfig &other) const
Compares two objects for inequality.
Definition: srv_config.h:676
bool operator!=(const SrvConfig &other) const
other An object to be compared with this object.
Definition: srv_config.h:700
isc::data::ConstElementPtr getConfiguredGlobal(std::string name) const
Returns pointer to a given configured global parameter.
Definition: srv_config.h:877
ConstCfgConsistencyPtr getConsistency() const
Returns const pointer to object holding sanity checks flags.
Definition: srv_config.h:513
CfgSharedNetworks6Ptr getCfgSharedNetworks6() const
Returns pointer to non-const object holding configuration of shared networks in DHCPv6.
Definition: srv_config.h:352
static const uint32_t CFGSEL_ALL6
IPv6 related config.
Definition: srv_config.h:212
bool getIgnoreRAILinkSelection() const
Get ignore RAI Link Selection compatibility flag.
Definition: srv_config.h:1029
void setD2ClientConfig(const D2ClientConfigPtr &d2_client_config)
Sets the D2 client configuration.
Definition: srv_config.h:848
static const uint32_t CFGSEL_NONE
Nothing selected.
Definition: srv_config.h:192
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:1022
static const uint32_t CFGSEL_IFACE4
Number of enabled ifaces.
Definition: srv_config.h:198
CfgDUIDPtr getCfgDUID()
Returns pointer to the object holding configuration of the server identifier.
Definition: srv_config.h:436
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:206
isc::data::ConstElementPtr getConfiguredGlobal(int index) const
Returns pointer to a given configured global parameter.
Definition: srv_config.h:886
CfgConsistencyPtr getConsistency()
Returns non-const pointer to object holding sanity checks flags.
Definition: srv_config.h:506
CfgSubnets4Ptr getCfgSubnets4()
Returns pointer to non-const object holding subnets configuration for DHCPv4.
Definition: srv_config.h:334
CfgSubnets6Ptr getCfgSubnets6()
Returns pointer to non-const object holding subnets configuration for DHCPv6.
Definition: srv_config.h:368
CfgOptionDefPtr getCfgOptionDef()
Return pointer to non-const object representing user-defined option definitions.
Definition: srv_config.h:295
uint16_t getDhcp4o6Port() const
Returns DHCP4o6 IPC port.
Definition: srv_config.h:827
D2ClientConfigPtr getD2ClientConfig()
Returns pointer to the D2 client configuration.
Definition: srv_config.h:834
bool operator==(const SrvConfig &other) const
Equality operator.
Definition: srv_config.h:688
CfgRSOOPtr getCfgRSOO()
Returns pointer to the non-const object representing set of RSOO-enabled options.
Definition: srv_config.h:401
CfgHostOperationsPtr getCfgHostOperations6()
Returns pointer to the object holding general configuration for host reservations in DHCPv6.
Definition: srv_config.h:490
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:499
const isc::data::ConstElementPtr getDHCPMultiThreading() const
Returns DHCP multi threading information.
Definition: srv_config.h:566
bool getEchoClientId() const
Returns whether server should send back client-id in DHCPv4.
Definition: srv_config.h:808
void setDHCPQueueControl(const isc::data::ConstElementPtr dhcp_queue_control)
Sets information about the dhcp queue control.
Definition: srv_config.h:559
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:284
ConstCfgExpirationPtr getCfgExpiration() const
Returns pointer to the const object holding configuration pertaining to processing expired leases.
Definition: srv_config.h:427
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:552
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:252
CfgIfacePtr getCfgIface()
Returns non-const pointer to interface configuration.
Definition: srv_config.h:274
static const uint32_t CFGSEL_DDNS
DDNS enabled/disabled.
Definition: srv_config.h:202
const CfgMACSource & getMACSources() const
Returns const reference to an array that stores MAC/hardware address sources.
Definition: srv_config.h:531
void setDeclinePeriod(const uint32_t decline_timer)
Sets decline probation-period.
Definition: srv_config.h:782
uint32_t getDeclinePeriod() const
Returns probation-period.
Definition: srv_config.h:791
isc::hooks::HooksConfig & getHooksConfig()
Returns non-const reference to configured hooks libraries.
Definition: srv_config.h:603
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:392
CfgExpirationPtr getCfgExpiration()
Returns pointer to the object holding configuration pertaining to processing expired leases.
Definition: srv_config.h:418
CfgOptionPtr getCfgOption()
Returns pointer to the non-const object holding options.
Definition: srv_config.h:316
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:999
ConstCfgRSOOPtr getCfgRSOO() const
Returns pointer to the const object representing set of RSOO-enabled options.
Definition: srv_config.h:409
static const uint32_t CFGSEL_SUBNET6
Number of IPv6 subnets.
Definition: srv_config.h:196
bool getExcludeFirstLast24() const
Get exclude .0 and .255 addresses in subnets bigger than /24 flag.
Definition: srv_config.h:1044
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:463
void setExcludeFirstLast24(bool const value)
Set exclude .0 and .255 addresses in subnets bigger than /24 flag.
Definition: srv_config.h:1037
static const uint32_t CFGSEL_SUBNET
Number of all subnets.
Definition: srv_config.h:204
static const uint32_t CFGSEL_ALL4
IPv4 related config.
Definition: srv_config.h:210
void setDHCPMultiThreading(const isc::data::ConstElementPtr dhcp_multi_threading)
Sets information about the dhcp multi threading.
Definition: srv_config.h:573
CfgDbAccessPtr getCfgDbAccess()
Returns pointer to the object holding configuration of the lease and host database connection paramet...
Definition: srv_config.h:454
void setEchoClientId(const bool echo)
Sets whether server should send back client-id in DHCPv4.
Definition: srv_config.h:801
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:343
CfgHostsPtr getCfgHosts()
Returns pointer to the non-const objects representing host reservations for different IPv4 and IPv6 s...
Definition: srv_config.h:384
void setControlSocketInfo(const isc::data::ConstElementPtr &control_socket)
Sets information about the control socket.
Definition: srv_config.h:545
static const uint32_t CFGSEL_IFACE6
Number of v6 ifaces.
Definition: srv_config.h:200
bool getIgnoreServerIdentifier() const
Get ignore DHCP Server Identifier compatibility flag.
Definition: srv_config.h:1014
ConstCfgSubnets4Ptr getCfgSubnets4() const
Returns pointer to const object holding subnets configuration for DHCPv4.
Definition: srv_config.h:360
static const uint32_t CFGSEL_CFG_CTL
Config control info.
Definition: srv_config.h:208
const isc::data::ConstElementPtr getControlSocketInfo() const
Returns information about control socket.
Definition: srv_config.h:538
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:481
CfgHostOperationsPtr getCfgHostOperations4()
Returns pointer to the object holding general configuration for host reservations in DHCPv4.
Definition: srv_config.h:472
const isc::hooks::HooksConfig & getHooksConfig() const
Returns const reference to configured hooks libraries.
Definition: srv_config.h:610
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:27
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:24
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:477
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
Definition: subnet.h:486
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:1237
boost::shared_ptr< CfgOption > CfgOptionPtr
Non-const pointer.
Definition: cfg_option.h:780
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:644
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:181
boost::shared_ptr< SrvConfig > SrvConfigPtr
Non-const pointer to the SrvConfig.
Definition: srv_config.h:1234
boost::shared_ptr< CfgSubnets6 > CfgSubnets6Ptr
Non-const pointer.
Definition: cfg_subnets6.h:346
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:348
boost::shared_ptr< const CfgSubnets4 > ConstCfgSubnets4Ptr
Const pointer.
Definition: cfg_subnets4.h:351
boost::shared_ptr< const CfgSubnets6 > ConstCfgSubnets6Ptr
Const pointer.
Definition: cfg_subnets6.h:349
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:783
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.