Kea  2.3.5-git
nc_add.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2021 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 #ifndef NC_ADD_H
8 #define NC_ADD_H
9 
11 
12 #include <d2srv/nc_trans.h>
13 #include <dns/rdata.h>
14 
15 namespace isc {
16 namespace d2 {
17 
20 public:
21  NameAddTransactionError(const char* file, size_t line,
22  const char* what) :
23  isc::Exception(file, line, what) { };
24 };
25 
53 public:
54 
56  static const int ADDING_FWD_ADDRS_ST = NCT_DERIVED_STATE_MIN + 1;
58 
60  static const int REPLACING_FWD_ADDRS_ST = NCT_DERIVED_STATE_MIN + 2;
61 
63  static const int REPLACING_REV_PTRS_ST = NCT_DERIVED_STATE_MIN + 3;
65 
67  static const int FQDN_IN_USE_EVT = NCT_DERIVED_EVENT_MIN + 1;
69 
71  static const int FQDN_NOT_IN_USE_EVT = NCT_DERIVED_EVENT_MIN + 2;
73 
88  DdnsDomainPtr& forward_domain,
89  DdnsDomainPtr& reverse_domain,
90  D2CfgMgrPtr& cfg_mgr);
91 
93  virtual ~NameAddTransaction();
94 
95 protected:
102  virtual void defineEvents();
103 
111  virtual void verifyEvents();
112 
119  virtual void defineStates();
120 
128  virtual void verifyStates();
129 
150  void readyHandler();
151 
174  void selectingFwdServerHandler();
175 
199  void selectingRevServerHandler();
200 
249  void addingFwdAddrsHandler();
250 
301  void replacingFwdAddrsHandler();
302 
343  void replacingRevPtrsHandler();
344 
360  void processAddOkHandler();
361 
379  void processAddFailedHandler();
380 
397  void buildAddFwdAddressRequest();
398 
417  void buildReplaceFwdAddressRequest();
418 
437  void buildReplaceRevPtrsRequest();
438 };
439 
441 typedef boost::shared_ptr<NameAddTransaction> NameAddTransactionPtr;
442 
443 } // namespace isc::d2
444 } // namespace isc
445 #endif
This file defines the class NameChangeTransaction.
boost::shared_ptr< DdnsDomain > DdnsDomainPtr
Defines a pointer for DdnsDomain instances.
Definition: d2_config.h:612
NameAddTransactionError(const char *file, size_t line, const char *what)
Definition: nc_add.h:21
boost::shared_ptr< NameChangeRequest > NameChangeRequestPtr
Defines a pointer to a NameChangeRequest.
Definition: ncr_msg.h:212
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
boost::shared_ptr< NameAddTransaction > NameAddTransactionPtr
Defines a pointer to a NameAddTransaction.
Definition: nc_add.h:441
boost::shared_ptr< D2CfgMgr > D2CfgMgrPtr
Defines a shared pointer to D2CfgMgr.
Definition: d2_cfg_mgr.h:334
Embodies the "life-cycle" required to carry out a DDNS Add update.
Definition: nc_add.h:52
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-lfc.
Embodies the "life-cycle" required to carry out a DDNS update.
Definition: nc_trans.h:77
Thrown if the NameAddTransaction encounters a general error.
Definition: nc_add.h:19