Kea  2.1.7-git
isc::dhcp::DdnsParams Class Reference

Convenience container for conveying DDNS behavioral parameters It is intended to be created per Packet exchange using the selected subnet passed into functions that require them. More...

#include <srv_config.h>

Public Member Functions

 DdnsParams ()
 Default constructor. More...
 
 DdnsParams (const Subnet4Ptr &subnet, bool d2_client_enabled)
 Constructor for DHPCv4 subnets. More...
 
 DdnsParams (const Subnet6Ptr &subnet, bool d2_client_enabled)
 Constructor for DHPCv6 subnets. More...
 
bool getEnableUpdates () const
 Returns whether or not DHCP DDNS updating is enabled. More...
 
std::string getGeneratedPrefix () const
 Returns the Prefix Kea should use when generating domain-names. More...
 
std::string getHostnameCharReplacement () const
 Returns the string to replace invalid characters when scrubbing hostnames. More...
 
std::string getHostnameCharSet () const
 Returns the regular expression describing invalid characters for client hostnames. More...
 
isc::util::str::StringSanitizerPtr getHostnameSanitizer () const
 Returns a regular expression string sanitizer. More...
 
bool getOverrideClientUpdate () const
 Returns whether or not Kea should perform updates, even if client requested delegation. More...
 
bool getOverrideNoUpdate () const
 Returns whether or not Kea should perform updates, even if client requested no updates. More...
 
std::string getQualifyingSuffix () const
 Returns the suffix Kea should use when to qualify partial domain-names. More...
 
D2ClientConfig::ReplaceClientNameMode getReplaceClientNameMode () const
 Returns how Kea should handle the domain-name supplied by the client. More...
 
SubnetID getSubnetId () const
 Returns the subnet-id of the subnet associated with these parameters. More...
 
bool getUpdateOnRenew () const
 Returns whether or not DNS should be updated when leases renew. More...
 
bool getUseConflictResolution () const
 Returns whether or not keah-dhcp-ddns should use conflict resolution. More...
 

Detailed Description

Convenience container for conveying DDNS behavioral parameters It is intended to be created per Packet exchange using the selected subnet passed into functions that require them.

Definition at line 47 of file srv_config.h.

Constructor & Destructor Documentation

◆ DdnsParams() [1/3]

isc::dhcp::DdnsParams::DdnsParams ( )
inline

Default constructor.

Definition at line 50 of file srv_config.h.

◆ DdnsParams() [2/3]

isc::dhcp::DdnsParams::DdnsParams ( const Subnet4Ptr subnet,
bool  d2_client_enabled 
)
inline

Constructor for DHPCv4 subnets.

Parameters
subnetPointer to Subnet4 instance to use for fetching parameter values (typically this is the selected subnet).
d2_client_enabledflag which indicates whether or not D2Client is enabled (typically the value should come from global D2Client configuration).

Definition at line 59 of file srv_config.h.

◆ DdnsParams() [3/3]

isc::dhcp::DdnsParams::DdnsParams ( const Subnet6Ptr subnet,
bool  d2_client_enabled 
)
inline

Constructor for DHPCv6 subnets.

Parameters
subnetPointer to Subnet6 instance to use for fetching parameter values (typically this is the selected subnet).
d2_client_enabledflag which indicates whether or not D2Client is enabled (typically the value should come from global D2Client configuration).

Definition at line 70 of file srv_config.h.

References getEnableUpdates(), getGeneratedPrefix(), getHostnameCharReplacement(), getHostnameCharSet(), getHostnameSanitizer(), getOverrideClientUpdate(), getOverrideNoUpdate(), getQualifyingSuffix(), getReplaceClientNameMode(), getUpdateOnRenew(), and getUseConflictResolution().

+ Here is the call graph for this function:

Member Function Documentation

◆ getEnableUpdates()

bool isc::dhcp::DdnsParams::getEnableUpdates ( ) const

Returns whether or not DHCP DDNS updating is enabled.

The value is the logical AND of d2_client_enabled_ and the value returned by subnet_'s getDdnsSendUpdates().

Returns
True if updates are enabled, false otherwise or if subnet_ is empty.

Definition at line 905 of file srv_config.cc.

Referenced by isc::dhcp::D2ClientMgr::analyzeFqdn(), isc::dhcp::Dhcpv4Srv::createNameChangeRequests(), and DdnsParams().

◆ getGeneratedPrefix()

std::string isc::dhcp::DdnsParams::getGeneratedPrefix ( ) const

Returns the Prefix Kea should use when generating domain-names.

Returns
The value from the subnet_ or an empty string if subnet_ is empty.

