Commit ca58ac00 authored by Thomas Markwalder's avatar Thomas Markwalder
Browse files

Merge branch 'trac3088' (adds d2::NameRemoveTransaction)

Conflicts:
	src/bin/d2/d2_messages.mes
parents 0e2851da 13d812dc
......@@ -65,6 +65,7 @@ b10_dhcp_ddns_SOURCES += d2_zone.cc d2_zone.h
b10_dhcp_ddns_SOURCES += dns_client.cc dns_client.h
b10_dhcp_ddns_SOURCES += labeled_value.cc labeled_value.h
b10_dhcp_ddns_SOURCES += nc_add.cc nc_add.h
b10_dhcp_ddns_SOURCES += nc_remove.cc nc_remove.h
b10_dhcp_ddns_SOURCES += nc_trans.cc nc_trans.h
b10_dhcp_ddns_SOURCES += state_model.cc state_model.h
......
......@@ -325,19 +325,19 @@ message but the attempt to send it suffered a unexpected error. This is most
likely a programmatic error, rather than a communications issue. Some or all
of the DNS updates requested as part of this request did not succeed.
% DHCP_DDNS_FORWARD_ADD_BUILD_FAILURE A DNS update message to add a forward DNS entry could not be constructed for this request: %1, reason: %2
% DHCP_DDNS_FORWARD_ADD_BUILD_FAILURE DNS udpate message to add a forward DNS entry could not be constructed for this request: %1, reason: %2
This is an error message issued when an error occurs attempting to construct
the server bound packet requesting a forward address addition. This is due
to invalid data contained in the NameChangeRequest. The request will be aborted.
This is most likely a configuration issue.
% DHCP_DDNS_FORWARD_REPLACE_BUILD_FAILURE A DNS update message to replace a forward DNS entry could not be constructed from this request: %1, reason: %2
% DHCP_DDNS_FORWARD_REPLACE_BUILD_FAILURE DNS update message to replace a forward DNS entry could not be constructed from this request: %1, reason: %2
This is an error message issued when an error occurs attempting to construct
the server bound packet requesting a forward address replacement. This is
due to invalid data contained in the NameChangeRequest. The request will be
aborted. This is most likely a configuration issue.
% DHCP_DDNS_REVERSE_REPLACE_BUILD_FAILURE A DNS update message to replace a reverse DNS entry could not be constructed from this request: %1, reason: %2
% DHCP_DDNS_REVERSE_REPLACE_BUILD_FAILURE DNS update message to replace a reverse DNS entry could not be constructed from this request: %1, reason: %2
This is an error message issued when an error occurs attempting to construct
the server bound packet requesting a reverse PTR replacement. This is
due to invalid data contained in the NameChangeRequest. The request will be
......@@ -347,7 +347,94 @@ aborted. This is most likely a configuration issue.
This is a debug message issued after DHCP_DDNS has submitted DNS mapping
additions which were received and accepted by an appropriate DNS server.
% DHCP_DDNS_ADD_FAILED DHCP_DDNS failed attempting to make DNS mapping additions for this request: %1
% DHCP_DDNS_ADD_FAILED DHCP_DDNS failed attempting to make DNS mapping additions for this request: %1, event: %2
This is an error message issued after DHCP_DDNS attempts to submit DNS mapping
entry additions have failed. The precise reason for the failure should be
documented in preceding log entries.
% DHCP_DDNS_FORWARD_REMOVE_ADDRS_BUILD_FAILURE DNS udpate message to remove a forward DNS Address entry could not be constructed for this request: %1, reason: %2
This is an error message issued when an error occurs attempting to construct
the server bound packet requesting a forward address (A or AAAA) removal. This
is due to invalid data contained in the NameChangeRequest. The request will be
aborted. This is most likely a configuration issue.
% DHCP_DDNS_FORWARD_REMOVE_ADDRS_REJECTED DNS Server, %1, rejected a DNS update request to remove the forward address mapping for FQDN, %2, with an RCODE: %3
This is an error message issued when an update was rejected by the DNS server
it was sent to for the reason given by the RCODE. The rcode values are defined
in RFC 2136.
% DHCP_DDNS_FORWARD_REMOVE_ADDRS_IO_ERROR DHCP_DDNS encountered an IO error sending a forward mapping address removal for FQDN %1 to DNS server %2
This is an error message issued when a communication error occurs while
DHCP_DDNS is carrying out a forward address remove. The application will retry
against the same server or others as appropriate.
% DHCP_DDNS_FORWARD_REMOVE_ADDRS_RESP_CORRUPT DHCP_DDNS received a corrupt response from the DNS server, %1, while removing forward address mapping for FQDN, %2
This is an error message issued when the response received by DHCP_DDNS, to a
update request to remove a forward address mapping, is mangled or malformed.
The application will retry against the same server or others as appropriate.
% DHCP_DDNS_FORWARD_REMOVE_ADDRS_BAD_DNSCLIENT_STATUS DHCP_DDNS received an unknown DNSClient status: %1, while removing a forward address mapping for FQDN %2 to DNS server %3
This is an error message issued when DNSClient returns an unrecognized status
while DHCP_DDNS was removing a forward address mapping. The request will be
aborted. This is most likely a programmatic issue and should be reported.
% DHCP_DDNS_FORWARD_REMOVE_RRS_BUILD_FAILURE DNS udpate message to remove forward DNS RR entries could not be constructed for this request: %1, reason: %2
This is an error message issued when an error occurs attempting to construct
the server bound packet requesting forward RR (DHCID RR) removal. This is due
to invalid data contained in the NameChangeRequest. The request will be aborted.This is most likely a configuration issue.
% DHCP_DDNS_FORWARD_REMOVE_RRS_REJECTED DNS Server, %1, rejected a DNS update request to remove forward RR entries for FQDN, %2, with an RCODE: %3
This is an error message issued when an update was rejected by the DNS server
it was sent to for the reason given by the RCODE. The rcode values are defined
in RFC 2136.
% DHCP_DDNS_FORWARD_REMOVE_RRS_IO_ERROR DHCP_DDNS encountered an IO error sending a forward RR removal for FQDN %1 to DNS server %2
This is an error message issued when a communication error occurs while
DHCP_DDNS is carrying out a forward RR remove. The application will retry
against the same server.
% DHCP_DDNS_FORWARD_REMOVE_RRS_RESP_CORRUPT DHCP_DDNS received a corrupt response from the DNS server, %1, while removing forward RRs for FQDN, %2
This is an error message issued when the response received by DHCP_DDNS, to a
update request to remove forward RRs mapping, is mangled or malformed.
The application will retry against the same server or others as appropriate.
% DHCP_DDNS_FORWARD_REMOVE_RRS_BAD_DNSCLIENT_STATUS DHCP_DDNS received an unknown DNSClient status: %1, while removing forward RRs for FQDN %2 to DNS server %3
This is an error message issued when DNSClient returns an unrecognized status
while DHCP_DDNS was removing forward RRs. The request will be aborted. This is
most likely a programmatic issue and should be reported.
% DHCP_DDNS_REVERSE_REMOVE_BUILD_FAILURE DNS update message to remove a reverse DNS entry could not be constructed from this request: %1, reason: %2
This is an error message issued when an error occurs attempting to construct
the server bound packet requesting a reverse PTR removal. This is
due to invalid data contained in the NameChangeRequest. The request will be
aborted. This is most likely a configuration issue.
% DHCP_DDNS_REVERSE_REMOVE_REJECTED DNS Server, %1, rejected a DNS update request to remove the reverse mapping for FQDN, %2, with an RCODE: %3
This is an error message issued when an update was rejected by the DNS server
it was sent to for the reason given by the RCODE. The rcode values are defined
in RFC 2136.
% DHCP_DDNS_REVERSE_REMOVE_IO_ERROR DHCP_DDNS encountered an IO error sending a reverse mapping remove for FQDN %1 to DNS server %2
This is an error message issued when a communication error occurs while
DHCP_DDNS is carrying out a reverse address update. The application will
retry against the same server or others as appropriate.
% DHCP_DDNS_REVERSE_REMOVE_RESP_CORRUPT DHCP_DDNS received a corrupt response from the DNS server, %1, while removing reverse address mapping for FQDN, %2
This is an error message issued when the response received by DHCP_DDNS, to a
update request to remove a reverse address, is mangled or malformed.
The application will retry against the same server or others as appropriate.
% DHCP_DDNS_REVERSE_REMOVE_BAD_DNSCLIENT_STATUS DHCP_DDNS received an unknown DNSClient status: %1, while removing reverse address mapping for FQDN %2 to DNS server %3
This is an error message issued when DNSClient returns an unrecognized status
while DHCP_DDNS was removing a reverse address mapping. The request will be
aborted. This is most likely a programmatic issue and should be reported.
% DHCP_DDNS_REMOVE_SUCCEEDED DHCP_DDNS successfully removed the DNS mapping addition for this request: %1
This is a debug message issued after DHCP_DDNS has submitted DNS mapping
removals which were received and accepted by an appropriate DNS server.
% DHCP_DDNS_REMOVE_FAILED DHCP_DDNS failed attempting to make DNS mapping removals for this request: %1, event: %2
This is an error message issued after DHCP_DDNS attempts to submit DNS mapping
entry removals have failed. The precise reason for the failure should be
documented in preceding log entries.
......@@ -54,17 +54,25 @@ NameAddTransaction::defineEvents() {
// Call superclass impl first.
NameChangeTransaction::defineEvents();
// Define NCT events.
// Define NameAddTransaction events.
defineEvent(FQDN_IN_USE_EVT, "FQDN_IN_USE_EVT");
defineEvent(FQDN_NOT_IN_USE_EVT, "FQDN_NOT_IN_USE_EVT");
}
void
NameAddTransaction::verifyEvents() {
// Call superclass impl first.
// Call superclass implementation first to verify its events. These are
// events common to all transactions, and they must be defined.
// SELECT_SERVER_EVT
// SERVER_SELECTED_EVT
// SERVER_IO_ERROR_EVT
// NO_MORE_SERVERS_EVT
// IO_COMPLETED_EVT
// UPDATE_OK_EVT
// UPDATE_FAILED_EVT
NameChangeTransaction::verifyEvents();
// Verify NCT events.
// Verify NameAddTransaction events by attempting to fetch them.
getEvent(FQDN_IN_USE_EVT);
getEvent(FQDN_NOT_IN_USE_EVT);
}
......@@ -74,7 +82,7 @@ NameAddTransaction::defineStates() {
// Call superclass impl first.
NameChangeTransaction::defineStates();
// Define the states.
// Define NameAddTransaction states.
defineState(READY_ST, "READY_ST",
boost::bind(&NameAddTransaction::readyHandler, this));
......@@ -102,10 +110,16 @@ NameAddTransaction::defineStates() {
}
void
NameAddTransaction::verifyStates() {
// Call superclass impl first.
// Call superclass implementation first to verify its states. These are
// states common to all transactions, and they must be defined.
// READY_ST
// SELECTING_FWD_SERVER_ST
// SELECTING_REV_SERVER_ST
// PROCESS_TRANS_OK_ST
// PROCESS_TRANS_FAILED_ST
NameChangeTransaction::verifyStates();
// Verify NCT states. This ensures that derivations provide the handlers.
// Verify NameAddTransaction states by attempting to fetch them.
getState(ADDING_FWD_ADDRS_ST);
getState(REPLACING_FWD_ADDRS_ST);
getState(REPLACING_REV_PTRS_ST);
......@@ -541,7 +555,9 @@ void
NameAddTransaction::processAddFailedHandler() {
switch(getNextEvent()) {
case UPDATE_FAILED_EVT:
LOG_ERROR(dctl_logger, DHCP_DDNS_ADD_FAILED).arg(getNcr()->toText());
case NO_MORE_SERVERS_EVT:
LOG_ERROR(dctl_logger, DHCP_DDNS_ADD_FAILED).arg(getNcr()->toText())
.arg(getContextStr());
setNcrStatus(dhcp_ddns::ST_FAILED);
endModel();
break;
......@@ -560,27 +576,28 @@ NameAddTransaction::buildAddFwdAddressRequest() {
// Construct dns::Name from NCR fqdn.
dns::Name fqdn(dns::Name(getNcr()->getFqdn()));
// Content on this request is based on RFC 4703, section 5.3.1
// First build the Prerequisite Section.
// Create 'FQDN Is Not In Use' prerequisite (RFC 2136, section 2.4.5)
// Add the RR to prerequisite section.
// Create 'FQDN Is Not In Use' prerequisite and add it to the
// prerequisite section.
// Based on RFC 2136, section 2.4.5
dns::RRsetPtr prereq(new dns::RRset(fqdn, dns::RRClass::NONE(),
dns::RRType::ANY(), dns::RRTTL(0)));
request->addRRset(D2UpdateMessage::SECTION_PREREQUISITE, prereq);
// Next build the Update Section.
// Create the FQDN/IP 'add' RR (RFC 2136, section 2.5.1)
// Set the message RData to lease address.
// Add the RR to update section.
// Create the FQDN/IP 'add' RR and add it to the to update section.
// Based on RFC 2136, section 2.5.1
dns::RRsetPtr update(new dns::RRset(fqdn, dns::RRClass::IN(),
getAddressRRType(), dns::RRTTL(0)));
addLeaseAddressRdata(update);
request->addRRset(D2UpdateMessage::SECTION_UPDATE, update);
// Now create the FQDN/DHCID 'add' RR per RFC 4701)
// Set the message RData to DHCID.
// Add the RR to update section.
// Now create the FQDN/DHCID 'add' RR and add it to update section.
// Based on RFC 2136, section 2.5.1
update.reset(new dns::RRset(fqdn, dns::RRClass::IN(),
dns::RRType::DHCID(), dns::RRTTL(0)));
addDhcidRdata(update);
......@@ -598,17 +615,19 @@ NameAddTransaction::buildReplaceFwdAddressRequest() {
// Construct dns::Name from NCR fqdn.
dns::Name fqdn(dns::Name(getNcr()->getFqdn()));
// Content on this request is based on RFC 4703, section 5.3.2
// First build the Prerequisite Section.
// Create an 'FQDN Is In Use' prerequisite (RFC 2136, section 2.4.4)
// Add it to the pre-requisite section.
// Create an 'FQDN Is In Use' prerequisite and add it to the
// pre-requisite section.
// Based on RFC 2136, section 2.4.4
dns::RRsetPtr prereq(new dns::RRset(fqdn, dns::RRClass::ANY(),
dns::RRType::ANY(), dns::RRTTL(0)));
request->addRRset(D2UpdateMessage::SECTION_PREREQUISITE, prereq);
// Now create an DHCID matches prerequisite RR.
// Set the RR's RData to DHCID.
// Add it to the pre-requisite section.
// Create an DHCID matches prerequisite RR and add it to the
// pre-requisite section.
// Based on RFC 2136, section 2.4.2.
prereq.reset(new dns::RRset(fqdn, dns::RRClass::IN(),
dns::RRType::DHCID(), dns::RRTTL(0)));
addDhcidRdata(prereq);
......@@ -616,16 +635,14 @@ NameAddTransaction::buildReplaceFwdAddressRequest() {
// Next build the Update Section.
// Create the FQDN/IP 'delete' RR (RFC 2136, section 2.5.1)
// Set the message RData to lease address.
// Add the RR to update section.
// Create the FQDN/IP 'delete' RR and add it to the update section.
// Based on RFC 2136, section 2.5.2
dns::RRsetPtr update(new dns::RRset(fqdn, dns::RRClass::ANY(),
getAddressRRType(), dns::RRTTL(0)));
request->addRRset(D2UpdateMessage::SECTION_UPDATE, update);
// Create the FQDN/IP 'add' RR (RFC 2136, section 2.5.1)
// Set the message RData to lease address.
// Add the RR to update section.
// Create the FQDN/IP 'add' RR and add it to the update section.
// Based on RFC 2136, section 2.5.1
update.reset(new dns::RRset(fqdn, dns::RRClass::IN(),
getAddressRRType(), dns::RRTTL(0)));
addLeaseAddressRdata(update);
......@@ -644,6 +661,7 @@ NameAddTransaction::buildReplaceRevPtrsRequest() {
std::string rev_addr = D2CfgMgr::reverseIpAddress(getNcr()->getIpAddress());
dns::Name rev_ip(rev_addr);
// Content on this request is based on RFC 4703, section 5.4
// Reverse replacement has no prerequisites so straight on to
// building the Update section.
......
......@@ -34,9 +34,10 @@ public:
/// @brief Embodies the "life-cycle" required to carry out a DDNS Add update.
///
/// NameAddTransaction implements a state machine for adding (or replacing) a
/// forward DNS mapping. This state machine is based upon the processing logic
/// described in RFC 4703, Sections 5.3 and 5.4. That logic may be paraphrased
/// as follows:
/// forward and/or reverse DNS mapping. This state machine is based upon the
/// processing logic described in RFC 4703, Sections 5.3 and 5.4. That logic
/// may be paraphrased as follows:
///
/// @code
///
/// If the request includes a forward change:
......@@ -109,7 +110,8 @@ protected:
/// @brief Validates the contents of the set of events.
///
/// Invokes NameChangeTransaction's implementation and then verifies the
/// Add transaction's events.
/// Add transaction's. This tests that the needed events are in the event
/// dictionary.
///
/// @throw StateModelError if an event value is undefined.
virtual void verifyEvents();
......@@ -125,7 +127,8 @@ protected:
/// @brief Validates the contents of the set of states.
///
/// Invokes NameChangeTransaction's implementation and then verifies the
/// Add transaction's states.
/// Add transaction's states. This tests that the needed states are in the
/// state dictionary.
///
/// @throw StateModelError if an event value is undefined.
virtual void verifyStates();
......@@ -166,7 +169,7 @@ protected:
/// handler simply attempts to select the next server.
///
/// Transitions to:
/// - ADDING_REV_PTRS_ST with next event of SERVER_SELECTED upon successful
/// - ADDING_FWD_ADDRS_ST with next event of SERVER_SELECTED upon successful
/// server selection
///
/// - PROCESS_TRANS_FAILED with next event of NO_MORE_SERVERS_EVT upon
......@@ -329,7 +332,7 @@ protected:
/// - PROCESS_TRANS_OK_ST with a next event of UPDATE_OK_EVT upon
/// successful replacement.
///
/// - PROCESS_TRANS_FAILED_ST with a next event of UPDATE_OK_EVT If the
/// - PROCESS_TRANS_FAILED_ST with a next event of UPDATE_FAILED_EVT If the
/// DNS server rejected the update for any reason or the IO completed
/// with an unrecognized status.
///
......@@ -365,8 +368,10 @@ protected:
/// @brief State handler for PROCESS_TRANS_FAILED_ST.
///
/// Entered from:
/// - SELECTING_FWD_SERVER_ST with a next event of NO_MORE_SERVERS
/// - ADDING_FWD_ADDRS_ST with a next event of UPDATE_FAILED_EVT
/// - REPLACING_FWD_ADDRS_ST with a next event of UPDATE_FAILED_EVT
/// - SELECTING_REV_SERVER_ST with a next event of NO_MORE_SERVERS
/// - REPLACING_REV_PTRS_ST with a next event of UPDATE_FAILED_EVT
///
/// Sets the transaction status to indicate failure and ends
......@@ -438,7 +443,7 @@ protected:
void buildReplaceRevPtrsRequest();
};
/// @brief Defines a pointer to a NameChangeTransaction.
/// @brief Defines a pointer to a NameAddTransaction.
typedef boost::shared_ptr<NameAddTransaction> NameAddTransactionPtr;
} // namespace isc::d2
......
This diff is collapsed.
// Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#ifndef NC_REMOVE_H
#define NC_REMOVE_H
/// @file nc_remove.h This file defines the class NameRemoveTransaction.
#include <d2/nc_trans.h>
namespace isc {
namespace d2 {
/// @brief Thrown if the NameRemoveTransaction encounters a general error.
class NameRemoveTransactionError : public isc::Exception {
public:
NameRemoveTransactionError(const char* file, size_t line,
const char* what) :
isc::Exception(file, line, what) { };
};
/// @brief Embodies the "life-cycle" required to carry out a DDNS Remove update.
///
/// NameRemoveTransaction implements a state machine for removing a forward
/// and/or reverse DNS mappings. This state machine is based upon the processing
/// logic described in RFC 4703, Section 5.5. That logic may be paraphrased as
/// follows:
///
/// @code
///
/// If the request includes a forward change:
/// Select a forward server
/// Send the server a request to remove client's specific forward address RR
/// If it succeeds or the server responds with name no longer in use
/// Send a server a request to delete any other RRs for that FQDN, such
/// as the DHCID RR.
/// otherwise
/// abandon the update
///
/// If the request includes a reverse change:
/// Select a reverse server
/// Send a server a request to delete reverse entry (PTR RR)
///
/// @endcode
///
/// This class derives from NameChangeTransaction from which it inherits
/// states, events, and methods common to NameChangeRequest processing.
class NameRemoveTransaction : public NameChangeTransaction {
public:
//@{ Additional states needed for NameRemove state model.
/// @brief State that attempts to remove specific forward address record.
static const int REMOVING_FWD_ADDRS_ST = NCT_DERIVED_STATE_MIN + 1;
/// @brief State that attempts to remove any other forward RRs for the DHCID
static const int REMOVING_FWD_RRS_ST = NCT_DERIVED_STATE_MIN + 2;
/// @brief State that attempts to remove reverse PTR records
static const int REMOVING_REV_PTRS_ST = NCT_DERIVED_STATE_MIN + 3;
//@}
//@{ Additional events needed for NameRemove state model.
/// @brief Event sent when replace attempt to fails with address not in use.
/// @todo Currently none have been identified.
//@}
/// @brief Constructor
///
/// Instantiates an Remove transaction that is ready to be started.
///
/// @param io_service IO service to be used for IO processing
/// @param ncr is the NameChangeRequest to fulfill
/// @param forward_domain is the domain to use for forward DNS updates
/// @param reverse_domain is the domain to use for reverse DNS updates
///
/// @throw NameRemoveTransaction error if given request is not a CHG_REMOVE,
/// NameChangeTransaction error for base class construction errors.
NameRemoveTransaction(IOServicePtr& io_service,
dhcp_ddns::NameChangeRequestPtr& ncr,
DdnsDomainPtr& forward_domain,
DdnsDomainPtr& reverse_domain);
/// @brief Destructor
virtual ~NameRemoveTransaction();
protected:
/// @brief Adds events defined by NameRemoveTransaction to the event set.
///
/// Invokes NameChangeTransaction's implementation and then defines the
/// events unique to NCR Remove transaction processing.
///
/// @throw StateModelError if an event definition is invalid or a duplicate.
virtual void defineEvents();
/// @brief Validates the contents of the set of events.
///
/// Invokes NameChangeTransaction's implementation and then verifies the
/// Remove transaction's events. This tests that the needed events are in
/// the event dictionary.
///
/// @throw StateModelError if an event value is undefined.
virtual void verifyEvents();
/// @brief Adds states defined by NameRemoveTransaction to the state set.
///
/// Invokes NameChangeTransaction's implementation and then defines the
/// states unique to NCR Remove transaction processing.
///
/// @throw StateModelError if an state definition is invalid or a duplicate.
virtual void defineStates();
/// @brief Validates the contents of the set of states.
///
/// Invokes NameChangeTransaction's implementation and then verifies the
/// Remove transaction's states. This tests that the needed states are in
/// the state dictionary.
///
/// @throw StateModelError if an event value is undefined.
virtual void verifyStates();
/// @brief State handler for READY_ST.
///
/// Entered from:
/// - INIT_ST with next event of START_EVT
///
/// The READY_ST is the state the model transitions into when the inherited
/// method, startTransaction() is invoked. This handler, therefore, is the
/// entry point into the state model execution. Its primary task is to
/// determine whether to start with a forward DNS change or a reverse DNS
/// change.
///
/// Transitions to:
/// - SELECTING_FWD_SERVER_ST with next event of SERVER_SELECT_ST if request
/// includes a forward change.
///
/// - SELECTING_REV_SERVER_ST with next event of SERVER_SELECT_ST if request
/// includes only a reverse change.
///
/// @throw NameRemoveTransactionError if upon entry next event is not
/// START_EVT.
void readyHandler();
/// @brief State handler for SELECTING_FWD_SERVER_ST.
///
/// Entered from:
/// - READY_ST with next event of SELECT_SERVER_EVT
/// - REMOVING_FWD_ADDRS_ST with next event of SERVER_IO_ERROR_EVT
///
/// Selects the server to be used from the forward domain for the forward
/// DNS update. If next event is SELECT_SERVER_EVT the handler initializes
/// the forward domain's server selection mechanism and then attempts to
/// select the next server. If next event is SERVER_IO_ERROR_EVT then the
/// handler simply attempts to select the next server.
///
/// Transitions to:
/// - REMOVING_FWD_ADDRS_ST with next event of SERVER_SELECTED upon
/// successful server selection
///
/// - PROCESS_TRANS_FAILED with next event of NO_MORE_SERVERS_EVT upon
/// failure to select a server
///
/// @throw NameRemoveTransactionError if upon entry next event is not
/// SELECT_SERVER_EVT or SERVER_IO_ERROR_EVT.
void selectingFwdServerHandler();
/// @brief State handler for SELECTING_REV_SERVER_ST.
///
/// Entered from:
/// - READY_ST with next event of SELECT_SERVER_EVT
/// - REMOVING_FWD_RRS_ST with next event of SELECT_SERVER_EVT
/// - REMOVING_REV_PTRS_ST with next event of SERVER_IO_ERROR_EVT
///
/// Selects the server to be used from the reverse domain for the reverse
/// DNS update. If next event is SELECT_SERVER_EVT the handler initializes
/// the reverse domain's server selection mechanism and then attempts to
/// select the next server. If next event is SERVER_IO_ERROR_EVT then the
/// handler simply attempts to select the next server.
///
/// Transitions to:
/// - REMOVING_REV_PTRS_ST with next event of SERVER_SELECTED upon
/// successful server selection
///
/// - PROCESS_TRANS_FAILED with next event of NO_MORE_SERVERS_EVT upon
/// failure to select a server
///
/// @throw NameRemoveTransactionError if upon entry next event is not
/// SELECT_SERVER_EVT or SERVER_IO_ERROR_EVT.
void selectingRevServerHandler();
/// @brief State handler for REMOVING_FWD_ADDRS_ST.
///
/// Entered from:
/// - SELECTING_FWD_SERVER with next event of SERVER_SELECTED_EVT
///
/// Attempts to remove the forward DNS entry for a given FQDN, provided
/// a DHCID RR exists which matches the requesting DHCID. If this is
/// first invocation of the handler after transitioning into this state,
/// any previous update request context is deleted. If next event
/// is SERVER_SELECTED_EVT, the handler builds the forward remove request,
/// schedules an asynchronous send via sendUpdate(), and returns. Note
/// that sendUpdate will post NOP_EVT as next event.
///
/// Posting the NOP_EVT will cause runModel() to suspend execution of
/// the state model thus affecting a "wait" for the update IO to complete.
/// Update completion occurs via the DNSClient callback operator() method
/// inherited from NameChangeTransaction. When invoked this callback will
/// post a next event of IO_COMPLETED_EVT and then invoke runModel which
/// resumes execution of the state model.
///
/// When the handler is invoked with a next event of IO_COMPELTED_EVT,
/// the DNS update status is checked and acted upon accordingly:
///
/// Transitions to:
/// - REMOVING_FWD_RRS_ST with next event of UPDATE_OK_EVT upon successful
/// removal or RCODE of indication FQDN is no longer in use (NXDOMAIN).
///
/// - PROCESS_TRANS_FAILED_ST with next event of UPDATE_FAILED_EVT if the
/// DNS server rejected the update for any reason or the IO completed
/// with an unrecognized status.
///
/// - RE-ENTER this state with next event of SERVER_SELECTED_EVT if
/// there was an IO error communicating with the server and the number of
/// per server retries has not been exhausted.
///
/// - SELECTING_FWD_SERVER_ST with next event of SERVER_IO_ERROR_EVT if
/// there was an IO error communicating with the server and the number of
/// per server retries has been exhausted.
///
/// @throw NameRemoveTransactionError if upon entry next event is not
/// SERVER_SELECTED_EVT or IO_COMPLETE_EVT
void removingFwdAddrsHandler();
/// @brief State handler for REMOVING_FWD_RRS_ST.
///
/// Entered from:
/// - REMOVING_FWD_ADDRS_ST with next event of UPDATE_OK_EVT
///
/// Attempts to delete any remaining RRs associated with the given FQDN
/// such as the DHCID RR. If this is first invocation of the handler after
/// transitioning into this state, any previous update request context is
/// deleted and the handler builds the forward remove request. It then
/// schedules an asynchronous send via sendUpdate(),
/// and returns. Note that sendUpdate will post NOP_EVT as the next event.
///
/// Posting the NOP_EVT will cause runModel() to suspend execution of
/// the state model thus affecting a "wait" for the update IO to complete.
/// Update completion occurs via the DNSClient callback operator() method
/// inherited from NameChangeTransaction. When invoked this callback will
/// post a next event of IO_COMPLETED_EVT and then invoke runModel which
/// resumes execution of the state model.
///
/// When the handler is invoked with a next event of IO_COMPELTED_EVT,
/// the DNS update status is checked and acted upon accordingly:
///
/// Transitions to:
/// - SELECTING_REV_SERVER_ST with a next event of SELECT_SERVER_EVT upon
/// successful completion and the request includes a reverse DNS update.
///
/// - PROCESS_TRANS_OK_ST with next event of UPDATE_OK_EVT upon successful
/// completion and the request does not include a reverse DNS update.
///
/// - PROCESS_TRANS_FAILED_ST with a next event of UPDATE_FAILED_EVT if the
/// DNS server rejected the update for any other reason or the IO completed
/// with an unrecognized status.
///
/// - RE-ENTER this state with a next event of SERVER_SELECTED_EVT if
/// there was an IO error communicating with the server and the number of
/// per server retries has not been exhausted.
///
/// - PROCESS_TRANS_FAILED_ST with a next event of SERVER_IO_ERROR_EVT if
/// there we have reached maximum number of retries without success on the
/// current server.