nc_trans.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. // Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // Permission to use, copy, modify, and/or distribute this software for any
  4. // purpose with or without fee is hereby granted, provided that the above
  5. // copyright notice and this permission notice appear in all copies.
  6. //
  7. // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  8. // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  9. // AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  10. // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  11. // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  12. // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  13. // PERFORMANCE OF THIS SOFTWARE.
  14. #ifndef NC_TRANS_H
  15. #define NC_TRANS_H
  16. /// @file nc_trans.h This file defines the class NameChangeTransaction.
  17. #include <exceptions/exceptions.h>
  18. #include <d2/d2_asio.h>
  19. #include <d2/d2_config.h>
  20. #include <d2/dns_client.h>
  21. #include <d2/state_model.h>
  22. #include <dhcp_ddns/ncr_msg.h>
  23. #include <boost/shared_ptr.hpp>
  24. #include <map>
  25. namespace isc {
  26. namespace d2 {
  27. /// @brief Thrown if the transaction encounters a general error.
  28. class NameChangeTransactionError : public isc::Exception {
  29. public:
  30. NameChangeTransactionError(const char* file, size_t line,
  31. const char* what) :
  32. isc::Exception(file, line, what) { };
  33. };
  34. /// @brief Defines the type used as the unique key for transactions.
  35. typedef isc::dhcp_ddns::D2Dhcid TransactionKey;
  36. /// @brief Embodies the "life-cycle" required to carry out a DDNS update.
  37. ///
  38. /// NameChangeTransaction is the base class that provides the common state
  39. /// model mechanics and services performing the DNS updates needed to carry out
  40. /// a DHCP_DDNS request as described by a NameChangeRequest. It is derived
  41. /// from StateModel which supplies a simple, general purpose FSM implementation.
  42. ///
  43. /// Upon construction, each transaction has all of the information and
  44. /// resources required to carry out its assigned request, including the list(s)
  45. /// of DNS server(s) needed. It is responsible for knowing what conversations
  46. /// it must have with which servers and in the order necessary to fulfill the
  47. /// request. Upon fulfillment of the request, the transaction's work is complete
  48. /// and it is destroyed.
  49. ///
  50. /// Fulfillment of the request is carried out through the performance of the
  51. /// transaction's state model. Using a state driven implementation accounts
  52. /// for the conditional processing flow necessary to meet the DDNS RFCs as well
  53. /// as the asynchronous nature of IO with DNS servers.
  54. ///
  55. /// Derivations of the class are responsible for defining the state model and
  56. /// conversations necessary to carry out the specific of request.
  57. ///
  58. /// Conversations with DNS servers are done through the use of the DNSClient
  59. /// class. The DNSClient provides a IOService-based means a service which
  60. /// performs a single, packet exchange with a given DNS server. It sends a
  61. /// single update to the server and returns the response, asynchronously,
  62. /// through a callback. At each point in a transaction's state model, where
  63. /// an update is to be sent, the model "suspends" until notified by the
  64. /// DNSClient via the callback. Suspension is done by posting a
  65. /// StateModel::NOP_EVT as the next event, stopping the state model execution.
  66. ///
  67. /// Resuming state model execution when a DNS update completes is done by a
  68. /// call to StateModel::runStateModel() from within the DNSClient callback,
  69. /// with an event value of IO_COMPLETED_EVT (described below).
  70. ///
  71. /// This class defines a set of events and states that are a common to all
  72. /// transactions. Each derivation may add define additional states and events
  73. /// as needed, but it must support the common set. NameChangeTransaction
  74. /// does not supply any state handlers. These are the sole responsibility of
  75. /// derivations.
  76. class NameChangeTransaction : public DNSClient::Callback, public StateModel {
  77. public:
  78. //@{ States common to all transactions.
  79. /// @brief State from which a transaction is started.
  80. static const int READY_ST = SM_DERIVED_STATE_MIN + 1;
  81. /// @brief State in which forward DNS server selection is done.
  82. ///
  83. /// Within this state, the actual selection of the next forward server
  84. /// to use is conducted. Upon conclusion of this state the next server
  85. /// is either selected or it should transition out with NO_MORE_SERVERS_EVT
  86. /// event.
  87. static const int SELECTING_FWD_SERVER_ST = SM_DERIVED_STATE_MIN + 2;
  88. /// @brief State in which reverse DNS server selection is done.
  89. ///
  90. /// Within this state, the actual selection of the next reverse server
  91. /// to use is conducted. Upon conclusion of this state the next server
  92. /// is either selected or it should transition out with NO_MORE_SERVERS_EVT
  93. /// event.
  94. static const int SELECTING_REV_SERVER_ST = SM_DERIVED_STATE_MIN + 3;
  95. /// @brief State which processes successful transaction conclusion.
  96. static const int PROCESS_TRANS_OK_ST = SM_DERIVED_STATE_MIN + 4;
  97. /// @brief State which processes an unsuccessful transaction conclusion.
  98. static const int PROCESS_TRANS_FAILED_ST = SM_DERIVED_STATE_MIN + 5;
  99. /// @brief Value at which custom states in a derived class should begin.
  100. static const int NCT_DERIVED_STATE_MIN = SM_DERIVED_STATE_MIN + 101;
  101. //@}
  102. //@{ Events common to all transactions.
  103. /// @brief Issued when a server needs to be selected.
  104. static const int SELECT_SERVER_EVT = SM_DERIVED_EVENT_MIN + 1;
  105. /// @brief Issued when a server has been selected.
  106. static const int SERVER_SELECTED_EVT = SM_DERIVED_EVENT_MIN + 2;
  107. /// @brief Issued when an update fails due to an IO error.
  108. static const int SERVER_IO_ERROR_EVT = SM_DERIVED_EVENT_MIN + 3;
  109. /// @brief Issued when there are no more servers from which to select.
  110. /// This occurs when none of the servers in the list can be reached to
  111. /// perform the update.
  112. static const int NO_MORE_SERVERS_EVT =SM_DERIVED_EVENT_MIN + 4;
  113. /// @brief Issued when a DNS update packet exchange has completed.
  114. /// This occurs whenever the DNSClient callback is invoked whether the
  115. /// exchange was successful or not.
  116. static const int IO_COMPLETED_EVT = SM_DERIVED_EVENT_MIN + 5;
  117. /// @brief Issued when the attempted update successfully completed.
  118. /// This occurs when an DNS update packet was successfully processed
  119. /// by the server.
  120. static const int UPDATE_OK_EVT = SM_DERIVED_EVENT_MIN + 6;
  121. /// @brief Issued when the attempted update fails to complete.
  122. /// This occurs when an DNS update packet fails to process. The nature of
  123. /// the failure is given by the DNSClient return status and the response
  124. /// packet (if one was received).
  125. static const int UPDATE_FAILED_EVT = SM_DERIVED_EVENT_MIN + 7;
  126. /// @brief Value at which custom events in a derived class should begin.
  127. static const int NCT_DERIVED_EVENT_MIN = SM_DERIVED_EVENT_MIN + 101;
  128. //@}
  129. /// @brief Defualt time to assign to a single DNS udpate.
  130. static const unsigned int DNS_UPDATE_DEFAULT_TIMEOUT = 5 * 1000;
  131. /// @brief Maximum times to attempt a single update on a given server.
  132. static const unsigned int MAX_UPDATE_TRIES_PER_SERVER = 3;
  133. /// @brief Constructor
  134. ///
  135. /// Instantiates a transaction that is ready to be started.
  136. ///
  137. /// @param io_service IO service to be used for IO processing
  138. /// @param ncr is the NameChangeRequest to fulfill
  139. /// @param forward_domain is the domain to use for forward DNS updates
  140. /// @param reverse_domain is the domain to use for reverse DNS updates
  141. ///
  142. /// @throw NameChangeTransactionError if given an null request,
  143. /// if forward change is enabled but forward domain is null, if
  144. /// reverse change is enabled but reverse domain is null.
  145. NameChangeTransaction(IOServicePtr& io_service,
  146. dhcp_ddns::NameChangeRequestPtr& ncr,
  147. DdnsDomainPtr& forward_domain,
  148. DdnsDomainPtr& reverse_domain);
  149. /// @brief Destructor
  150. virtual ~NameChangeTransaction();
  151. /// @brief Begins execution of the transaction.
  152. ///
  153. /// This method invokes StateModel::startModel() with a value of READY_ST.
  154. /// This causes transaction's state model to attempt to begin execution
  155. /// with the state handler for READY_ST.
  156. void startTransaction();
  157. /// @brief Serves as the DNSClient IO completion event handler.
  158. ///
  159. /// This is the implementation of the method inherited by our derivation
  160. /// from DNSClient::Callback. When the DNSClient completes an update it
  161. /// invokes this method as the completion handler. This method stores
  162. /// the given status and invokes runStateModel() with an event value of
  163. /// IO_COMPLETED_EVT.
  164. ///
  165. /// @param status is the outcome of the DNS update packet exchange.
  166. /// This method is exception safe.
  167. virtual void operator()(DNSClient::Status status);
  168. protected:
  169. /// @brief Send the update request to the current server.
  170. ///
  171. /// This method increments the update attempt count and then passes the
  172. /// current update request to the DNSClient instance to be sent to the
  173. /// currently selected server. Since the send is asynchronous, the method
  174. /// posts NOP_EVT as the next event and then returns.
  175. ///
  176. /// @param use_tsig True if the update should be include a TSIG key. This
  177. /// is not yet implemented.
  178. ///
  179. /// If an exception occurs it will be logged and and the transaction will
  180. /// be failed.
  181. virtual void sendUpdate(bool use_tsig = false);
  182. /// @brief Adds events defined by NameChangeTransaction to the event set.
  183. ///
  184. /// This method adds the events common to NCR transaction processing to
  185. /// the set of define events. It invokes the superclass's implementation
  186. /// first to maintain the hierarchical chain of event definition.
  187. /// Derivations of NameChangeTransaction must invoke its implementation
  188. /// in like fashion.
  189. ///
  190. /// @throw StateModelError if an event definition is invalid or a duplicate.
  191. virtual void defineEvents();
  192. /// @brief Validates the contents of the set of events.
  193. ///
  194. /// This method verifies that the events defined by both the superclass and
  195. /// this class are defined. As with defineEvents, this method calls the
  196. /// superclass's implementation first, to verify events defined by it and
  197. /// then this implementation to verify events defined by
  198. /// NameChangeTransaction.
  199. ///
  200. /// @throw StateModelError if an event value is undefined.
  201. virtual void verifyEvents();
  202. /// @brief Adds states defined by NameChangeTransaction to the state set.
  203. ///
  204. /// This method adds the states common to NCR transaction processing to
  205. /// the dictionary of states. It invokes the superclass's implementation
  206. /// first to maintain the hierarchical chain of state definition.
  207. /// Derivations of NameChangeTransaction must invoke its implementation
  208. /// in like fashion.
  209. ///
  210. /// @throw StateModelError if an state definition is invalid or a duplicate.
  211. virtual void defineStates();
  212. /// @brief Validates the contents of the set of states.
  213. ///
  214. /// This method verifies that the states defined by both the superclass and
  215. /// this class are defined. As with defineStates, this method calls the
  216. /// superclass's implementation first, to verify states defined by it and
  217. /// then this implementation to verify states defined by
  218. /// NameChangeTransaction.
  219. ///
  220. /// @throw StateModelError if an event value is undefined.
  221. virtual void verifyStates();
  222. /// @brief Handler for fatal model execution errors.
  223. ///
  224. /// This handler is called by the StateModel implementation when the model
  225. /// execution encounters a model violation: attempt to call an unmapped
  226. /// state, an event not valid for the current state, or an uncaught
  227. /// exception thrown during a state handler invocation. When such an
  228. /// error occurs the transaction is deemed inoperable, and further model
  229. /// execution cannot be performed. It marks the transaction as failed by
  230. /// setting the NCR status to dhcp_ddns::ST_FAILED
  231. ///
  232. /// @param explanation is text detailing the error
  233. virtual void onModelFailure(const std::string& explanation);
  234. /// @brief Determines the state and next event based on update attempts.
  235. ///
  236. /// This method will post a next event of SERVER_SELECTED_EVT to the
  237. /// current state if the number of update attempts has not reached the
  238. /// maximum allowed.
  239. ///
  240. /// If the maximum number of attempts has been reached, it will transition
  241. /// to the given state with a next event of SERVER_IO_ERROR_EVT.
  242. ///
  243. /// @param server_sel_state State to transition to if maximum attempts
  244. /// have been tried.
  245. ///
  246. void retryTransition(const int server_sel_state);
  247. /// @brief Sets the update request packet to the given packet.
  248. ///
  249. /// @param request is the new request packet to assign.
  250. void setDnsUpdateRequest(D2UpdateMessagePtr& request);
  251. /// @brief Destroys the current update request packet.
  252. void clearDnsUpdateRequest();
  253. /// @brief Sets the update status to the given status value.
  254. ///
  255. /// @param status is the new value for the update status.
  256. void setDnsUpdateStatus(const DNSClient::Status& status);
  257. /// @brief Sets the update response packet to the given packet.
  258. ///
  259. /// @param response is the new response packet to assign.
  260. void setDnsUpdateResponse(D2UpdateMessagePtr& response);
  261. /// @brief Destroys the current update response packet.
  262. void clearDnsUpdateResponse();
  263. /// @brief Sets the forward change completion flag to the given value.
  264. ///
  265. /// @param value is the new value to assign to the flag.
  266. void setForwardChangeCompleted(const bool value);
  267. /// @brief Sets the reverse change completion flag to the given value.
  268. ///
  269. /// @param value is the new value to assign to the flag.
  270. void setReverseChangeCompleted(const bool value);
  271. /// @brief Sets the status of the transaction's NameChangeRequest
  272. ///
  273. /// @param status is the new value to assign to the NCR status.
  274. void setNcrStatus(const dhcp_ddns::NameChangeStatus& status);
  275. /// @brief Initializes server selection from the given DDNS domain.
  276. ///
  277. /// Method prepares internal data to conduct server selection from the
  278. /// list of servers supplied by the given domain. This method should be
  279. /// called when a transaction is ready to begin selecting servers from
  280. /// a new list. Typically this will be prior to starting the updates for
  281. /// a given DNS direction.
  282. ///
  283. /// @param domain is the domain from which server selection is to be
  284. /// conducted.
  285. void initServerSelection(const DdnsDomainPtr& domain);
  286. /// @brief Selects the next server in the current server list.
  287. ///
  288. /// This method is used to iterate over the list of servers. If there are
  289. /// no more servers in the list, it returns false. Otherwise it sets the
  290. /// current server to the next server and creates a new DNSClient
  291. /// instance.
  292. ///
  293. /// @return True if a server has been selected, false if there are no more
  294. /// servers from which to select.
  295. bool selectNextServer();
  296. /// @brief Fetches the currently selected server.
  297. ///
  298. /// @return A const pointer reference to the DnsServerInfo of the current
  299. /// server.
  300. const DnsServerInfoPtr& getCurrentServer() const;
  301. /// @brief Fetches the DNSClient instance
  302. ///
  303. /// @return A const pointer reference to the DNSClient
  304. const DNSClientPtr& getDNSClient() const;
  305. /// @brief Sets the update attempt count to the given value.
  306. ///
  307. /// @param value is the new value to assign.
  308. void setUpdateAttempts(const size_t value);
  309. /// @brief Fetches the IOService the transaction uses for IO processing.
  310. ///
  311. /// @return returns a const pointer to the IOService.
  312. const IOServicePtr& getIOService() {
  313. return (io_service_);
  314. }
  315. /// @brief Creates a new DNS update request based on the given domain.
  316. ///
  317. /// Constructs a new "empty", OUTBOUND, request with the message id set
  318. /// and zone section populated based on the given domain.
  319. ///
  320. /// @return A D2UpdateMessagePtr to the new request.
  321. ///
  322. /// @throw NameChangeTransactionError if request cannot be constructed.
  323. D2UpdateMessagePtr prepNewRequest(DdnsDomainPtr domain);
  324. /// @brief Adds an RData for the lease address to the given RRset.
  325. ///
  326. /// Creates an in::A() or in:AAAA() RData instance from the NCR
  327. /// lease address and adds it to the given RRset.
  328. ///
  329. /// @param RRset RRset to which to add the RData
  330. ///
  331. /// @throw NameChangeTransactionError if RData cannot be constructed or
  332. /// the RData cannot be added to the given RRset.
  333. void addLeaseAddressRdata(dns::RRsetPtr& rrset);
  334. /// @brief Adds an RData for the lease client's DHCID to the given RRset.
  335. ///
  336. /// Creates an in::DHCID() RData instance from the NCR DHCID and adds
  337. /// it to the given RRset.
  338. ///
  339. /// @param RRset RRset to which to add the RData
  340. ///
  341. /// @throw NameChangeTransactionError if RData cannot be constructed or
  342. /// the RData cannot be added to the given RRset.
  343. void addDhcidRdata(dns::RRsetPtr& rrset);
  344. /// @brief Adds an RData for the lease FQDN to the given RRset.
  345. ///
  346. /// Creates an in::PTR() RData instance from the NCR FQDN and adds
  347. /// it to the given RRset.
  348. ///
  349. /// @param RRset RRset to which to add the RData
  350. ///
  351. /// @throw NameChangeTransactionError if RData cannot be constructed or
  352. /// the RData cannot be added to the given RRset.
  353. void addPtrRdata(dns::RRsetPtr& rrset);
  354. public:
  355. /// @brief Fetches the NameChangeRequest for this transaction.
  356. ///
  357. /// @return A const pointer reference to the NameChangeRequest.
  358. const dhcp_ddns::NameChangeRequestPtr& getNcr() const;
  359. /// @brief Fetches the unique key that identifies this transaction.
  360. ///
  361. /// Transactions are uniquely identified by a TransactionKey. Currently
  362. /// this is wrapper around a D2Dhcid.
  363. ///
  364. /// @return A const reference to the TransactionKey.
  365. const TransactionKey& getTransactionKey() const;
  366. /// @brief Fetches the NameChangeRequest status of the transaction.
  367. ///
  368. /// This is the current status of the NameChangeRequest, not to
  369. /// be confused with the state of the transaction. Once the transaction
  370. /// is reached its conclusion, the request will end up with a final
  371. /// status.
  372. ///
  373. /// @return A dhcp_ddns::NameChangeStatus representing the current
  374. /// status of the transaction.
  375. dhcp_ddns::NameChangeStatus getNcrStatus() const;
  376. /// @brief Fetches the forward DdnsDomain.
  377. ///
  378. /// @return A pointer reference to the forward DdnsDomain. If
  379. /// the request does not include a forward change, the pointer will empty.
  380. DdnsDomainPtr& getForwardDomain();
  381. /// @brief Fetches the reverse DdnsDomain.
  382. ///
  383. /// @return A pointer reference to the reverse DdnsDomain. If
  384. /// the request does not include a reverse change, the pointer will empty.
  385. DdnsDomainPtr& getReverseDomain();
  386. /// @brief Fetches the current DNS update request packet.
  387. ///
  388. /// @return A const pointer reference to the current D2UpdateMessage
  389. /// request.
  390. const D2UpdateMessagePtr& getDnsUpdateRequest() const;
  391. /// @brief Fetches the most recent DNS update status.
  392. ///
  393. /// @return A DNSClient::Status indicating the result of the most recent
  394. /// DNS update to complete.
  395. DNSClient::Status getDnsUpdateStatus() const;
  396. /// @brief Fetches the most recent DNS update response packet.
  397. ///
  398. /// @return A const pointer reference to the D2UpdateMessage most recently
  399. /// received.
  400. const D2UpdateMessagePtr& getDnsUpdateResponse() const;
  401. /// @brief Returns whether the forward change has completed or not.
  402. ///
  403. /// The value returned is only meaningful if the NameChangeRequest calls
  404. /// for a forward change to be done. The value returned indicates if
  405. /// forward change has been completed successfully.
  406. ///
  407. /// @return True if the forward change has been completed, false otherwise.
  408. bool getForwardChangeCompleted() const;
  409. /// @brief Returns whether the reverse change has completed or not.
  410. ///
  411. /// The value returned is only meaningful if the NameChangeRequest calls
  412. /// for a reverse change to be done. The value returned indicates if
  413. /// reverse change has been completed successfully.
  414. ///
  415. /// @return True if the reverse change has been completed, false otherwise.
  416. bool getReverseChangeCompleted() const;
  417. /// @brief Fetches the update attempt count for the current update.
  418. ///
  419. /// @return size_t which is the number of times the current request has
  420. /// been attempted against the current server.
  421. size_t getUpdateAttempts() const;
  422. /// @brief Returns the DHCP data type for the lease address
  423. ///
  424. /// @return constant reference to dns::RRType::A() if the lease address
  425. /// is IPv4 or dns::RRType::AAAA() if the lease address is IPv6.
  426. const dns::RRType& getAddressRRType() const;
  427. private:
  428. /// @brief The IOService which should be used to for IO processing.
  429. IOServicePtr io_service_;
  430. /// @brief The NameChangeRequest that the transaction is to fulfill.
  431. dhcp_ddns::NameChangeRequestPtr ncr_;
  432. /// @brief The forward domain that matches the request.
  433. ///
  434. /// The forward "domain" is DdnsDomain which contains all of the information
  435. /// necessary, including the list of DNS servers to be used for a forward
  436. /// change.
  437. DdnsDomainPtr forward_domain_;
  438. /// @brief The reverse domain that matches the request.
  439. ///
  440. /// The reverse "domain" is DdnsDomain which contains all of the information
  441. /// necessary, including the list of DNS servers to be used for a reverse
  442. /// change.
  443. DdnsDomainPtr reverse_domain_;
  444. /// @brief The DNSClient instance that will carry out DNS packet exchanges.
  445. DNSClientPtr dns_client_;
  446. /// @brief The DNS current update request packet.
  447. D2UpdateMessagePtr dns_update_request_;
  448. /// @brief The outcome of the most recently completed DNS packet exchange.
  449. DNSClient::Status dns_update_status_;
  450. /// @brief The DNS update response packet most recently received.
  451. D2UpdateMessagePtr dns_update_response_;
  452. /// @brief Indicator for whether or not the forward change completed ok.
  453. bool forward_change_completed_;
  454. /// @brief Indicator for whether or not the reverse change completed ok.
  455. bool reverse_change_completed_;
  456. /// @brief Pointer to the current server selection list.
  457. DnsServerInfoStoragePtr current_server_list_;
  458. /// @brief Pointer to the currently selected server.
  459. DnsServerInfoPtr current_server_;
  460. /// @brief Next server position in the list.
  461. ///
  462. /// This value is always the position of the next selection in the server
  463. /// list, which may be beyond the end of the list.
  464. size_t next_server_pos_;
  465. /// @brief Number of transmit attempts for the current request.
  466. size_t update_attempts_;
  467. };
  468. /// @brief Defines a pointer to a NameChangeTransaction.
  469. typedef boost::shared_ptr<NameChangeTransaction> NameChangeTransactionPtr;
  470. } // namespace isc::d2
  471. } // namespace isc
  472. #endif