7 #ifndef D2_CLIENT_CFG_H
8 #define D2_CLIENT_CFG_H
22 #include <boost/shared_ptr.hpp>
99 const size_t server_port,
101 const size_t sender_port,
102 const size_t max_queue_size,
115 return(enable_updates_);
125 return(server_port_);
135 return(sender_port_);
140 return(max_queue_size_);
145 return(ncr_protocol_);
160 std::string
toText()
const;
205 bool enable_updates_;
220 size_t max_queue_size_;
232 operator<<(std::ostream& os,
const D2ClientConfig& config);
static const char * DFT_NCR_PROTOCOL
static const char * DFT_SERVER_IP
Default configuration constants.
bool operator!=(const D2ClientConfig &other) const
Compares two D2ClientConfigs for inequality.
static const char * DFT_REPLACE_CLIENT_NAME_MODE
std::string toText() const
Generates a string representation of the class contents.
static const char * DFT_V6_SENDER_IP
This file defines abstract classes for exchanging NameChangeRequests.
const isc::asiolink::IOAddress & getSenderIp() const
Return the IP address client should use to send.
size_t getSenderPort() const
Return the IP port client should use to send.
static const char * DFT_HOSTNAME_CHAR_SET
Base class for user context.
static const size_t DFT_MAX_QUEUE_SIZE
static const size_t DFT_SERVER_PORT
static const char * DFT_NCR_FORMAT
std::function< data::ConstElementPtr()> FetchNetworkGlobalsFn
Callback function for D2ClientConfig that retrieves globally configured parameters.
static const bool DFT_OVERRIDE_CLIENT_UPDATE
boost::shared_ptr< Element > ElementPtr
static const bool DFT_OVERRIDE_NO_UPDATE
NameChangeFormat
Defines the list of data wire formats supported.
bool operator==(const D2ClientConfig &other) const
Compares two D2ClientConfigs for equality.
const dhcp_ddns::NameChangeProtocol & getNcrProtocol() const
Return the socket protocol to use with kea-dhcp-ddns.
D2ClientConfig()
Default constructor The default constructor creates an instance that has updates disabled.
const isc::asiolink::IOAddress & getServerIp() const
Return the IP address of kea-dhcp-ddns (IPv4 or IPv6).
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
An exception that is thrown if an error occurs while configuring the D2 DHCP DDNS client...
size_t getServerPort() const
Return the IP port of kea-dhcp-ddns.
static const char * DFT_V4_SENDER_IP
Acts as a storage vault for D2 client configuration.
static const char * DFT_GENERATED_PREFIX
Abstract class for configuration Cfg_* classes.
static const char * DFT_HOSTNAME_CHAR_REPLACEMENT
virtual ~D2ClientConfig()
Destructor.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
virtual void validateContents()
Validates member values.
const dhcp_ddns::NameChangeFormat & getNcrFormat() const
Return the kea-dhcp-ddns request format.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
ReplaceClientNameMode
Defines the client name replacement modes.
std::ostream & operator<<(std::ostream &os, const OpaqueDataTuple &tuple)
Inserts the OpaqueDataTuple as a string into stream.
static const size_t DFT_SENDER_PORT
NameChangeProtocol
Defines the list of socket protocols supported.
D2ClientError(const char *file, size_t line, const char *what)
constructor
The IOAddress class represents an IP addresses (version agnostic)
boost::shared_ptr< D2ClientConfig > D2ClientConfigPtr
Defines a pointer for D2ClientConfig instances.
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.
static ReplaceClientNameMode stringToReplaceClientNameMode(const std::string &mode_str)
Converts labels to ReplaceClientNameMode enum values.
size_t getMaxQueueSize() const
Return Maximum sender queue size.
void enableUpdates(bool enable)
Sets enable-updates flag to the given value.