Definition at line 940 of file srv_config.cc.

Referenced by DdnsParams(), and isc::dhcp::D2ClientMgr::generateFqdn().

◆ getHostnameCharReplacement()

std::string isc::dhcp::DdnsParams::getHostnameCharReplacement ( ) const

Returns the string to replace invalid characters when scrubbing hostnames.

Meaningful only if hostname_char_set_ is not empty.

Returns
The value from the subnet_ or an empty string if subnet_ is empty.

Definition at line 967 of file srv_config.cc.

Referenced by DdnsParams().

◆ getHostnameCharSet()

std::string isc::dhcp::DdnsParams::getHostnameCharSet ( ) const

Returns the regular expression describing invalid characters for client hostnames.

If empty, host name scrubbing should not be done.

Returns
The value from the subnet_ or an empty string if subnet_ is empty.

Definition at line 958 of file srv_config.cc.

Referenced by DdnsParams().

◆ getHostnameSanitizer()

util::str::StringSanitizerPtr isc::dhcp::DdnsParams::getHostnameSanitizer ( ) const

Returns a regular expression string sanitizer.

If the value returned by getHostnameCharSet() is not empty, then it is used in conjunction the value returned by getHostnameCharReplacment() (which may be empty) to create and return a StringSanitizer instance. Otherwise it will return an empty pointer.

Returns
pointer to the StringSanitizer instance or an empty pointer
Exceptions
BadValueif the compilation fails.

Definition at line 976 of file srv_config.cc.

References isc_throw.

Referenced by isc::dhcp::D2ClientMgr::adjustDomainName(), and DdnsParams().

◆ getOverrideClientUpdate()

bool isc::dhcp::DdnsParams::getOverrideClientUpdate ( ) const

Returns whether or not Kea should perform updates, even if client requested delegation.

Returns
The value from the subnet_ or false if subnet_ is empty.

Definition at line 922 of file srv_config.cc.

Referenced by isc::dhcp::D2ClientMgr::analyzeFqdn(), and DdnsParams().

◆ getOverrideNoUpdate()

bool isc::dhcp::DdnsParams::getOverrideNoUpdate ( ) const

Returns whether or not Kea should perform updates, even if client requested no updates.

Returns
The value from the subnet_ or false if subnet_ is empty.

Definition at line 914 of file srv_config.cc.

Referenced by isc::dhcp::D2ClientMgr::analyzeFqdn(), and DdnsParams().

◆ getQualifyingSuffix()

std::string isc::dhcp::DdnsParams::getQualifyingSuffix ( ) const

Returns the suffix Kea should use when to qualify partial domain-names.

Returns
The value from the subnet_ or an empty string if subnet_ is empty.

Definition at line 949 of file srv_config.cc.

Referenced by DdnsParams(), and isc::dhcp::D2ClientMgr::qualifyName().

◆ getReplaceClientNameMode()

D2ClientConfig::ReplaceClientNameMode isc::dhcp::DdnsParams::getReplaceClientNameMode ( ) const

Returns how Kea should handle the domain-name supplied by the client.

Returns
The value from the subnet_ or RCM_NEVER if subnet_ is empty.

Definition at line 931 of file srv_config.cc.

References isc::dhcp::D2ClientConfig::RCM_NEVER.

Referenced by isc::dhcp::D2ClientMgr::adjustDomainName(), and DdnsParams().

◆ getSubnetId()

SubnetID isc::dhcp::DdnsParams::getSubnetId ( ) const
inline

Returns the subnet-id of the subnet associated with these parameters.

Returns
value of subnet-id (or 0 if no subnet is associated)

Definition at line 155 of file srv_config.h.

◆ getUpdateOnRenew()

bool isc::dhcp::DdnsParams::getUpdateOnRenew ( ) const

Returns whether or not DNS should be updated when leases renew.

If this is true, DNS should always be updated when leases are extended (i.e. renewed/rebound) even if the DNS information has not changed.

Returns
True if updates should always be performed.

Definition at line 995 of file srv_config.cc.

Referenced by isc::dhcp::Dhcpv4Srv::createNameChangeRequests(), and DdnsParams().

◆ getUseConflictResolution()

bool isc::dhcp::DdnsParams::getUseConflictResolution ( ) const

Returns whether or not keah-dhcp-ddns should use conflict resolution.

This value is communicated to D2 via the NCR. When true, D2 should follow follow conflict resolution steps described in RFC 4703. If not, it should simple add or remove entries.

Returns
True if conflict resolution should be used.

Definition at line 1004 of file srv_config.cc.

Referenced by DdnsParams().


The documentation for this class was generated from the following files: