Kea  1.9.9-git
nc_trans.cc
Go to the documentation of this file.
1 // Copyright (C) 2013-2020 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #include <config.h>
8 
9 #include <d2/d2_log.h>
10 #include <d2/nc_trans.h>
11 #include <dns/rdata.h>
12 #include <util/random/qid_gen.h>
13 
14 #include <sstream>
15 
16 using namespace isc::util;
17 using namespace isc::util::random;
18 
19 namespace isc {
20 namespace d2 {
21 
22 // Common transaction states
23 const int NameChangeTransaction::READY_ST;
24 const int NameChangeTransaction::SELECTING_FWD_SERVER_ST;
25 const int NameChangeTransaction::SELECTING_REV_SERVER_ST;
26 const int NameChangeTransaction::PROCESS_TRANS_OK_ST;
27 const int NameChangeTransaction::PROCESS_TRANS_FAILED_ST;
28 
29 const int NameChangeTransaction::NCT_DERIVED_STATE_MIN;
30 
31 // Common transaction events
32 const int NameChangeTransaction::SELECT_SERVER_EVT;
33 const int NameChangeTransaction::SERVER_SELECTED_EVT;
34 const int NameChangeTransaction::SERVER_IO_ERROR_EVT;
35 const int NameChangeTransaction::NO_MORE_SERVERS_EVT;
36 const int NameChangeTransaction::IO_COMPLETED_EVT;
37 const int NameChangeTransaction::UPDATE_OK_EVT;
38 const int NameChangeTransaction::UPDATE_FAILED_EVT;
39 
40 const int NameChangeTransaction::NCT_DERIVED_EVENT_MIN;
41 
42 const unsigned int NameChangeTransaction::MAX_UPDATE_TRIES_PER_SERVER;
43 
44 NameChangeTransaction::
45 NameChangeTransaction(asiolink::IOServicePtr& io_service,
47  DdnsDomainPtr& forward_domain,
48  DdnsDomainPtr& reverse_domain,
49  D2CfgMgrPtr& cfg_mgr)
50  : io_service_(io_service), ncr_(ncr), forward_domain_(forward_domain),
51  reverse_domain_(reverse_domain), dns_client_(), dns_update_request_(),
52  dns_update_status_(DNSClient::OTHER), dns_update_response_(),
53  forward_change_completed_(false), reverse_change_completed_(false),
54  current_server_list_(), current_server_(), next_server_pos_(0),
55  update_attempts_(0), cfg_mgr_(cfg_mgr), tsig_key_() {
58  if (!io_service_) {
59  isc_throw(NameChangeTransactionError, "IOServicePtr cannot be null");
60  }
61 
62  if (!ncr_) {
64  "NameChangeRequest cannot be null");
65  }
66 
67  if (ncr_->isForwardChange() && !(forward_domain_)) {
69  "Forward change must have a forward domain");
70  }
71 
72  if (ncr_->isReverseChange() && !(reverse_domain_)) {
74  "Reverse change must have a reverse domain");
75  }
76 
77  if (!cfg_mgr_) {
79  "Configuration manager cannot be null");
80  }
81 }
82 
84 }
85 
86 void
90  .arg(getRequestId());
91 
94 }
95 
96 void
98  // Stow the completion status and re-enter the run loop with the event
99  // set to indicate IO completed.
100  // runModel is exception safe so we are good to call it here.
101  // It won't exit until we hit the next IO wait or the state model ends.
102  setDnsUpdateStatus(status);
105  .arg(getRequestId())
106  .arg(current_server_->toText())
107  .arg(responseString());
108 
110 }
111 
112 std::string
114  std::ostringstream stream;
115  switch (getDnsUpdateStatus()) {
116  case DNSClient::SUCCESS:
117  stream << "SUCCESS, rcode: ";
118  if (getDnsUpdateResponse()) {
119  stream << getDnsUpdateResponse()->getRcode().toText();
120  } else {
121  stream << " update response is NULL";
122  }
123  break;
124  case DNSClient::TIMEOUT:
125  stream << "TIMEOUT";
126  break;
128  stream << "IO_STOPPED";
129  break;
131  stream << "INVALID_RESPONSE";
132  break;
133  case DNSClient::OTHER:
134  stream << "OTHER";
135  break;
136  default:
137  stream << "UNKNOWN("
138  << static_cast<int>(getDnsUpdateStatus()) << ")";
139  break;
140 
141  }
142 
143  return (stream.str());
144 }
145 
146 std::string
148  std::ostringstream stream;
149  stream << "Status: " << (getNcrStatus() == dhcp_ddns::ST_COMPLETED
150  ? "Completed, " : "Failed, ")
151  << "Event: " << getEventLabel(getNextEvent()) << ", ";
152 
153  if (ncr_->isForwardChange()) {
154  stream << " Forward change:" << (getForwardChangeCompleted()
155  ? " completed, " : " failed, ");
156  }
157 
158  if (ncr_->isReverseChange()) {
159  stream << " Reverse change:" << (getReverseChangeCompleted()
160  ? " completed, " : " failed, ");
161  }
162 
163  stream << " request: " << ncr_->toText();
164  return (stream.str());
165 }
166 
167 
168 void
169 NameChangeTransaction::sendUpdate(const std::string& comment) {
170  try {
171  ++update_attempts_;
172  // @todo add logic to add/replace TSIG key info in request if
173  // use_tsig_ is true. We should be able to navigate to the TSIG key
174  // for the current server. If not we would need to add that.
175 
176  D2ParamsPtr d2_params = cfg_mgr_->getD2Params();
177  dns_client_->doUpdate(*io_service_, current_server_->getIpAddress(),
178  current_server_->getPort(), *dns_update_request_,
179  d2_params->getDnsServerTimeout(), tsig_key_);
180  // Message is on its way, so the next event should be NOP_EVT.
184  .arg(getRequestId())
185  .arg(comment)
186  .arg(current_server_->toText());
187  } catch (const std::exception& ex) {
188  // We were unable to initiate the send.
189  // It is presumed that any throw from doUpdate is due to a programmatic
190  // error, such as an unforeseen permutation of data, rather than an IO
191  // failure. IO errors should be caught by the underlying asiolink
192  // mechanisms and manifested as an unsuccessful IO status in the
193  // DNSClient callback. Any problem here most likely means the request
194  // is corrupt in some way and cannot be completed, therefore we will
195  // log it and transition it to failure.
197  .arg(getRequestId())
198  .arg(ex.what());
200  }
201 }
202 
203 void
205  // Call superclass impl first.
207 
208  // Define NCT events.
209  defineEvent(SELECT_SERVER_EVT, "SELECT_SERVER_EVT");
210  defineEvent(SERVER_SELECTED_EVT, "SERVER_SELECTED_EVT");
211  defineEvent(SERVER_IO_ERROR_EVT, "SERVER_IO_ERROR_EVT");
212  defineEvent(NO_MORE_SERVERS_EVT, "NO_MORE_SERVERS_EVT");
213  defineEvent(IO_COMPLETED_EVT, "IO_COMPLETED_EVT");
214  defineEvent(UPDATE_OK_EVT, "UPDATE_OK_EVT");
215  defineEvent(UPDATE_FAILED_EVT, "UPDATE_FAILED_EVT");
216 }
217 
218 void
220  // Call superclass impl first.
222 
223  // Verify NCT events.
231 }
232 
233 void
235  // Call superclass impl first.
237  // This class is "abstract" in that it does not supply handlers for its
238  // states, derivations must do that therefore they must define them.
239 }
240 
241 void
243  // Call superclass impl first.
245 
246  // Verify NCT states. This ensures that derivations provide the handlers.
252 }
253 
254 void
255 NameChangeTransaction::onModelFailure(const std::string& explanation) {
258  .arg(getRequestId())
259  .arg(explanation);
260 }
261 
262 void
263 NameChangeTransaction::retryTransition(const int fail_to_state) {
264  if (update_attempts_ < MAX_UPDATE_TRIES_PER_SERVER) {
265  // Re-enter the current state with same server selected.
267  } else {
268  // Transition to given fail_to_state state if we are out
269  // of retries.
270  transition(fail_to_state, SERVER_IO_ERROR_EVT);
271  }
272 }
273 
274 void
276  dns_update_request_ = request;
277 }
278 
279 void
281  update_attempts_ = 0;
282  dns_update_request_.reset();
283 }
284 
285 void
287  dns_update_status_ = status;
288 }
289 
290 void
292  dns_update_response_ = response;
293 }
294 
295 void
297  dns_update_response_.reset();
298 }
299 
300 void
302  forward_change_completed_ = value;
303 }
304 
305 void
307  reverse_change_completed_ = value;
308 }
309 
310 void
312  update_attempts_ = value;
313 }
314 
317  if (!domain) {
319  "prepNewRequest - domain cannot be null");
320  }
321 
322  try {
323  // Create a "blank" update request.
325  OUTBOUND));
326  // Set the query id
327  request->setId(QidGenerator::getInstance().generateQid());
328  // Construct the Zone Section.
329  dns::Name zone_name(domain->getName());
330  request->setZone(zone_name, dns::RRClass::IN());
331  return (request);
332  } catch (const std::exception& ex) {
333  isc_throw(NameChangeTransactionError, "Cannot create new request :"
334  << ex.what());
335  }
336 }
337 
338 void
340  if (!rrset) {
342  "addLeaseAddressRdata - RRset cannot cannot be null");
343  }
344 
345  try {
346  // Manufacture an RData from the lease address then add it to the RR.
348  if (ncr_->isV4()) {
349  rdata.reset(new dns::rdata::in::A(ncr_->getIpAddress()));
350  } else {
351  rdata.reset(new dns::rdata::in::AAAA(ncr_->getIpAddress()));
352  }
353  rrset->addRdata(rdata);
354  } catch (const std::exception& ex) {
355  isc_throw(NameChangeTransactionError, "Cannot add address rdata: "
356  << ex.what());
357  }
358 }
359 
360 void
362  if (!rrset) {
364  "addDhcidRdata - RRset cannot cannot be null");
365  }
366 
367  try {
368  const std::vector<uint8_t>& ncr_dhcid = ncr_->getDhcid().getBytes();
369  util::InputBuffer buffer(ncr_dhcid.data(), ncr_dhcid.size());
370  dns::rdata::ConstRdataPtr rdata (new dns::rdata::in::
371  DHCID(buffer, ncr_dhcid.size()));
372  rrset->addRdata(rdata);
373  } catch (const std::exception& ex) {
374  isc_throw(NameChangeTransactionError, "Cannot add DCHID rdata: "
375  << ex.what());
376  }
377 
378 }
379 
380 void
382  if (!rrset) {
384  "addPtrRdata - RRset cannot cannot be null");
385  }
386 
387  try {
388  dns::rdata::ConstRdataPtr rdata(new dns::rdata::generic::
389  PTR(getNcr()->getFqdn()));
390  rrset->addRdata(rdata);
391  } catch (const std::exception& ex) {
392  isc_throw(NameChangeTransactionError, "Cannot add PTR rdata: "
393  << ex.what());
394  }
395 }
396 
399  return (ncr_);
400 }
401 
402 const TransactionKey&
404  return (ncr_->getDhcid());
405 }
406 
407 std::string
409  return (ncr_->getRequestId());
410 }
411 
414  return (ncr_->getStatus());
415 }
416 
419  return (forward_domain_);
420 }
421 
424  return (reverse_domain_);
425 }
426 
427 void
429  if (!domain) {
431  "initServerSelection called with an empty domain");
432  }
433 
434  // Set the tsig_key to that of the DdnsDomain.
435  TSIGKeyInfoPtr tsig_key_info = domain->getTSIGKeyInfo();
436  if (tsig_key_info) {
437  tsig_key_ = tsig_key_info->getTSIGKey();
438  } else {
439  tsig_key_.reset();
440  }
441 
442  current_server_list_ = domain->getServers();
443  next_server_pos_ = 0;
444  current_server_.reset();
445 }
446 
447 bool
449  if ((current_server_list_) &&
450  (next_server_pos_ < current_server_list_->size())) {
451  current_server_ = (*current_server_list_)[next_server_pos_];
452  // Toss out any previous response.
453  dns_update_response_.reset();
454 
455  // @todo Protocol is set on DNSClient constructor. We need
456  // to propagate a configuration value downward, probably starting
457  // at global, then domain, then server
458  // Once that is supported we need to add it here.
459  dns_client_.reset(new DNSClient(dns_update_response_ , this,
460  DNSClient::UDP));
461  ++next_server_pos_;
462  return (true);
463  }
464 
465  return (false);
466 }
467 
468 const DNSClientPtr&
470  return (dns_client_);
471 }
472 
473 const DnsServerInfoPtr&
475  return (current_server_);
476 }
477 
478 void
480  return (ncr_->setStatus(status));
481 }
482 
483 const D2UpdateMessagePtr&
485  return (dns_update_request_);
486 }
487 
490  return (dns_update_status_);
491 }
492 
493 const D2UpdateMessagePtr&
495  return (dns_update_response_);
496 }
497 
498 bool
500  return (forward_change_completed_);
501 }
502 
503 bool
505  return (reverse_change_completed_);
506 }
507 
508 size_t
510  return (update_attempts_);
511 }
512 
513 const dns::RRType&
515  return (ncr_->isV4() ? dns::RRType::A() : dns::RRType::AAAA());
516 }
517 
518 } // namespace isc::d2
519 } // namespace isc
virtual D2UpdateMessagePtr prepNewRequest(DdnsDomainPtr domain)
Creates a new DNS update request based on the given domain.
Definition: nc_trans.cc:316
static const int NOP_EVT
Signifies that no event has occurred.
Definition: state_model.h:292
The Name class encapsulates DNS names.
Definition: name.h:223
boost::shared_ptr< TSIGKeyInfo > TSIGKeyInfoPtr
Defines a pointer for TSIGKeyInfo instances.
Definition: d2_config.h:403
This file defines the class NameChangeTransaction.
const isc::log::MessageID DHCP_DDNS_STARTING_TRANSACTION
Definition: d2_messages.h:80
virtual void sendUpdate(const std::string &comment="")
Send the update request to the current server.
Definition: nc_trans.cc:169
boost::shared_ptr< D2Params > D2ParamsPtr
Defines a pointer for D2Params instances.
Definition: d2_config.h:256
The D2UpdateMessage encapsulates a DNS Update message.
size_t getUpdateAttempts() const
Fetches the update attempt count for the current update.
Definition: nc_trans.cc:509
static const int PROCESS_TRANS_OK_ST
State which processes successful transaction conclusion.
Definition: nc_trans.h:102
Thrown if the transaction encounters a general error.
Definition: nc_trans.h:27
static const unsigned int MAX_UPDATE_TRIES_PER_SERVER
Maximum times to attempt a single update on a given server.
Definition: nc_trans.h:154
The DNSClient class handles communication with the DNS server.
Definition: dns_client.h:49
void defineEvent(unsigned int value, const std::string &label)
Adds an event value and associated label to the set of events.
Definition: state_model.cc:170
boost::shared_ptr< DNSClient > DNSClientPtr
Definition: dns_client.h:21
boost::shared_ptr< DdnsDomain > DdnsDomainPtr
Defines a pointer for DdnsDomain instances.
Definition: d2_config.h:591
virtual void onModelFailure(const std::string &explanation)
Handler for fatal model execution errors.
Definition: nc_trans.cc:255
boost::shared_ptr< D2UpdateMessage > D2UpdateMessagePtr
Pointer to the DNS Update Message.
const isc::log::MessageID DHCP_DDNS_UPDATE_REQUEST_SENT
Definition: d2_messages.h:83
void setNcrStatus(const dhcp_ddns::NameChangeStatus &status)
Sets the status of the transaction's NameChangeRequest.
Definition: nc_trans.cc:479
static const RRClass & IN()
Definition: rrclass.h:319
boost::shared_ptr< const Rdata > ConstRdataPtr
Definition: rdata.h:72
bool getForwardChangeCompleted() const
Returns whether the forward change has completed or not.
Definition: nc_trans.cc:499
#define LOG_ERROR(LOGGER, MESSAGE)
Macro to conveniently test error output and log it.
Definition: macros.h:32
No response, timeout.
Definition: dns_client.h:62
static const int SELECTING_FWD_SERVER_ST
State in which forward DNS server selection is done.
Definition: nc_trans.h:91
std::string transactionOutcomeString() const
Returns a string version of transaction outcome.
Definition: nc_trans.cc:147
boost::shared_ptr< NameChangeRequest > NameChangeRequestPtr
Defines a pointer to a NameChangeRequest.
Definition: ncr_msg.h:212
void startTransaction()
Begins execution of the transaction.
Definition: nc_trans.cc:87
static const int SERVER_IO_ERROR_EVT
Issued when an update fails due to an IO error.
Definition: nc_trans.h:119
const dhcp_ddns::NameChangeRequestPtr & getNcr() const
Fetches the NameChangeRequest for this transaction.
Definition: nc_trans.cc:398
unsigned int getCurrState() const
Fetches the model's current state.
Definition: state_model.cc:355
static const int IO_COMPLETED_EVT
Issued when a DNS update packet exchange has completed.
Definition: nc_trans.h:130
virtual void verifyStates()
Validates the contents of the set of states.
Definition: state_model.cc:253
virtual void runModel(unsigned int event)
Processes events through the state model.
Definition: state_model.cc:112
bool getReverseChangeCompleted() const
Returns whether the reverse change has completed or not.
Definition: nc_trans.cc:504
const isc::log::MessageID DHCP_DDNS_TRANS_SEND_ERROR
Definition: d2_messages.h:82
Other, unclassified error.
Definition: dns_client.h:65
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
void setForwardChangeCompleted(const bool value)
Sets the forward change completion flag to the given value.
Definition: nc_trans.cc:301
void addDhcidRdata(dns::RRsetPtr &rrset)
Adds an RData for the lease client's DHCID to the given RRset.
Definition: nc_trans.cc:361
Definition: edns.h:19
std::string getRequestId() const
Fetches the request id that identifies this transaction.
Definition: nc_trans.cc:408
isc::log::Logger d2_to_dns_logger("d2-to-dns")
Definition: d2_log.h:20
static const int SERVER_SELECTED_EVT
Issued when a server has been selected.
Definition: nc_trans.h:116
void retryTransition(const int fail_to_state)
Determines the state and next event based on update attempts.
Definition: nc_trans.cc:263
static const RRType & A()
Definition: rrtype.h:341
const D2UpdateMessagePtr & getDnsUpdateRequest() const
Fetches the current DNS update request packet.
Definition: nc_trans.cc:484
Status
A status code of the DNSClient.
Definition: dns_client.h:60
std::string getEventLabel(const int event) const
Fetches the label associated with an event value.
Definition: state_model.cc:432
NameChangeStatus
Defines the runtime processing status values for requests.
Definition: ncr_msg.h:52
boost::shared_ptr< D2CfgMgr > D2CfgMgrPtr
Defines a shared pointer to D2CfgMgr.
Definition: d2_cfg_mgr.h:334
DNSClient::Status getDnsUpdateStatus() const
Fetches the most recent DNS update status.
Definition: nc_trans.cc:489
virtual void defineStates()
Adds states defined by NameChangeTransaction to the state set.
Definition: nc_trans.cc:234
const isc::log::MessageID DHCP_DDNS_STATE_MODEL_UNEXPECTED_ERROR
Definition: d2_messages.h:81
void setReverseChangeCompleted(const bool value)
Sets the reverse change completion flag to the given value.
Definition: nc_trans.cc:306
Response received and is ok.
Definition: dns_client.h:61
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
static const int SELECTING_REV_SERVER_ST
State in which reverse DNS server selection is done.
Definition: nc_trans.h:99
void startModel(const int start_state)
Begins execution of the model.
Definition: state_model.cc:100
void setDnsUpdateStatus(const DNSClient::Status &status)
Sets the update status to the given status value.
Definition: nc_trans.cc:286
DdnsDomainPtr & getForwardDomain()
Fetches the forward DdnsDomain.
Definition: nc_trans.cc:418
Defines the logger used by the top-level component of kea-dhcp-ddns.
void addPtrRdata(dns::RRsetPtr &rrset)
Adds an RData for the lease FQDN to the given RRset.
Definition: nc_trans.cc:381
virtual void defineStates()
Populates the set of states.
Definition: state_model.cc:245
const D2UpdateMessagePtr & getDnsUpdateResponse() const
Fetches the most recent DNS update response packet.
Definition: nc_trans.cc:494
static const int NO_MORE_SERVERS_EVT
Issued when there are no more servers from which to select.
Definition: nc_trans.h:125
virtual void operator()(DNSClient::Status status)
Serves as the DNSClient IO completion event handler.
Definition: nc_trans.cc:97
void transition(unsigned int state, unsigned int event)
Sets up the model to transition into given state with a given event.
Definition: state_model.cc:264
Response received but invalid.
Definition: dns_client.h:64
void setUpdateAttempts(const size_t value)
Sets the update attempt count to the given value.
Definition: nc_trans.cc:311
const DNSClientPtr & getDNSClient() const
Fetches the DNSClient instance.
Definition: nc_trans.cc:469
static const int PROCESS_TRANS_FAILED_ST
State which processes an unsuccessful transaction conclusion.
Definition: nc_trans.h:105
const DnsServerInfoPtr & getCurrentServer() const
Fetches the currently selected server.
Definition: nc_trans.cc:474
std::string responseString() const
Returns a string version of the current response status and rcode.
Definition: nc_trans.cc:113
The RRType class encapsulates DNS resource record types.
Definition: rrtype.h:106
static const int SELECT_SERVER_EVT
Issued when a server needs to be selected.
Definition: nc_trans.h:113
void clearDnsUpdateRequest()
Destroys the current update request packet and resets update attempts count.
Definition: nc_trans.cc:280
Container class for handling the DHCID value within a NameChangeRequest.
Definition: ncr_msg.h:86
static const int READY_ST
State from which a transaction is started.
Definition: nc_trans.h:83
#define LOG_DEBUG(LOGGER, LEVEL, MESSAGE)
Macro to conveniently test debug output and log it.
Definition: macros.h:14
void setDnsUpdateRequest(D2UpdateMessagePtr &request)
Sets the update request packet to the given packet.
Definition: nc_trans.cc:275
The InputBuffer class is a buffer abstraction for manipulating read-only data.
Definition: buffer.h:81
virtual void defineEvents()
Adds events defined by NameChangeTransaction to the event set.
Definition: nc_trans.cc:204
const StatePtr getStateInternal(unsigned int value)
Fetches the state referred to by value.
Definition: state_model.cc:219
static const int UPDATE_OK_EVT
Issued when the attempted update successfully completed.
Definition: nc_trans.h:135
const dns::RRType & getAddressRRType() const
Returns the DHCP data type for the lease address.
Definition: nc_trans.cc:514
const isc::log::MessageID DHCP_DDNS_UPDATE_RESPONSE_RECEIVED
Definition: d2_messages.h:84
void clearDnsUpdateResponse()
Destroys the current update response packet.
Definition: nc_trans.cc:296
dhcp_ddns::NameChangeStatus getNcrStatus() const
Fetches the NameChangeRequest status of the transaction.
Definition: nc_trans.cc:413
boost::shared_ptr< AbstractRRset > RRsetPtr
A pointer-like type pointing to an RRset object.
Definition: rrset.h:47
DdnsDomainPtr & getReverseDomain()
Fetches the reverse DdnsDomain.
Definition: nc_trans.cc:423
const int DBGLVL_TRACE_DETAIL
Trace detailed operations.
Definition: log_dbglevels.h:71
const EventPtr & getEvent(unsigned int value)
Fetches the event referred to by value.
Definition: state_model.cc:186
unsigned int getNextEvent() const
Fetches the model's next event.
Definition: state_model.cc:373
static const int UPDATE_FAILED_EVT
Issued when the attempted update fails to complete.
Definition: nc_trans.h:141
virtual void verifyEvents()
Validates the contents of the set of events.
Definition: nc_trans.cc:219
void addLeaseAddressRdata(dns::RRsetPtr &rrset)
Adds an RData for the lease address to the given RRset.
Definition: nc_trans.cc:339
static const RRType & AAAA()
Definition: rrtype.h:497
const TransactionKey & getTransactionKey() const
Fetches the unique key that identifies this transaction.
Definition: nc_trans.cc:403
virtual void verifyEvents()
Validates the contents of the set of events.
Definition: state_model.cc:237
void initServerSelection(const DdnsDomainPtr &domain)
Initializes server selection from the given DDNS domain.
Definition: nc_trans.cc:428
virtual ~NameChangeTransaction()
Destructor.
Definition: nc_trans.cc:83
void setDnsUpdateResponse(D2UpdateMessagePtr &response)
Sets the update response packet to the given packet.
Definition: nc_trans.cc:291
boost::shared_ptr< DnsServerInfo > DnsServerInfoPtr
Defines a pointer for DnsServerInfo instances.
Definition: d2_config.h:514
virtual void defineEvents()
Populates the set of events.
Definition: state_model.cc:229
void postNextEvent(unsigned int event)
Sets the next event to the given event value.
Definition: state_model.cc:320
bool selectNextServer()
Selects the next server in the current server list.
Definition: nc_trans.cc:448
virtual void verifyStates()
Validates the contents of the set of states.
Definition: nc_trans.cc:242