 |
Kea
1.5.0
|
Go to the documentation of this file.
7 #ifndef D2_CLIENT_CFG_H
8 #define D2_CLIENT_CFG_H
22 #include <boost/shared_ptr.hpp>
110 const size_t server_port,
112 const size_t sender_port,
113 const size_t max_queue_size,
116 const bool override_no_update,
117 const bool override_client_update,
119 const std::string& generated_prefix,
120 const std::string& qualifying_suffix,
121 const std::string& hostname_char_set,
122 const std::string& hostname_char_replacement);
134 return(enable_updates_);
144 return(server_port_);
154 return(sender_port_);
159 return(max_queue_size_);
164 return(ncr_protocol_);
174 return(override_no_update_);
179 return(override_client_update_);
184 return(replace_client_name_mode_);
189 return(generated_prefix_);
194 return(qualifying_suffix_);
199 return(hostname_char_set_);
204 return(hostname_char_replacement_);
210 return(hostname_sanitizer_);
220 std::string
toText()
const;
266 bool enable_updates_;
281 size_t max_queue_size_;
293 bool override_no_update_;
296 bool override_client_update_;
302 std::string generated_prefix_;
305 std::string qualifying_suffix_;
309 std::string hostname_char_set_;
313 std::string hostname_char_replacement_;
320 operator<<(std::ostream& os,
const D2ClientConfig& config);
static ReplaceClientNameMode stringToReplaceClientNameMode(const std::string &mode_str)
Converts labels to ReplaceClientNameMode enum values.
size_t getMaxQueueSize() const
Return Maximum sender queue size.
size_t getServerPort() const
Return the IP port of kea-dhcp-ddns.
static const size_t DFT_SERVER_PORT
static const char * DFT_REPLACE_CLIENT_NAME_MODE
bool getEnableUpdates() const
Return whether or not DHCP-DDNS updating is enabled.
static std::string replaceClientNameModeToString(const ReplaceClientNameMode &mode)
Converts NameChangeFormat enums to text labels.
util::str::StringSanitizerPtr getHostnameSanitizer() const
Return pointer to compiled regular expression string sanitizer Will be empty if hostname-char-set is ...
The IOAddress class represents an IP addresses (version agnostic)
bool operator==(const D2ClientConfig &other) const
Compares two D2ClientConfigs for equality.
static const char * DFT_HOSTNAME_CHAR_REPLACEMENT
Abstract class for configuration Cfg_* classes.
static const char * DFT_V6_SENDER_IP
bool getOverrideClientUpdate() const
Return if updates are done even when clients request delegation.
Base class for user context.
static const size_t DFT_SENDER_PORT
static const bool DFT_OVERRIDE_NO_UPDATE
static const char * DFT_GENERATED_PREFIX
virtual void validateContents()
Validates member values.
static const size_t DFT_MAX_QUEUE_SIZE
This is a base class for exceptions thrown from the DNS library module.
void enableUpdates(bool enable)
Sets enable-updates flag to the given value.
Defines the logger used by the top-level component of kea-dhcp-ddns.
ReplaceClientNameMode
Defines the client name replacement modes.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
static const char * DFT_NCR_FORMAT
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
static const char * DFT_V4_SENDER_IP
Acts as a storage vault for D2 client configuration.
const isc::asiolink::IOAddress & getSenderIp() const
Return the IP address client should use to send.
D2ClientConfig()
Default constructor The default constructor creates an instance that has updates disabled.
bool operator!=(const D2ClientConfig &other) const
Compares two D2ClientConfigs for inequality.
boost::shared_ptr< StringSanitizer > StringSanitizerPtr
virtual ~D2ClientConfig()
Destructor.
boost::shared_ptr< D2ClientConfig > D2ClientConfigPtr
Defines a pointer for D2ClientConfig instances.
static const char * DFT_NCR_PROTOCOL
ReplaceClientNameMode getReplaceClientNameMode() const
Return mode of replacement to use regarding client's client's domain-name.
const std::string & getHostnameCharSet() const
Return the char set regexp used to sanitize client hostnames.
D2ClientError(const char *file, size_t line, const char *what)
constructor
std::string toText() const
Generates a string representation of the class contents.
const std::string & getQualifyingSuffix() const
Return the suffix to use to qualify partial domain-names.
bool getOverrideNoUpdate() const
Return if updates are done even if clients request no updates.
static const bool DFT_OVERRIDE_CLIENT_UPDATE
boost::shared_ptr< Element > ElementPtr
This file defines abstract classes for exchanging NameChangeRequests.
static const char * DFT_SERVER_IP
Default configuration constants.
static const char * DFT_HOSTNAME_CHAR_SET
const isc::asiolink::IOAddress & getServerIp() const
Return the IP address of kea-dhcp-ddns (IPv4 or IPv6).
std::ostream & operator<<(std::ostream &os, const OpaqueDataTuple &tuple)
Inserts the OpaqueDataTuple as a string into stream.
const dhcp_ddns::NameChangeProtocol & getNcrProtocol() const
Return the socket protocol to use with kea-dhcp-ddns.
const std::string & getHostnameCharReplacement() const
Return the invalid char replacement used to sanitize client hostnames.
An exception that is thrown if an error occurs while configuring the D2 DHCP DDNS client.
NameChangeFormat
Defines the list of data wire formats supported.
const dhcp_ddns::NameChangeFormat & getNcrFormat() const
Return the kea-dhcp-ddns request format.
const std::string & getGeneratedPrefix() const
Return the prefix to use when generating domain-names.
size_t getSenderPort() const
Return the IP port client should use to send.
NameChangeProtocol
Defines the list of socket protocols supported.