Kea  1.9.9-git
srv_config.h
Go to the documentation of this file.
1 // Copyright (C) 2014-2021 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>
15 #include <dhcpsrv/cfg_hosts.h>
16 #include <dhcpsrv/cfg_iface.h>
17 #include <dhcpsrv/cfg_option.h>
18 #include <dhcpsrv/cfg_option_def.h>
19 #include <dhcpsrv/cfg_rsoo.h>
21 #include <dhcpsrv/cfg_subnets4.h>
22 #include <dhcpsrv/cfg_subnets6.h>
23 #include <dhcpsrv/cfg_mac_source.h>
26 #include <dhcpsrv/d2_client_cfg.h>
27 #include <process/config_base.h>
28 #include <hooks/hooks_config.h>
29 #include <cc/data.h>
30 #include <cc/user_context.h>
31 #include <cc/simple_parser.h>
32 #include <util/strutil.h>
33 
34 #include <boost/shared_ptr.hpp>
35 #include <vector>
36 #include <stdint.h>
37 
38 namespace isc {
39 namespace dhcp {
40 
41 class CfgMgr;
42 
46 class DdnsParams {
47 public:
49  DdnsParams() : subnet_(), d2_client_enabled_(false) {};
50 
58  DdnsParams(const Subnet4Ptr& subnet, bool d2_client_enabled)
59  : subnet_(boost::dynamic_pointer_cast<Subnet>(subnet)),
60  d2_client_enabled_(d2_client_enabled) {}
61 
69  DdnsParams(const Subnet6Ptr& subnet, bool d2_client_enabled)
70  : subnet_(boost::dynamic_pointer_cast<Subnet>(subnet)),
71  d2_client_enabled_(d2_client_enabled) {}
72 
78  bool getEnableUpdates() const;
79 
83  bool getOverrideNoUpdate() const;
84 
88  bool getOverrideClientUpdate() const;
89 
94 
97  std::string getGeneratedPrefix() const;
98 
102  std::string getQualifyingSuffix() const;
103 
107  std::string getHostnameCharSet() const;
108 
112  std::string getHostnameCharReplacement() const;
113 
124 
132  bool getUpdateOnRenew() const;
133 
141  bool getUseConflictResolution() const;
142 
146  if (subnet_){
147  return subnet_->getID();
148  } else {
149  return 0;
150  }
151  }
152 
153 private:
155  SubnetPtr subnet_;
156 
158  bool d2_client_enabled_;
159 };
160 
162 typedef boost::shared_ptr<DdnsParams> DdnsParamsPtr;
163 
168 public:
171 
172  static const uint32_t CFGSEL_NONE = 0x00000000;
175  static const uint32_t CFGSEL_SUBNET4 = 0x00000001;
177  static const uint32_t CFGSEL_SUBNET6 = 0x00000002;
179  static const uint32_t CFGSEL_IFACE4 = 0x00000004;
181  static const uint32_t CFGSEL_IFACE6 = 0x00000008;
183  static const uint32_t CFGSEL_DDNS = 0x00000010;
185  static const uint32_t CFGSEL_SUBNET = 0x00000003;
187  static const uint32_t CFGSEL_GLOBALS = 0x00000020;
189  static const uint32_t CFGSEL_CFG_CTL = 0x00000040;
191  static const uint32_t CFGSEL_ALL4 = 0x00000035;
193  static const uint32_t CFGSEL_ALL6 = 0x0000003A;
195  static const uint32_t CFGSEL_ALL = 0xFFFFFFFF;
197 
201  SrvConfig();
202 
206  SrvConfig(const uint32_t sequence);
207 
226  std::string getConfigSummary(const uint32_t selection) const;
227 
229  uint32_t getSequence() const {
230  return (sequence_);
231  }
232 
243  bool sequenceEquals(const SrvConfig& other);
244 
252  return (cfg_iface_);
253  }
254 
262  return (cfg_iface_);
263  }
264 
273  return (cfg_option_def_);
274  }
275 
284  return (cfg_option_def_);
285  }
286 
294  return (cfg_option_);
295  }
296 
304  return (cfg_option_);
305  }
306 
312  return (cfg_subnets4_);
313  }
314 
321  return (cfg_shared_networks4_);
322  }
323 
330  return (cfg_shared_networks6_);
331  }
332 
338  return (cfg_subnets4_);
339  }
340 
346  return (cfg_subnets6_);
347  }
348 
354  return (cfg_subnets6_);
355  }
356 
362  return (cfg_hosts_);
363  }
364 
370  return (cfg_hosts_);
371  }
372 
379  return (cfg_rsoo_);
380  }
381 
388  return (cfg_rsoo_);
389  }
390 
394  return (cfg_expiration_);
395  }
396 
400  return (cfg_expiration_);
401  }
402 
406  return (cfg_duid_);
407  }
408 
412  return (cfg_duid_);
413  }
414 
418  return (cfg_db_access_);
419  }
420 
424  return (cfg_db_access_);
425  }
426 
430  return (cfg_host_operations4_);
431  }
432 
436  return (cfg_host_operations4_);
437  }
438 
442  return (cfg_host_operations6_);
443  }
444 
448  return (cfg_host_operations6_);
449  }
450 
453  return (cfg_consist_);
454  }
455 
457 
463  return (cfg_mac_source_);
464  }
465 
470  const CfgMACSource& getMACSources() const {
471  return (cfg_mac_source_);
472  }
473 
477  return (control_socket_);
478  }
479 
482  void setControlSocketInfo(const isc::data::ConstElementPtr& control_socket) {
483  control_socket_ = control_socket;
484  }
485 
489  return (dhcp_queue_control_);
490  }
491 
494  void setDHCPQueueControl(const isc::data::ConstElementPtr dhcp_queue_control) {
495  dhcp_queue_control_ = dhcp_queue_control;
496  }
497 
501  return (dhcp_multi_threading_);
502  }
503 
506  void setDHCPMultiThreading(const isc::data::ConstElementPtr dhcp_multi_threading) {
507  dhcp_multi_threading_ = dhcp_multi_threading;
508  }
509 
513  return (class_dictionary_);
514  }
515 
519  return (class_dictionary_);
520  }
521 
525  class_dictionary_ = dictionary;
526  }
527 
532  return (hooks_config_);
533  }
534 
539  return (hooks_config_);
540  }
541 
551  DdnsParamsPtr getDdnsParams(const Subnet4Ptr& subnet) const;
552 
562  DdnsParamsPtr getDdnsParams(const Subnet6Ptr& subnet) const;
563 
580  void copy(SrvConfig& new_config) const;
581 
584 
585  bool equals(const SrvConfig& other) const;
595 
604  bool nequals(const SrvConfig& other) const {
605  return (!equals(other));
606  }
607 
616  bool operator==(const SrvConfig& other) const {
617  return (equals(other));
618  }
619 
628  bool operator!=(const SrvConfig& other) const {
629  return (nequals(other));
630  }
631 
633 
680  virtual void merge(ConfigBase& other);
681 
687  void updateStatistics();
688 
694  void removeStatistics();
695 
702  void setDeclinePeriod(const uint32_t decline_timer) {
703  decline_timer_ = decline_timer;
704  }
705 
710  uint32_t getDeclinePeriod() const {
711  return (decline_timer_);
712  }
713 
720  void setEchoClientId(const bool echo) {
721  echo_v4_client_id_ = echo;
722  }
723 
726  bool getEchoClientId() const {
727  return (echo_v4_client_id_);
728  }
729 
736  void setDhcp4o6Port(uint16_t port) {
737  dhcp4o6_port_ = port;
738  }
739 
744  uint16_t getDhcp4o6Port() const {
745  return (dhcp4o6_port_);
746  }
747 
750  return (d2_client_config_);
751  }
752 
755  return (d2_client_config_);
756  }
757 
760  void setD2ClientConfig(const D2ClientConfigPtr& d2_client_config) {
761  d2_client_config_ = d2_client_config;
762  }
763 
766  return (isc::data::ConstElementPtr(configured_globals_));
767  }
768 
773  isc::data::ConstElementPtr getConfiguredGlobal(std::string name) const;
774 
780  void clearConfiguredGlobals();
781 
785 
788 
792  void addConfiguredGlobal(const std::string& name, isc::data::ConstElementPtr value) {
793  configured_globals_->set(name, value);
794  }
795 
799  void sanityChecksLifetime(const std::string& name) const;
800 
806  void sanityChecksLifetime(const SrvConfig& target_config,
807  const std::string& name) const;
808 
832  static void moveDdnsParams(isc::data::ElementPtr srv_elem);
833 
843  void setIPReservationsUnique(const bool unique);
844 
848  virtual isc::data::ElementPtr toElement() const;
849 
854  void setLenientOptionParsing(bool const value) {
855  lenient_option_parsing_ = value;
856  }
857 
861  bool getLenientOptionParsing() const {
862  return lenient_option_parsing_;
863  }
864 
872  void configureLowerLevelLibraries() const;
873 
874 private:
875 
884  void merge4(SrvConfig& other);
885 
894  void merge6(SrvConfig& other);
895 
918  void mergeGlobals(SrvConfig& other);
919 
921  uint32_t sequence_;
922 
927  CfgIfacePtr cfg_iface_;
928 
933  CfgOptionDefPtr cfg_option_def_;
934 
939  CfgOptionPtr cfg_option_;
940 
942  CfgSubnets4Ptr cfg_subnets4_;
943 
945  CfgSubnets6Ptr cfg_subnets6_;
946 
948  CfgSharedNetworks4Ptr cfg_shared_networks4_;
949 
951  CfgSharedNetworks6Ptr cfg_shared_networks6_;
952 
957  CfgHostsPtr cfg_hosts_;
958 
960  CfgMACSource cfg_mac_source_;
961 
966  CfgRSOOPtr cfg_rsoo_;
967 
970  CfgExpirationPtr cfg_expiration_;
971 
973  CfgDUIDPtr cfg_duid_;
974 
977  CfgDbAccessPtr cfg_db_access_;
978 
981  CfgHostOperationsPtr cfg_host_operations4_;
982 
985  CfgHostOperationsPtr cfg_host_operations6_;
986 
988  isc::data::ConstElementPtr control_socket_;
989 
991  isc::data::ConstElementPtr dhcp_queue_control_;
992 
994  isc::data::ConstElementPtr dhcp_multi_threading_;
995 
997  ClientClassDictionaryPtr class_dictionary_;
998 
1000  isc::hooks::HooksConfig hooks_config_;
1001 
1006  uint32_t decline_timer_;
1007 
1009  bool echo_v4_client_id_;
1010 
1015  uint16_t dhcp4o6_port_;
1016 
1018  D2ClientConfigPtr d2_client_config_;
1019 
1021  isc::data::ElementPtr configured_globals_;
1022 
1024  CfgConsistencyPtr cfg_consist_;
1025 
1028  bool lenient_option_parsing_;
1030 };
1031 
1034 
1035 typedef boost::shared_ptr<SrvConfig> SrvConfigPtr;
1037 
1039 typedef boost::shared_ptr<const SrvConfig> ConstSrvConfigPtr;
1041 
1042 } // namespace dhcp
1043 } // namespace isc
1044 
1045 #endif // DHCPSRV_CONFIG_H
Defines the D2ClientConfig class.
D2ClientConfigPtr getD2ClientConfig()
Returns pointer to the D2 client configuration.
Definition: srv_config.h:749
boost::shared_ptr< CfgSharedNetworks6 > CfgSharedNetworks6Ptr
Pointer to the configuration of IPv6 shared networks.
D2ClientConfig::ReplaceClientNameMode getReplaceClientNameMode() const
Returns how Kea should handle the domain-name supplied by the client.
Definition: srv_config.cc:927
bool nequals(const SrvConfig &other) const
Compares two objects for inequality.
Definition: srv_config.h:604
boost::shared_ptr< CfgOption > CfgOptionPtr
Non-const pointer.
Definition: cfg_option.h:706
SrvConfig()
Default constructor.
Definition: srv_config.cc:33
isc::data::ConstElementPtr getConfiguredGlobal(std::string name) const
Returns pointer to a given configured global parameter.
Definition: srv_config.cc:315
boost::shared_ptr< const CfgOptionDef > ConstCfgOptionDefPtr
Const pointer.
ConstCfgHostOperationsPtr getCfgHostOperations6() const
Returns const pointer to the object holding general configuration for host reservations in DHCPv6...
Definition: srv_config.h:447
SubnetID getSubnetId() const
Returns the subnet-id of the subnet associated with these parameters.
Definition: srv_config.h:145
static const uint32_t CFGSEL_IFACE4
Number of enabled ifaces.
Definition: srv_config.h:179
std::vector< SimpleDefault > SimpleDefaults
This specifies all default values in a given scope (e.g. a subnet).
static void moveDdnsParams(isc::data::ElementPtr srv_elem)
Moves deprecated parameters from dhcp-ddns element to global element.
Definition: srv_config.cc:837
ConstCfgHostsPtr getCfgHosts() const
Returns pointer to the const objects representing host reservations for different IPv4 and IPv6 subne...
Definition: srv_config.h:369
boost::shared_ptr< const CfgOption > ConstCfgOptionPtr
Const pointer.
Definition: cfg_option.h:709
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
Definition: srv_config.cc:605
static const uint32_t CFGSEL_CFG_CTL
Config control info.
Definition: srv_config.h:189
CfgConsistencyPtr getConsistency()
Returns const pointer to object holding sanity checks flags.
Definition: srv_config.h:452
Base class for all configurations.
Definition: config_base.h:33
void removeStatistics()
Removes statistics.
Definition: srv_config.cc:269
boost::shared_ptr< SrvConfig > SrvConfigPtr
Non-const pointer to the SrvConfig.
Definition: srv_config.h:1036
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
Definition: subnet.h:522
boost::shared_ptr< const CfgRSOO > ConstCfgRSOOPtr
Pointer to the const object.
Definition: cfg_rsoo.h:74
boost::shared_ptr< const CfgHosts > ConstCfgHostsPtr
Const pointer.
Definition: cfg_hosts.h:944
void copy(SrvConfig &new_config) const
Copies the current configuration to a new configuration.
Definition: srv_config.cc:118
void setControlSocketInfo(const isc::data::ConstElementPtr &control_socket)
Sets information about the control socket.
Definition: srv_config.h:482
ConstCfgExpirationPtr getCfgExpiration() const
Returns pointer to the const object holding configuration pertaining to processing expired leases...
Definition: srv_config.h:399
boost::shared_ptr< Element > ElementPtr
Definition: data.h:20
boost::shared_ptr< CfgIface > CfgIfacePtr
A pointer to the CfgIface .
Definition: cfg_iface.h:387
Wrapper class that holds hooks libraries configuration.
Definition: hooks_config.h:36
uint32_t getSequence() const
Returns configuration sequence number.
Definition: srv_config.h:229
CfgSubnets6Ptr getCfgSubnets6()
Returns pointer to non-const object holding subnets configuration for DHCPv6.
Definition: srv_config.h:345
void setLenientOptionParsing(bool const value)
Set lenient option parsing compatibility flag.
Definition: srv_config.h:854
bool getUpdateOnRenew() const
Returns whether or not DNS should be updated when leases renew.
Definition: srv_config.cc:991
boost::shared_ptr< CfgOptionDef > CfgOptionDefPtr
Non-const pointer.
boost::shared_ptr< CfgConsistency > CfgConsistencyPtr
Type used to for pointing to CfgConsistency structure.
void updateStatistics()
Updates statistics.
Definition: srv_config.cc:277
boost::shared_ptr< const CfgDUID > ConstCfgDUIDPtr
Pointer to the const object.
Definition: cfg_duid.h:164
boost::shared_ptr< CfgSubnets4 > CfgSubnets4Ptr
Non-const pointer.
Definition: cfg_subnets4.h:332
bool equals(const SrvConfig &other) const
Compares two objects for equality.
Definition: srv_config.cc:141
void setDHCPQueueControl(const isc::data::ConstElementPtr dhcp_queue_control)
Sets information about the dhcp queue control.
Definition: srv_config.h:494
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:887
bool getLenientOptionParsing() const
Get lenient option parsing compatibility flag.
Definition: srv_config.h:861
boost::shared_ptr< const CfgSubnets4 > ConstCfgSubnets4Ptr
Const pointer.
Definition: cfg_subnets4.h:335
boost::shared_ptr< DdnsParams > DdnsParamsPtr
Defines a pointer for DdnsParams instances.
Definition: srv_config.h:162
boost::shared_ptr< CfgExpiration > CfgExpirationPtr
Pointer to the Non-const object.
CfgOptionDefPtr getCfgOptionDef()
Return pointer to non-const object representing user-defined option definitions.
Definition: srv_config.h:272
boost::shared_ptr< const CfgDbAccess > ConstCfgDbAccessPtr
A pointer to the const CfgDbAccess.
void setEchoClientId(const bool echo)
Sets whether server should send back client-id in DHCPv4.
Definition: srv_config.h:720
boost::shared_ptr< CfgSharedNetworks4 > CfgSharedNetworks4Ptr
Pointer to the configuration of IPv4 shared networks.
bool operator!=(const SrvConfig &other) const
other An object to be compared with this object.
Definition: srv_config.h:628
boost::shared_ptr< const SrvConfig > ConstSrvConfigPtr
Const pointer to the SrvConfig.
Definition: srv_config.h:1039
uint16_t getDhcp4o6Port() const
Returns DHCP4o6 IPC port.
Definition: srv_config.h:744
Wrapper class that holds MAC/hardware address sources.
bool getEnableUpdates() const
Returns whether or not DHCP DDNS updating is enabled.
Definition: srv_config.cc:901
boost::shared_ptr< CfgDbAccess > CfgDbAccessPtr
A pointer to the CfgDbAccess.
void setDeclinePeriod(const uint32_t decline_timer)
Sets decline probation-period.
Definition: srv_config.h:702
bool operator==(const SrvConfig &other) const
Equality operator.
Definition: srv_config.h:616
const ClientClassDictionaryPtr getClientClassDictionary() const
Returns pointer to const dictionary of global client class definitions.
Definition: srv_config.h:518
boost::shared_ptr< const CfgSubnets6 > ConstCfgSubnets6Ptr
Const pointer.
Definition: cfg_subnets6.h:333
ConstCfgIfacePtr getCfgIface() const
Returns const pointer to interface configuration.
Definition: srv_config.h:261
boost::shared_ptr< ClientClassDictionary > ClientClassDictionaryPtr
Defines a pointer to a ClientClassDictionary.
const isc::data::ConstElementPtr getDHCPQueueControl() const
Returns DHCP queue control information.
Definition: srv_config.h:488
ConstCfgRSOOPtr getCfgRSOO() const
Returns pointer to the const object representing set of RSOO-enabled options.
Definition: srv_config.h:387
void addConfiguredGlobal(const std::string &name, isc::data::ConstElementPtr value)
Adds a parameter to the collection configured globals.
Definition: srv_config.h:792
boost::shared_ptr< const CfgExpiration > ConstCfgExpirationPtr
Pointer to the const object.
ConstCfgDUIDPtr getCfgDUID() const
Returns const pointer to the object holding configuration of the server identifier.
Definition: srv_config.h:411
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:23
boost::shared_ptr< CfgRSOO > CfgRSOOPtr
Pointer to the Non-const object.
Definition: cfg_rsoo.h:71
CfgDbAccessPtr getCfgDbAccess()
Returns pointer to the object holding configuration of the lease and host database connection paramet...
Definition: srv_config.h:417
const ConstCfgOptionPtr getCfgOption() const
Returns pointer to the const object holding options.
Definition: srv_config.h:303
boost::shared_ptr< CfgSubnets6 > CfgSubnets6Ptr
Non-const pointer.
Definition: cfg_subnets6.h:330
CfgExpirationPtr getCfgExpiration()
Returns pointer to the object holding configuration pertaining to processing expired leases...
Definition: srv_config.h:393
CfgHostOperationsPtr getCfgHostOperations4()
Returns pointer to the object holding general configuration for host reservations in DHCPv4...
Definition: srv_config.h:429
isc::util::str::StringSanitizerPtr getHostnameSanitizer() const
Returns a regular expression string sanitizer.
Definition: srv_config.cc:972
Convenience container for conveying DDNS behavioral parameters It is intended to be created per Packe...
Definition: srv_config.h:46
const D2ClientConfigPtr getD2ClientConfig() const
Returns pointer to const D2 client configuration.
Definition: srv_config.h:754
CfgIfacePtr getCfgIface()
Returns non-const pointer to interface configuration.
Definition: srv_config.h:251
static const uint32_t CFGSEL_SUBNET
Number of all subnets.
Definition: srv_config.h:185
DdnsParamsPtr getDdnsParams(const Subnet4Ptr &subnet) const
Fetches the DDNS parameters for a given DHCPv4 subnet.
Definition: srv_config.cc:825
Specifies current DHCP configuration.
Definition: srv_config.h:167
static const uint32_t CFGSEL_ALL6
IPv6 related config.
Definition: srv_config.h:193
CfgRSOOPtr getCfgRSOO()
Returns pointer to the non-const object representing set of RSOO-enabled options. ...
Definition: srv_config.h:378
Defines the logger used by the top-level component of kea-dhcp-ddns.
CfgSharedNetworks4Ptr getCfgSharedNetworks4() const
Returns pointer to non-const object holding configuration of shared networks in DHCPv4;.
Definition: srv_config.h:320
virtual void merge(ConfigBase &other)
Merges the configuration specified as a parameter into this configuration.
Definition: srv_config.cc:167
DdnsParams(const Subnet4Ptr &subnet, bool d2_client_enabled)
Constructor for DHPCv4 subnets.
Definition: srv_config.h:58
std::string getHostnameCharSet() const
Returns the regular expression describing invalid characters for client hostnames.
Definition: srv_config.cc:954
void clearConfiguredGlobals()
Removes all configured global parameters.
Definition: srv_config.cc:325
CfgMACSource & getMACSources()
Returns non-const reference to an array that stores MAC/hardware address sources. ...
Definition: srv_config.h:462
ReplaceClientNameMode
Defines the client name replacement modes.
Definition: d2_client_cfg.h:75
static const uint32_t CFGSEL_SUBNET4
Number of IPv4 subnets.
Definition: srv_config.h:175
bool getOverrideClientUpdate() const
Returns whether or not Kea should perform updates, even if client requested delegation.
Definition: srv_config.cc:918
CfgDUIDPtr getCfgDUID()
Returns pointer to the object holding configuration of the server identifier.
Definition: srv_config.h:405
static const uint32_t CFGSEL_ALL
Whole config.
Definition: srv_config.h:195
ConstCfgHostOperationsPtr getCfgHostOperations4() const
Returns const pointer to the object holding general configuration for host reservations in DHCPv4...
Definition: srv_config.h:435
ConstCfgDbAccessPtr getCfgDbAccess() const
Returns const pointer to the object holding configuration of the lease and host database connection p...
Definition: srv_config.h:423
void setClientClassDictionary(const ClientClassDictionaryPtr &dictionary)
Sets the client class dictionary.
Definition: srv_config.h:524
std::string getConfigSummary(const uint32_t selection) const
Returns summary of the configuration in the textual format.
Definition: srv_config.cc:72
bool sequenceEquals(const SrvConfig &other)
Compares configuration sequence with other sequence.
Definition: srv_config.cc:113
void extractConfiguredGlobals(isc::data::ConstElementPtr config)
Saves scalar elements from the global scope of a configuration.
Definition: srv_config.cc:401
ConstCfgSubnets6Ptr getCfgSubnets6() const
Returns pointer to const object holding subnets configuration for DHCPv6.
Definition: srv_config.h:353
isc::hooks::HooksConfig & getHooksConfig()
Returns non-const reference to configured hooks libraries.
Definition: srv_config.h:531
static const uint32_t CFGSEL_DDNS
DDNS enabled/disabled.
Definition: srv_config.h:183
const isc::data::ConstElementPtr getControlSocketInfo() const
Returns information about control socket.
Definition: srv_config.h:476
boost::shared_ptr< const CfgIface > ConstCfgIfacePtr
A pointer to the const CfgIface.
Definition: cfg_iface.h:390
ClientClassDictionaryPtr getClientClassDictionary()
Returns pointer to the dictionary of global client class definitions.
Definition: srv_config.h:512
void sanityChecksLifetime(const std::string &name) const
Conducts sanity checks on global lifetime parameters.
Definition: srv_config.cc:416
CfgSharedNetworks6Ptr getCfgSharedNetworks6() const
Returns pointer to non-const object holding configuration of shared networks in DHCPv6.
Definition: srv_config.h:329
boost::shared_ptr< const CfgHostOperations > ConstCfgHostOperationsPtr
Pointer to the const object.
ConstCfgSubnets4Ptr getCfgSubnets4() const
Returns pointer to const object holding subnets configuration for DHCPv4.
Definition: srv_config.h:337
std::string getGeneratedPrefix() const
Returns the Prefix Kea should use when generating domain-names.
Definition: srv_config.cc:936
isc::data::ConstElementPtr getConfiguredGlobals() const
Returns pointer to configured global parameters.
Definition: srv_config.h:765
CfgHostsPtr getCfgHosts()
Returns pointer to the non-const objects representing host reservations for different IPv4 and IPv6 s...
Definition: srv_config.h:361
CfgSubnets4Ptr getCfgSubnets4()
Returns pointer to non-const object holding subnets configuration for DHCPv4.
Definition: srv_config.h:311
void setDHCPMultiThreading(const isc::data::ConstElementPtr dhcp_multi_threading)
Sets information about the dhcp multi threading.
Definition: srv_config.h:506
static const uint32_t CFGSEL_GLOBALS
Configured globals.
Definition: srv_config.h:187
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
Definition: subnet.h:670
bool getOverrideNoUpdate() const
Returns whether or not Kea should perform updates, even if client requested no updates.
Definition: srv_config.cc:910
boost::shared_ptr< StringSanitizer > StringSanitizerPtr
Definition: strutil.h:348
bool getUseConflictResolution() const
Returns whether or not keah-dhcp-ddns should use conflict resolution.
Definition: srv_config.cc:1000
const isc::data::ConstElementPtr getDHCPMultiThreading() const
Returns DHCP multi threading information.
Definition: srv_config.h:500
uint32_t getDeclinePeriod() const
Returns probation-period.
Definition: srv_config.h:710
CfgOptionPtr getCfgOption()
Returns pointer to the non-const object holding options.
Definition: srv_config.h:293
CfgHostOperationsPtr getCfgHostOperations6()
Returns pointer to the object holding general configuration for host reservations in DHCPv6...
Definition: srv_config.h:441
static const uint32_t CFGSEL_SUBNET6
Number of IPv6 subnets.
Definition: srv_config.h:177
boost::shared_ptr< CfgDUID > CfgDUIDPtr
Pointer to the Non-const object.
Definition: cfg_duid.h:161
void applyDefaultsConfiguredGlobals(const isc::data::SimpleDefaults &defaults)
Applies defaults to global parameters.
Definition: srv_config.cc:330
ConstCfgOptionDefPtr getCfgOptionDef() const
Returns pointer to the const object representing user-defined option definitions. ...
Definition: srv_config.h:283
bool getEchoClientId() const
Returns whether server should send back client-id in DHCPv4.
Definition: srv_config.h:726
boost::shared_ptr< D2ClientConfig > D2ClientConfigPtr
Defines a pointer for D2ClientConfig instances.
const isc::hooks::HooksConfig & getHooksConfig() const
Returns const reference to configured hooks libraries.
Definition: srv_config.h:538
void setDhcp4o6Port(uint16_t port)
Sets DHCP4o6 IPC port.
Definition: srv_config.h:736
Defines classes for storing client class definitions.
std::string getQualifyingSuffix() const
Returns the suffix Kea should use when to qualify partial domain-names.
Definition: srv_config.cc:945
const CfgMACSource & getMACSources() const
Returns const reference to an array that stores MAC/hardware address sources.
Definition: srv_config.h:470
DdnsParams()
Default constructor.
Definition: srv_config.h:49
std::string getHostnameCharReplacement() const
Returns the string to replace invalid characters when scrubbing hostnames.
Definition: srv_config.cc:963
void configureLowerLevelLibraries() const
Convenience method to propagate configuration parameters through inversion of control.
Definition: srv_config.cc:896
void setD2ClientConfig(const D2ClientConfigPtr &d2_client_config)
Sets the D2 client configuration.
Definition: srv_config.h:760
boost::shared_ptr< Subnet > SubnetPtr
A generic pointer to either Subnet4 or Subnet6 object.
Definition: subnet.h:513
static const uint32_t CFGSEL_NONE
Nothing selected.
Definition: srv_config.h:173
boost::shared_ptr< CfgHostOperations > CfgHostOperationsPtr
Pointer to the Non-const object.
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
Definition: lease.h:24
static const uint32_t CFGSEL_ALL4
IPv4 related config.
Definition: srv_config.h:191
DdnsParams(const Subnet6Ptr &subnet, bool d2_client_enabled)
Constructor for DHPCv6 subnets.
Definition: srv_config.h:69
static const uint32_t CFGSEL_IFACE6
Number of v6 ifaces.
Definition: srv_config.h:181
boost::shared_ptr< CfgHosts > CfgHostsPtr
Non-const pointer.
Definition: cfg_hosts.h:941