Kea
1.9.9-git
|
Acts as a storage vault for D2 global scalar parameters. More...
#include <d2_config.h>
Public Member Functions | |
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. More... | |
D2Params () | |
Default constructor The default constructor creates an instance that has updates disabled. More... | |
virtual | ~D2Params () |
Destructor. More... | |
std::string | getConfigSummary () const |
Return summary of the configuration used by D2. More... | |
size_t | getDnsServerTimeout () const |
Return the DNS server timeout value. More... | |
const isc::asiolink::IOAddress & | getIpAddress () const |
Return the IP address D2 listens on. More... | |
const dhcp_ddns::NameChangeFormat & | getNcrFormat () const |
Return the expected format of inbound requests (NCRs). More... | |
const dhcp_ddns::NameChangeProtocol & | getNcrProtocol () const |
Return the socket protocol in use. More... | |
size_t | getPort () const |
Return the TCP/UPD port D2 listens on. More... | |
bool | operator!= (const D2Params &other) const |
Compares two D2Params's for inequality. More... | |
bool | operator== (const D2Params &other) const |
Compares two D2Params's for equality. More... | |
std::string | toText () const |
Generates a string representation of the class contents. More... | |
Protected Member Functions | |
virtual void | validateContents () |
Validates member values. More... | |
Acts as a storage vault for D2 global scalar parameters.
Definition at line 142 of file d2_config.h.
isc::d2::D2Params::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.
ip_address | IP address at which D2 should listen for NCRs |
port | port on which D2 should listen NCRs |
dns_server_timeout | maximum amount of time in milliseconds to wait for a response to a single DNS update request. |
ncr_protocol | socket protocol D2 should use to receive NCRS |
ncr_format | packet format of the inbound NCRs |
D2CfgError | if:
|
Definition at line 30 of file d2_config.cc.
References validateContents().
isc::d2::D2Params::D2Params | ( | ) |
Default constructor The default constructor creates an instance that has updates disabled.
Definition at line 43 of file d2_config.cc.
References validateContents().
|
virtual |
Destructor.
Definition at line 51 of file d2_config.cc.
std::string isc::d2::D2Params::getConfigSummary | ( | ) | const |
Return summary of the configuration used by D2.
The returned summary of the configuration is meant to be appended to the log message informing about the successful completion of the D2 configuration.
Definition at line 83 of file d2_config.cc.
References getIpAddress(), getPort(), and isc::dhcp_ddns::ncrProtocolToString().
|
inline |
Return the DNS server timeout value.
Definition at line 183 of file d2_config.h.
|
inline |
Return the IP address D2 listens on.
Definition at line 173 of file d2_config.h.
Referenced by getConfigSummary().
|
inline |
Return the expected format of inbound requests (NCRs).
Definition at line 193 of file d2_config.h.
|
inline |
Return the socket protocol in use.
Definition at line 188 of file d2_config.h.
|
inline |
Return the TCP/UPD port D2 listens on.
Definition at line 178 of file d2_config.h.
Referenced by getConfigSummary().
bool isc::d2::D2Params::operator!= | ( | const D2Params & | other | ) | const |
Compares two D2Params's for inequality.
Definition at line 100 of file d2_config.cc.
bool isc::d2::D2Params::operator== | ( | const D2Params & | other | ) | const |
Compares two D2Params's for equality.
Definition at line 91 of file d2_config.cc.
std::string isc::d2::D2Params::toText | ( | ) | const |
Generates a string representation of the class contents.
Definition at line 105 of file d2_config.cc.
References isc::dhcp_ddns::ncrFormatToString(), isc::dhcp_ddns::ncrProtocolToString(), and isc::asiolink::IOAddress::toText().
Referenced by isc::d2::operator<<().
|
protectedvirtual |
Validates member values.
Method is used by the constructor to validate member contents. Currently checks:
D2CfgError | if contents are invalid |
Definition at line 54 of file d2_config.cc.
References isc::dhcp_ddns::FMT_JSON, isc_throw, isc::dhcp_ddns::NCR_UDP, isc::dhcp_ddns::ncrFormatToString(), isc::dhcp_ddns::ncrProtocolToString(), and isc::asiolink::IOAddress::toText().
Referenced by D2Params().