160 const size_t dns_server_timeout,
173 return (ip_address_);
183 return (dns_server_timeout_);
188 return (ncr_protocol_);
193 return (ncr_format_);
212 std::string
toText()
const;
236 size_t dns_server_timeout_;
309 const std::string& secret, std::string secret_file =
"",
310 uint32_t digestbits = 0);
333 return (digestbits_);
347 return (secret_file_);
397 std::string algorithm_;
403 std::string secret_file_;
407 uint32_t digestbits_;
457 bool inherited_key =
true);
480 return (ip_address_);
512 return (tsig_key_info_);
516 std::string
toText()
const;
526 std::string hostname_;
576 const std::string& key_name =
"");
618 std::string key_name_;
688 return (domains_->size());
696 return (wildcard_domain_);
929 const std::string& mgr_name,
it forwards queries to a single upstream resolver and passes the answers back to the client It is constructed with the address of the forward server Queries are initiated with the question to ask the forward server
This is a base class for exceptions thrown from the DNS library module.
Exception(const char *file, size_t line, const char *what)
Constructor for a given type for exceptions with file name and file line number.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
A generic exception that is thrown when a function is not implemented.
The IOAddress class represents an IP addresses (version agnostic)
D2CfgError(const char *file, size_t line, const char *what)
Acts as a storage vault for D2 global scalar parameters.
size_t getDnsServerTimeout() const
Return the DNS server timeout value.
D2Params()
Default constructor The default constructor creates an instance that has updates disabled.
const isc::asiolink::IOAddress & getIpAddress() const
Return the IP address D2 listens on.
bool operator!=(const D2Params &other) const
Compares two D2Params's for inequality.
const dhcp_ddns::NameChangeFormat & getNcrFormat() const
Return the expected format of inbound requests (NCRs).
size_t getPort() const
Return the TCP/UPD port D2 listens on.
bool operator==(const D2Params &other) const
Compares two D2Params's for equality.
D2Params(const isc::asiolink::IOAddress &ip_address, const size_t port, const size_t dns_server_timeout, const dhcp_ddns::NameChangeProtocol &ncr_protocol, const dhcp_ddns::NameChangeFormat &ncr_format)
Constructor.
virtual ~D2Params()
Destructor.
const dhcp_ddns::NameChangeProtocol & getNcrProtocol() const
Return the socket protocol in use.
std::string getConfigSummary() const
Return summary of the configuration used by D2.
std::string toText() const
Generates a string representation of the class contents.
virtual void validateContents()
Validates member values.
Storage container for scalar configuration parameters.
DScalarContext()
Constructor.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
virtual process::ConfigPtr clone()
Creates a clone of a DStubContext.
virtual ~DScalarContext()
Destructor.
DScalarContext(const DScalarContext &rhs)
Copy constructor.
Parser for DdnsDomainListMgr.
DdnsDomainListMgrPtr parse(data::ConstElementPtr mgr_config, const std::string &mgr_name, const TSIGKeyInfoMapPtr keys)
Performs the actual parsing of the given manager element.
const std::string getName() const
Fetches the manager's name.
DdnsDomainListMgr(const std::string &name)
Constructor.
const DdnsDomainMapPtr & getDomains()
Fetches the domain list.
const DdnsDomainPtr & getWildcardDomain()
Fetches the wild card domain.
virtual bool matchDomain(const std::string &fqdn, DdnsDomainPtr &domain)
Matches a given name to a domain based on a longest match scheme.
void setDomains(DdnsDomainMapPtr domains)
Sets the manger's domain list to the given list of domains.
static const char * wildcard_domain_name_
defines the domain name for denoting the wildcard domain.
virtual ~DdnsDomainListMgr()
Destructor.
uint32_t size() const
Returns the number of domains in the domain list.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
Parser for a list of DdnsDomains.
DdnsDomainMapPtr parse(data::ConstElementPtr domain_list_config, const TSIGKeyInfoMapPtr keys)
Performs the actual parsing of the given list "ddns-domain" elements.
DdnsDomainPtr parse(data::ConstElementPtr domain_config, const TSIGKeyInfoMapPtr keys)
Performs the actual parsing of the given "ddns-domain" element.
const std::string getKeyName() const
Getter which returns the domain's TSIG key name.
const std::string getName() const
Getter which returns the domain's name.
const DnsServerInfoStoragePtr & getServers()
Getter which returns the domain's list of servers.
DdnsDomain(const std::string &name, DnsServerInfoStoragePtr servers, const std::string &key_name="")
Constructor.
virtual ~DdnsDomain()
Destructor.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
Parser for a list of DnsServerInfos.
DnsServerInfoStoragePtr parse(data::ConstElementPtr server_list_config, data::ConstElementPtr domain_config, const TSIGKeyInfoMapPtr keys)
Performs the actual parsing of the given list "dns-server" elements.
Parser for DnsServerInfo.
DnsServerInfoPtr parse(data::ConstElementPtr server_config, data::ConstElementPtr domain_config, const TSIGKeyInfoMapPtr keys)
Performs the actual parsing of the given "dns-server" element.
bool isEnabled() const
Convenience method which returns whether or not the server is enabled.
std::string toText() const
Returns a text representation for the server.
const std::string getKeyName() const
Convenience method which returns the server's TSIG key name.
const TSIGKeyInfoPtr & getTSIGKeyInfo()
Getter which returns the server's TSIGKey info.
const std::string getHostname() const
Getter which returns the server's hostname.
DnsServerInfo(const std::string &hostname, isc::asiolink::IOAddress ip_address, uint32_t port=STANDARD_DNS_PORT, bool enabled=true, const TSIGKeyInfoPtr &tsig_key_info=TSIGKeyInfoPtr(), bool inherited_key=true)
Constructor.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
uint32_t getPort() const
Getter which returns the server's port number.
void enable()
Sets the server's enabled flag to true.
static const uint32_t STANDARD_DNS_PORT
defines DNS standard port value
void disable()
Sets the server's enabled flag to false.
const isc::asiolink::IOAddress & getIpAddress() const
Getter which returns the server's ip_address.
virtual ~DnsServerInfo()
Destructor.
Parser for a list of TSIGKeyInfos.
TSIGKeyInfoMapPtr parse(data::ConstElementPtr key_list_config)
Performs the parsing of the given list "tsig-key" elements.
TSIGKeyInfoPtr parse(data::ConstElementPtr key_config)
Performs the actual parsing of the given "tsig-key" element.
static const char * HMAC_SHA224_STR
TSIGKeyInfo(const std::string &name, const std::string &algorithm, const std::string &secret, std::string secret_file="", uint32_t digestbits=0)
Constructor.
const std::string getAlgorithm() const
Getter which returns the key's algorithm string ID.
virtual ~TSIGKeyInfo()
Destructor.
const D2TsigKeyPtr & getTSIGKey() const
Getter which returns the TSIG key used to sign and verify messages.
static const char * HMAC_MD5_STR
Defines string values for the supported TSIG algorithms.
const std::string getName() const
Getter which returns the key's name.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
static const char * HMAC_SHA1_STR
static const char * HMAC_SHA256_STR
uint32_t getDigestbits() const
Getter which returns the key's minimum truncated length.
static const dns::Name & stringToAlgorithmName(const std::string &algorithm_id)
Converts algorithm id to dns::TSIGKey algorithm dns::Name.
static const char * HMAC_SHA512_STR
const std::string getSecret() const
Getter which returns the key's secret.
const std::string getSecretFile() const
Getter which returns the secret file name.
static const char * HMAC_SHA384_STR
The Name class encapsulates DNS names.
Base class for all configurations.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
std::ostream & operator<<(std::ostream &os, const IOAddress &address)
Insert the IOAddress as a string into stream.
boost::shared_ptr< DdnsDomainListMgr > DdnsDomainListMgrPtr
Defines a pointer for DdnsDomain instances.
boost::shared_ptr< DdnsDomain > DdnsDomainPtr
Defines a pointer for DdnsDomain instances.
boost::shared_ptr< DdnsDomainMap > DdnsDomainMapPtr
Defines a pointer to DdnsDomain storage containers.
std::pair< std::string, TSIGKeyInfoPtr > TSIGKeyInfoMapPair
Defines a iterator pairing of name and TSIGKeyInfo.
boost::shared_ptr< DnsServerInfo > DnsServerInfoPtr
Defines a pointer for DnsServerInfo instances.
std::map< std::string, DdnsDomainPtr > DdnsDomainMap
Defines a map of DdnsDomains, keyed by the domain name.
std::pair< std::string, DdnsDomainPtr > DdnsDomainMapPair
Defines a iterator pairing domain name and DdnsDomain.
boost::shared_ptr< TSIGKeyInfo > TSIGKeyInfoPtr
Defines a pointer for TSIGKeyInfo instances.
std::vector< DnsServerInfoPtr > DnsServerInfoStorage
Defines a storage container for DnsServerInfo pointers.
std::map< std::string, TSIGKeyInfoPtr > TSIGKeyInfoMap
Defines a map of TSIGKeyInfos, keyed by the name.
boost::shared_ptr< DnsServerInfoStorage > DnsServerInfoStoragePtr
Defines a pointer to DnsServerInfo storage containers.
boost::shared_ptr< D2Params > D2ParamsPtr
Defines a pointer for D2Params instances.
boost::shared_ptr< DScalarContext > DScalarContextPtr
Defines a pointer for DScalarContext instances.
boost::shared_ptr< D2TsigKey > D2TsigKeyPtr
Type of pointer to a D2 TSIG key.
boost::shared_ptr< TSIGKeyInfoMap > TSIGKeyInfoMapPtr
Defines a pointer to map of TSIGkeyInfos.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
NameChangeFormat
Defines the list of data wire formats supported.
NameChangeProtocol
Defines the list of socket protocols supported.
boost::shared_ptr< ConfigBase > ConfigPtr
Non-const pointer to the ConfigBase.
Defines the logger used by the top-level component of kea-lfc.
Abstract class for configuration Cfg_* classes.
Base class for user context.