![]() |
Kea 2.7.3
|
Acts as a storage vault for D2 global scalar parameters. More...
#include <d2_config.h>
Public Member Functions | |
D2Params () | |
Default constructor The default constructor creates an instance that has updates disabled. | |
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. | |
std::string | getConfigSummary () const |
Return summary of the configuration used by D2. | |
size_t | getDnsServerTimeout () const |
Return the DNS server timeout value. | |
const isc::asiolink::IOAddress & | getIpAddress () const |
Return the IP address D2 listens on. | |
const dhcp_ddns::NameChangeFormat & | getNcrFormat () const |
Return the expected format of inbound requests (NCRs). | |
const dhcp_ddns::NameChangeProtocol & | getNcrProtocol () const |
Return the socket protocol in use. | |
size_t | getPort () const |
Return the TCP/UPD port D2 listens on. | |
bool | operator!= (const D2Params &other) const |
Compares two D2Params's for inequality. | |
bool | operator== (const D2Params &other) const |
Compares two D2Params's for equality. | |
std::string | toText () const |
Generates a string representation of the class contents. | |
Protected Member Functions | |
virtual void | validateContents () |
Validates member values. | |
Acts as a storage vault for D2 global scalar parameters.
Definition at line 143 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 78 of file d2_config.cc.
References getIpAddress(), and getPort().
|
inline |
Return the DNS server timeout value.
Definition at line 184 of file d2_config.h.
|
inline |
Return the IP address D2 listens on.
Definition at line 174 of file d2_config.h.
Referenced by getConfigSummary().
|
inline |
Return the expected format of inbound requests (NCRs).
Definition at line 194 of file d2_config.h.
|
inline |
Return the socket protocol in use.
Definition at line 189 of file d2_config.h.
|
inline |
Return the TCP/UPD port D2 listens on.
Definition at line 179 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 95 of file d2_config.cc.
bool isc::d2::D2Params::operator== | ( | const D2Params & | other | ) | const |
Compares two D2Params's for equality.
Definition at line 86 of file d2_config.cc.
std::string isc::d2::D2Params::toText | ( | ) | const |
Generates a string representation of the class contents.
Definition at line 100 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(), and isc::dhcp_ddns::ncrProtocolToString().
Referenced by D2Params(), and D2Params().