33 SrvConfig::SrvConfig()
34 : sequence_(0), cfg_iface_(new
CfgIface()),
45 decline_timer_(0), echo_v4_client_id_(true), dhcp4o6_port_(0),
47 configured_globals_(
Element::createMap()),
49 lenient_option_parsing_(false) {
53 : sequence_(sequence), cfg_iface_(new
CfgIface()),
64 decline_timer_(0), echo_v4_client_id_(true), dhcp4o6_port_(0),
66 configured_globals_(
Element::createMap()),
68 lenient_option_parsing_(false) {
77 if (subnets_num > 0) {
78 s <<
"added IPv4 subnets: " << subnets_num;
80 s <<
"no IPv4 subnets!";
87 if (subnets_num > 0) {
88 s <<
"added IPv6 subnets: " << subnets_num;
90 s <<
"no IPv6 subnets!";
97 s <<
"DDNS: " << (ddns_enabled ?
"enabled" :
"disabled") <<
"; ";
100 if (s.tellp() ==
static_cast<std::streampos
>(0)) {
101 s <<
"no config details available";
104 std::string summary = s.str();
105 size_t last_separator_pos = summary.find_last_of(
";");
106 if (last_separator_pos == summary.length() - 2) {
107 summary.erase(last_separator_pos);
122 new_config.cfg_iface_.reset(
new CfgIface(*cfg_iface_));
124 cfg_option_def_->copyTo(*new_config.cfg_option_def_);
125 cfg_option_->copyTo(*new_config.cfg_option_);
131 new_config.hooks_config_.
clear();
133 for (HookLibsCollection::const_iterator it =
134 hooks_config_.get().begin();
135 it != hooks_config_.get().end(); ++it) {
136 new_config.hooks_config_.
add(it->first, it->second);
144 if (!ConfigBase::equals(other)) {
149 if ((*cfg_iface_ != *other.cfg_iface_) ||
150 (*cfg_option_def_ != *other.cfg_option_def_) ||
151 (*cfg_option_ != *other.cfg_option_) ||
152 (*class_dictionary_ != *other.class_dictionary_) ||
153 (*d2_client_config_ != *other.d2_client_config_)) {
159 if (hooks_config_.
get().size() != other.hooks_config_.
get().size()) {
163 return (hooks_config_.
equal(other.hooks_config_));
175 mergeGlobals(other_srv_config);
184 cfg_option_->merge(cfg_option_def_, (*other_srv_config.
getCfgOption()));
187 merge4(other_srv_config);
189 merge6(other_srv_config);
191 }
catch (
const std::bad_cast&) {
193 " of the SrvConfig as an argument of the call to"
194 " SrvConfig::merge()");
213 cfg_shared_networks6_->merge(cfg_option_def_, *(other.getCfgSharedNetworks6()));
217 *(other.getCfgSubnets6()));
223 SrvConfig::mergeGlobals(
SrvConfig& other) {
228 if (other.getConfiguredGlobals()->find(
"reservation-mode")) {
229 mutable_cfg->
remove(
"reservations-global");
230 mutable_cfg->remove(
"reservations-in-subnet");
231 mutable_cfg->remove(
"reservations-out-of-pool");
235 for (
auto other_global : other.getConfiguredGlobals()->mapValue()) {
244 for (
auto merged_global : config_set->mapValue()) {
245 std::string name = merged_global.first;
248 if (name ==
"decline-probation-period") {
250 }
else if (name ==
"echo-client-id") {
254 }
else if (name ==
"dhcp4o6-port") {
256 }
else if (name ==
"server-tag") {
258 }
else if (name ==
"ip-reservations-unique") {
261 }
catch(
const std::exception& ex) {
262 isc_throw (BadValue,
"Invalid value:" << element->str()
263 <<
" explicit global:" << name);
282 uint32_t max_samples = 0;
284 max_samples = samples->intValue();
286 if (max_samples != 0) {
293 int64_t time_duration = duration->intValue();
294 auto max_age = std::chrono::seconds(time_duration);
296 if (max_samples == 0) {
317 if (configured_globals_->contains(name)) {
318 global = configured_globals_->get(name);
339 for (
auto def_value : defaults) {
351 switch (def_value.type_) {
352 case Element::string: {
356 case Element::integer: {
358 int int_value = boost::lexical_cast<
int>(def_value.value_);
361 catch (
const std::exception& ex) {
363 "Internal error. Integer value expected for: "
364 << def_value.name_ <<
", value is: "
365 << def_value.value_ );
370 case Element::boolean: {
372 if (def_value.value_ == std::string(
"true")) {
374 }
else if (def_value.value_ == std::string(
"false")) {
378 "Internal error. Boolean value for "
379 << def_value.name_ <<
" specified as "
380 << def_value.value_ <<
", expected true or false");
385 case Element::real: {
386 double dbl_value = boost::lexical_cast<
double>(def_value.value_);
393 "Internal error. Incorrect default value type for "
402 if (config->getType() != Element::map) {
406 const std::map<std::string, ConstElementPtr>& values = config->mapValue();
407 for (
auto value = values.begin(); value != values.end(); ++value) {
408 if (value->second->getType() != Element::list &&
409 value->second->getType() != Element::map) {
421 value = has_value->intValue();
424 uint32_t min_value = 0;
427 min_value = has_min->intValue();
430 uint32_t max_value = 0;
433 max_value = has_max->intValue();
436 if (!has_value && !has_min && !has_max) {
440 if (!has_min && !has_max) {
443 }
else if (!has_min) {
446 }
else if (!has_max) {
450 }
else if (has_min) {
457 << name <<
" but no " << name <<
" (default)");
465 if (min_value > max_value) {
466 if (has_min && has_max) {
468 << min_value <<
") is not less than max-" << name <<
" ("
469 << max_value <<
")");
470 }
else if (has_min) {
473 << min_value <<
") is not less than (default) " << name
474 <<
" (" << value <<
")");
478 <<
" (" << value <<
") is not less than max-" << name
479 <<
" (" << max_value <<
")");
484 if ((value < min_value) || (value > max_value)) {
486 << value <<
") is not between min-" << name <<
" ("
487 << min_value <<
") and max-" << name <<
" ("
488 << max_value <<
")");
494 const std::string& name)
const {
501 bool new_value =
true;
507 value = has_value->intValue();
510 uint32_t min_value = 0;
518 min_value = has_min->intValue();
521 uint32_t max_value = 0;
529 max_value = has_max->intValue();
532 if (!has_value && !has_min && !has_max) {
536 if (!has_min && !has_max) {
539 }
else if (!has_min) {
542 }
else if (!has_max) {
546 }
else if (has_min) {
553 << name <<
" but no " << name <<
" (default)");
561 if (min_value > max_value) {
562 if (has_min && has_max) {
563 std::string from_min = (new_min ?
"new" :
"previous");
564 std::string from_max = (new_max ?
"new" :
"previous");
566 <<
" min-" << name <<
" ("
567 << min_value <<
") is not less than "
568 << from_max <<
" max-" << name
569 <<
" (" << max_value <<
")");
570 }
else if (has_min) {
572 std::string from_min = (new_min ?
"new" :
"previous");
573 std::string from_value = (new_value ?
"new" :
"previous");
575 <<
" min-" << name <<
" ("
576 << min_value <<
") is not less than " << from_value
577 <<
" (default) " << name
578 <<
" (" << value <<
")");
581 std::string from_max = (new_max ?
"new" :
"previous");
582 std::string from_value = (new_value ?
"new" :
"previous");
584 <<
" (default) " << name
585 <<
" (" << value <<
") is not less than " << from_max
586 <<
" max-" << name <<
" (" << max_value <<
")");
591 if ((value < min_value) || (value > max_value)) {
592 std::string from_value = (new_value ?
"new" :
"previous");
593 std::string from_min = (new_min ?
"new" :
"previous");
594 std::string from_max = (new_max ?
"new" :
"previous");
596 <<
" (default) " << name <<
" ("
597 << value <<
") is not between " << from_min
598 <<
" min-" << name <<
" (" << min_value
599 <<
") and " << from_max <<
" max-"
600 << name <<
" (" << max_value <<
")");
615 dhcp->setValue(configured_globals_->mapValue());
621 if (family == AF_INET6) {
625 dhcp->set(
"data-directory", Element::create(datadir));
630 dhcp->set(
"decline-probation-period",
631 Element::create(static_cast<long long>(decline_timer_)));
633 if (family == AF_INET) {
634 dhcp->set(
"echo-client-id", Element::create(echo_v4_client_id_));
637 dhcp->set(
"dhcp4o6-port",
638 Element::create(static_cast<int>(dhcp4o6_port_)));
640 dhcp->set(
"dhcp-ddns", d2_client_config_->toElement());
642 dhcp->set(
"interfaces-config", cfg_iface_->toElement());
644 dhcp->set(
"option-def", cfg_option_def_->toElement());
646 dhcp->set(
"option-data", cfg_option_->toElement());
659 std::vector<ElementPtr> sn_list;
661 if (family == AF_INET) {
663 ElementPtr plain_subnets = Element::createList();
665 for (Subnet4Collection::const_iterator subnet = subnets->cbegin();
666 subnet != subnets->cend(); ++subnet) {
669 (*subnet)->getSharedNetwork(network);
673 ElementPtr subnet_cfg = (*subnet)->toElement();
674 sn_list.push_back(subnet_cfg);
675 plain_subnets->add(subnet_cfg);
677 dhcp->set(
"subnet4", plain_subnets);
680 ElementPtr shared_networks = cfg_shared_networks4_->toElement();
681 dhcp->set(
"shared-networks", shared_networks);
684 const std::vector<ElementPtr> networks = shared_networks->listValue();
685 for (
auto network = networks.cbegin();
686 network != networks.cend(); ++network) {
687 const std::vector<ElementPtr> sh_list =
688 (*network)->get(
"subnet4")->listValue();
689 for (
auto subnet = sh_list.cbegin();
690 subnet != sh_list.cend(); ++subnet) {
691 sn_list.push_back(*subnet);
697 ElementPtr plain_subnets = Element::createList();
699 for (Subnet6Collection::const_iterator subnet = subnets->cbegin();
700 subnet != subnets->cend(); ++subnet) {
703 (*subnet)->getSharedNetwork(network);
707 ElementPtr subnet_cfg = (*subnet)->toElement();
708 sn_list.push_back(subnet_cfg);
709 plain_subnets->add(subnet_cfg);
711 dhcp->set(
"subnet6", plain_subnets);
714 ElementPtr shared_networks = cfg_shared_networks6_->toElement();
715 dhcp->set(
"shared-networks", shared_networks);
718 const std::vector<ElementPtr> networks = shared_networks->listValue();
719 for (
auto network = networks.cbegin();
720 network != networks.cend(); ++network) {
721 const std::vector<ElementPtr> sh_list =
722 (*network)->get(
"subnet6")->listValue();
723 for (
auto subnet = sh_list.cbegin();
724 subnet != sh_list.cend(); ++subnet) {
725 sn_list.push_back(*subnet);
736 if (global_resvs->size() > 0) {
737 dhcp->set(
"reservations", global_resvs);
741 for (std::vector<ElementPtr>::const_iterator subnet = sn_list.cbegin();
742 subnet != sn_list.cend(); ++subnet) {
747 SubnetID subnet_id =
id->intValue();
749 (*subnet)->set(
"reservations", resvs);
754 dhcp->set(
"expired-leases-processing", expired);
755 if (family == AF_INET6) {
757 dhcp->set(
"server-id", cfg_duid_->toElement());
760 dhcp->set(
"relay-supplied-options", cfg_rsoo_->toElement());
764 dhcp->set(
"lease-database", lease_db.
toElement());
768 if (hosts_databases->size() > 0) {
769 dhcp->set(
"hosts-databases", hosts_databases);
773 if (family == AF_INET) {
774 host_ids = cfg_host_operations4_->toElement();
776 host_ids = cfg_host_operations6_->toElement();
778 dhcp->set(
"host-reservation-identifiers", host_ids);
780 if (family == AF_INET6) {
781 dhcp->set(
"mac-sources", cfg_mac_source_.
toElement());
784 if (!
isNull(control_socket_)) {
785 dhcp->set(
"control-socket", UserContext::toElement(control_socket_));
790 if (!client_classes->empty()) {
791 dhcp->set(
"client-classes", client_classes);
795 dhcp->set(
"hooks-libraries", hooks_libs);
797 result->set(family == AF_INET ?
"Dhcp4" :
"Dhcp6", dhcp);
800 dhcp->set(
"sanity-checks", cfg_consist);
806 dhcp->set(
"config-control", info_elem);
811 if (dhcp_queue_control) {
812 dhcp->set(
"dhcp-queue-control", dhcp_queue_control);
817 if (dhcp_multi_threading) {
818 dhcp->set(
"multi-threading", dhcp_multi_threading);
838 if (!srv_elem || (srv_elem->getType() != Element::map)) {
842 if (!srv_elem->contains(
"dhcp-ddns")) {
847 ElementPtr d2_elem = boost::const_pointer_cast<
Element>(srv_elem->get(
"dhcp-ddns"));
848 if (!d2_elem || (d2_elem->getType() != Element::map)) {
853 std::string from_name;
857 std::vector<Param> params {
858 {
"override-no-update",
"ddns-override-no-update" },
859 {
"override-client-update",
"ddns-override-client-update" },
860 {
"replace-client-name",
"ddns-replace-client-name" },
861 {
"generated-prefix",
"ddns-generated-prefix" },
862 {
"qualifying-suffix",
"ddns-qualifying-suffix" },
863 {
"hostname-char-set",
"hostname-char-set" },
864 {
"hostname-char-replacement",
"hostname-char-replacement" }
867 for (
auto param : params) {
868 if (d2_elem->contains(param.from_name)) {
869 if (!srv_elem->contains(param.to_name)) {
871 srv_elem->set(param.to_name, d2_elem->get(param.from_name));
873 .arg(param.from_name).arg(param.to_name);
877 .arg(param.from_name).arg(param.to_name);
881 d2_elem->remove(param.from_name);
906 return (d2_client_enabled_ && subnet_->getDdnsSendUpdates().get());
915 return (subnet_->getDdnsOverrideNoUpdate().get());
923 return (subnet_->getDdnsOverrideClientUpdate().get());
932 return (subnet_->getDdnsReplaceClientNameMode().get());
941 return (subnet_->getDdnsGeneratedPrefix().get());
950 return (subnet_->getDdnsQualifyingSuffix().get());
959 return (subnet_->getHostnameCharSet().get());
968 return (subnet_->getHostnameCharReplacement().get());
975 std::string char_set = getHostnameCharSet();
976 if (!char_set.empty()) {
979 getHostnameCharReplacement()));
980 }
catch (
const std::exception& ex) {
982 "' is not a valid regular expression");
996 return (subnet_->getDdnsUpdateOnRenew().get());
1005 return (subnet_->getDdnsUseConflictResolution().get());
const isc::log::MessageID DHCPSRV_CFGMGR_IP_RESERVATIONS_UNIQUE_DUPLICATES_POSSIBLE
#define LOG_WARN(LOGGER, MESSAGE)
Macro to conveniently test warn output and log it.
Represents configuration of the RSOO options for the DHCP server.
D2ClientConfigPtr getD2ClientConfig()
Returns pointer to the D2 client configuration.
void unspecified(bool unspecified)
Modifies the flag that indicates whether the value is specified or unspecified.
void internalize(isc::data::ConstElementPtr list)
Internalize a list Element.
D2ClientConfig::ReplaceClientNameMode getReplaceClientNameMode() const
Returns how Kea should handle the domain-name supplied by the client.
SrvConfig()
Default constructor.
const isc::hooks::HookLibsCollection & get() const
Provides access to the configured hooks libraries.
isc::data::ConstElementPtr getConfiguredGlobal(std::string name) const
Returns pointer to a given configured global parameter.
#define LOG_INFO(LOGGER, MESSAGE)
Macro to conveniently test info output and log it.
Utility class to represent host reservation configurations internally as a map keyed by subnet IDs...
Holds subnets configured for the DHCPv6 server.
void setMaxSampleCountDefault(uint32_t max_samples)
Set default count limit.
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.
process::ConstConfigControlInfoPtr getConfigControlInfo() const
Fetches a read-only copy of the configuration control information.
isc::data::ConstElementPtr get(SubnetID id) const
Return the host reservations for a subnet ID.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
Represents configuration of IPv4 shared networks.
static CfgMgr & instance()
returns a single instance of Configuration Manager
Base class for all configurations.
void removeStatistics()
Removes statistics.
boost::shared_ptr< Subnet4 > Subnet4Ptr
A pointer to a Subnet4 object.
void copy(SrvConfig &new_config) const
Copies the current configuration to a new configuration.
boost::shared_ptr< Element > ElementPtr
uint32_t getSequence() const
Returns configuration sequence number.
void setMaxSampleCountAll(uint32_t max_samples)
Set count limit for all collected statistics.
CfgSubnets6Ptr getCfgSubnets6()
Returns pointer to non-const object holding subnets configuration for DHCPv6.
Holds configuration parameters pertaining to lease expiration and lease affinity. ...
bool getUpdateOnRenew() const
Returns whether or not DNS should be updated when leases renew.
bool isNull(ConstElementPtr p)
Checks whether the given ElementPtr is a NULL pointer.
void updateStatistics()
Updates statistics.
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
bool equals(const SrvConfig &other) const
Compares two objects for equality.
void setIPReservationsUnique(const bool unique)
Configures the server to allow or disallow specifying multiple hosts with the same IP address/subnet...
void contextToElement(data::ElementPtr map) const
Merge unparse a user_context object.
Maintains a list of ClientClassDef's.
static StatsMgr & instance()
Statistics Manager accessor method.
Statistics Manager class.
boost::shared_ptr< DdnsParams > DdnsParamsPtr
Defines a pointer for DdnsParams instances.
void clear()
Removes all configured hooks libraries.
void setMaxSampleAgeAll(const StatsDuration &duration)
Set duration limit for all collected statistics.
CfgOptionDefPtr getCfgOptionDef()
Return pointer to non-const object representing user-defined option definitions.
void setEchoClientId(const bool echo)
Sets whether server should send back client-id in DHCPv4.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
Parameters for various consistency checks.
util::Optional< std::string > getDataDir() const
returns path do the data directory
Represents option data configuration for the DHCP server.
boost::multi_index_container< Subnet4Ptr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetSubnetIdIndexTag >, boost::multi_index::const_mem_fun< Subnet, SubnetID,&Subnet::getID > >, boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetPrefixIndexTag >, boost::multi_index::const_mem_fun< Subnet, std::string,&Subnet::toText > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetServerIdIndexTag >, boost::multi_index::const_mem_fun< Network4, asiolink::IOAddress,&Network4::getServerId > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetModificationTimeIndexTag >, boost::multi_index::const_mem_fun< data::BaseStampedElement, boost::posix_time::ptime,&data::BaseStampedElement::getModificationTime > > >> Subnet4Collection
A collection of Subnet4 objects.
ElementPtr copy(ConstElementPtr from, int level)
Copy the data up to a nesting level.
bool getEnableUpdates() const
Returns whether or not DHCP DDNS updating is enabled.
void setDeclinePeriod(const uint32_t decline_timer)
Sets decline probation-period.
Acts as a storage vault for D2 client configuration.
isc::data::ElementPtr toElement() const
Unparse a configuration object.
Notes: IntElement type is changed to int64_t.
const isc::data::ConstElementPtr getDHCPQueueControl() const
Returns DHCP queue control information.
void addConfiguredGlobal(const std::string &name, isc::data::ConstElementPtr value)
Adds a parameter to the collection configured globals.
uint16_t getFamily() const
Returns address family.
static void moveReservationMode(isc::data::ElementPtr config)
Moves deprecated reservation-mode parameter to new reservations flags.
boost::shared_ptr< const Element > ConstElementPtr
Represents option definitions used by the DHCP server.
Holds access parameters and the configuration of the lease and hosts database connection.
CfgDbAccessPtr getCfgDbAccess()
Returns pointer to the object holding configuration of the lease and host database connection paramet...
Represents global configuration for host reservations.
Holds subnets configured for the DHCPv4 server.
isc::util::str::StringSanitizerPtr getHostnameSanitizer() const
Returns a regular expression string sanitizer.
boost::shared_ptr< SharedNetwork6 > SharedNetwork6Ptr
Pointer to SharedNetwork6 object.
Convenience container for conveying DDNS behavioral parameters It is intended to be created per Packe...
Implements a regular expression based string scrubber.
boost::shared_ptr< SharedNetwork4 > SharedNetwork4Ptr
Pointer to SharedNetwork4 object.
DdnsParamsPtr getDdnsParams(const Subnet4Ptr &subnet) const
Fetches the DDNS parameters for a given DHCPv4 subnet.
Represents the position of the data element within a configuration string.
boost::multi_index_container< Subnet6Ptr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetSubnetIdIndexTag >, boost::multi_index::const_mem_fun< Subnet, SubnetID,&Subnet::getID > >, boost::multi_index::ordered_unique< boost::multi_index::tag< SubnetPrefixIndexTag >, boost::multi_index::const_mem_fun< Subnet, std::string,&Subnet::toText > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< SubnetModificationTimeIndexTag >, boost::multi_index::const_mem_fun< data::BaseStampedElement, boost::posix_time::ptime,&data::BaseStampedElement::getModificationTime > > >> Subnet6Collection
A collection of Subnet6 objects.
utility class for unparsing
Represents configuration of IPv6 shared networks.
Specifies current DHCP configuration.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void add(std::string libname, isc::data::ConstElementPtr parameters)
Adds additional hooks libraries.
CfgSharedNetworks4Ptr getCfgSharedNetworks4() const
Returns pointer to non-const object holding configuration of shared networks in DHCPv4;.
virtual void merge(ConfigBase &other)
Merges the configuration specified as a parameter into this configuration.
std::string getHostnameCharSet() const
Returns the regular expression describing invalid characters for client hostnames.
void clearConfiguredGlobals()
Removes all configured global parameters.
void merge(ElementPtr element, ConstElementPtr other)
Merges the data from other into element.
const isc::log::MessageID DHCPSRV_CFGMGR_DDNS_PARAMETER_MOVED
const isc::log::MessageID DHCPSRV_CFGMGR_DDNS_PARAMETER_IGNORED
ReplaceClientNameMode
Defines the client name replacement modes.
static const uint32_t CFGSEL_SUBNET4
Number of IPv4 subnets.
bool getOverrideClientUpdate() const
Returns whether or not Kea should perform updates, even if client requested delegation.
void setServerTag(const util::Optional< std::string > &server_tag)
Sets the server's logical name.
std::string getConfigSummary(const uint32_t selection) const
Returns summary of the configuration in the textual format.
A generic exception that is thrown if a function is called in a prohibited way.
bool sequenceEquals(const SrvConfig &other)
Compares configuration sequence with other sequence.
void extractConfiguredGlobals(isc::data::ConstElementPtr config)
Saves scalar elements from the global scope of a configuration.
The Element class represents a piece of data, used by the command channel and configuration parts...
Represents the host reservations specified in the configuration file.
static const uint32_t CFGSEL_DDNS
DDNS enabled/disabled.
void setMaxSampleAgeDefault(const StatsDuration &duration)
Set default duration limit.
virtual isc::data::ElementPtr toElement() const
Unparse.
void sanityChecksLifetime(const std::string &name) const
Conducts sanity checks on global lifetime parameters.
CfgSharedNetworks6Ptr getCfgSharedNetworks6() const
Returns pointer to non-const object holding configuration of shared networks in DHCPv6.
std::string getGeneratedPrefix() const
Returns the Prefix Kea should use when generating domain-names.
isc::data::ConstElementPtr getConfiguredGlobals() const
Returns pointer to configured global parameters.
static bool haveInstance()
Indicates if the lease manager has been instantiated.
CfgHostsPtr getCfgHosts()
Returns pointer to the non-const objects representing host reservations for different IPv4 and IPv6 s...
CfgSubnets4Ptr getCfgSubnets4()
Returns pointer to non-const object holding subnets configuration for DHCPv4.
isc::log::Logger dhcpsrv_logger("dhcpsrv")
DHCP server library Logger.
boost::shared_ptr< Subnet6 > Subnet6Ptr
A pointer to a Subnet6 object.
bool getOverrideNoUpdate() const
Returns whether or not Kea should perform updates, even if client requested no updates.
boost::shared_ptr< StringSanitizer > StringSanitizerPtr
bool getUseConflictResolution() const
Returns whether or not keah-dhcp-ddns should use conflict resolution.
virtual void remove(const int i)
Removes the element at the given position.
const isc::data::ConstElementPtr getDHCPMultiThreading() const
Returns DHCP multi threading information.
CfgOptionPtr getCfgOption()
Returns pointer to the non-const object holding options.
static const uint32_t CFGSEL_SUBNET6
Number of IPv6 subnets.
void applyDefaultsConfiguredGlobals(const isc::data::SimpleDefaults &defaults)
Applies defaults to global parameters.
void setDhcp4o6Port(uint16_t port)
Sets DHCP4o6 IPC port.
static bool lenient_parsing_
Governs whether options should be parsed less strictly.
std::string getQualifyingSuffix() const
Returns the suffix Kea should use when to qualify partial domain-names.
std::string getHostnameCharReplacement() const
Returns the string to replace invalid characters when scrubbing hostnames.
void configureLowerLevelLibraries() const
Convenience method to propagate configuration parameters through inversion of control.
Holds manual configuration of the server identifier (DUID).
void setD2ClientConfig(const D2ClientConfigPtr &d2_client_config)
Sets the D2 client configuration.
virtual isc::data::ElementPtr toElement() const
Unparse.
bool equal(const HooksConfig &other) const
Compares two Hooks Config classes for equality.
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)
boost::shared_ptr< const ConfigControlInfo > ConstConfigControlInfoPtr
Defines a pointer to a const ConfigControlInfo.