20 #include <boost/foreach.hpp> 162 const size_t dns_server_timeout,
185 return(dns_server_timeout_);
190 return(ncr_protocol_);
205 std::string getConfigSummary()
const;
214 std::string toText()
const;
228 virtual void validateContents();
238 size_t dns_server_timeout_;
309 TSIGKeyInfo(
const std::string& name,
const std::string& algorithm,
310 const std::string& secret, uint32_t digestbits = 0);
333 return (digestbits_);
364 static const dns::Name& stringToAlgorithmName(
const std::string&
390 std::string algorithm_;
397 uint32_t digestbits_;
424 static const uint32_t STANDARD_DNS_PORT = 53;
444 uint32_t port = STANDARD_DNS_PORT,
447 bool inherited_key =
true);
470 return (ip_address_);
495 const std::string getKeyName()
const;
502 return (tsig_key_info_);
506 std::string toText()
const;
516 std::string hostname_;
531 TSIGKeyInfoPtr tsig_key_info_;
565 DdnsDomain(
const std::string& name, DnsServerInfoStoragePtr servers,
566 const std::string& key_name =
"");
605 DnsServerInfoStoragePtr servers_;
608 std::string key_name_;
665 virtual bool matchDomain(
const std::string& fqdn, DdnsDomainPtr& domain);
678 return (domains_->size());
686 return (wildcard_domain_);
699 void setDomains(DdnsDomainMapPtr domains);
711 DdnsDomainMapPtr domains_;
714 DdnsDomainPtr wildcard_domain_;
831 const TSIGKeyInfoMapPtr keys);
856 const TSIGKeyInfoMapPtr keys);
875 const TSIGKeyInfoMapPtr keys);
897 const TSIGKeyInfoMapPtr keys);
919 const std::string& mgr_name,
920 const TSIGKeyInfoMapPtr keys);
926 #endif // D2_CONFIG_H static const char * HMAC_SHA256_STR
The Name class encapsulates DNS names.
static const char * wildcard_domain_name_
defines the domain name for denoting the wildcard domain.
boost::shared_ptr< TSIGKeyInfo > TSIGKeyInfoPtr
Defines a pointer for TSIGKeyInfo instances.
std::ostream & operator<<(std::ostream &os, const D2Params &config)
Dumps the contents of a D2Params as text to an output stream.
virtual process::ConfigPtr clone()
Creates a clone of a DStubContext.
boost::shared_ptr< D2Params > D2ParamsPtr
Defines a pointer for D2Params instances.
boost::shared_ptr< TSIGKeyInfoMap > TSIGKeyInfoMapPtr
Defines a pointer to map of TSIGkeyInfos.
const isc::asiolink::IOAddress & getIpAddress() const
Getter which returns the server's ip_address.
A generic exception that is thrown when a function is not implemented.
boost::shared_ptr< DdnsDomainListMgr > DdnsDomainListMgrPtr
Defines a pointer for DdnsDomain instances.
Parser for a list of DdnsDomains.
boost::shared_ptr< DdnsDomain > DdnsDomainPtr
Defines a pointer for DdnsDomain instances.
virtual ~DScalarContext()
Destructor.
Storage container for scalar configuration parameters.
boost::shared_ptr< D2TsigKey > D2TsigKeyPtr
Type of pointer to a D2 TSIG key.
const std::string getSecret() const
Getter which returns the key's secret.
const std::string getAlgorithm() const
Getter which returns the key's algorithm string ID.
Base class for user context.
Parser for DdnsDomainListMgr.
bool operator!=(const Element &a, const Element &b)
Base class for all configurations.
static const char * HMAC_SHA224_STR
const std::string getName() const
Getter which returns the domain's name.
Exception thrown when the error during configuration handling occurs.
boost::shared_ptr< Element > ElementPtr
boost::shared_ptr< DScalarContext > DScalarContextPtr
Defines a pointer for DScalarContext instances.
const std::string getName() const
Getter which returns the key's name.
uint32_t getPort() const
Getter which returns the server's port number.
const isc::asiolink::IOAddress & getIpAddress() const
Return the IP address D2 listens on.
std::map< std::string, TSIGKeyInfoPtr > TSIGKeyInfoMap
Defines a map of TSIGKeyInfos, keyed by the name.
NameChangeFormat
Defines the list of data wire formats supported.
std::vector< DnsServerInfoPtr > DnsServerInfoStorage
Defines a storage container for DnsServerInfo pointers.
static const char * HMAC_SHA384_STR
size_t getDnsServerTimeout() const
Return the DNS server timeout value.
std::pair< std::string, DdnsDomainPtr > DdnsDomainMapPair
Defines a iterator pairing domain name and DdnsDomain.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
void disable()
Sets the server's enabled flag to false.
uint32_t size() const
Returns the number of domains in the domain list.
bool operator==(const Element &a, const Element &b)
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
Represents a DNS domain that is may be updated dynamically.
const DnsServerInfoStoragePtr & getServers()
Getter which returns the domain's list of servers.
Abstract class for configuration Cfg_* classes.
Parser for a list of DnsServerInfos.
boost::shared_ptr< const Element > ConstElementPtr
const dhcp_ddns::NameChangeProtocol & getNcrProtocol() const
Return the socket protocol in use.
std::map< std::string, DdnsDomainPtr > DdnsDomainMap
Defines a map of DdnsDomains, keyed by the domain name.
Provides storage for and management of a list of DNS domains.
const TSIGKeyInfoPtr & getTSIGKeyInfo()
Getter which returns the server's TSIGKey info.
const D2TsigKeyPtr & getTSIGKey() const
Getter which returns the TSIG key used to sign and verify messages.
const std::string getName() const
Fetches the manager's name.
const DdnsDomainPtr & getWildcardDomain()
Fetches the wild card domain.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-lfc.
Represents a specific DNS Server.
static const char * HMAC_SHA1_STR
const std::string getKeyName() const
Getter which returns the domain's TSIG key name.
const std::string getHostname() const
Getter which returns the server's hostname.
const DdnsDomainMapPtr & getDomains()
Fetches the domain list.
std::pair< std::string, TSIGKeyInfoPtr > TSIGKeyInfoMapPair
Defines a iterator pairing of name and TSIGKeyInfo.
static const char * HMAC_MD5_STR
Defines string values for the supported TSIG algorithms.
NameChangeProtocol
Defines the list of socket protocols supported.
D2CfgError(const char *file, size_t line, const char *what)
uint32_t getDigestbits() const
Getter which returns the key's minimum truncated length.
DScalarContext(const DScalarContext &rhs)
Copy constructor.
Parser for a list of TSIGKeyInfos.
boost::shared_ptr< DnsServerInfoStorage > DnsServerInfoStoragePtr
Defines a pointer to DnsServerInfo storage containers.
The IOAddress class represents an IP addresses (version agnostic)
bool isEnabled() const
Convenience method which returns whether or not the server is enabled.
size_t getPort() const
Return the TCP/UPD port D2 listens on.
const dhcp_ddns::NameChangeFormat & getNcrFormat() const
Return the expected format of inbound requests (NCRs).
void enable()
Sets the server's enabled flag to true.
boost::shared_ptr< DdnsDomainMap > DdnsDomainMapPtr
Defines a pointer to DdnsDomain storage containers.
Parser for DnsServerInfo.
boost::shared_ptr< DnsServerInfo > DnsServerInfoPtr
Defines a pointer for DnsServerInfo instances.
Acts as a storage vault for D2 global scalar parameters.
static const char * HMAC_SHA512_STR
boost::shared_ptr< ConfigBase > ConfigPtr
Non-const pointer to the ConfigBase.
DScalarContext()
Constructor.