Kea  1.5.0
nc_remove.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2015,2017 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_REMOVE_H
8 #define NC_REMOVE_H
9 
11 
12 #include <d2/nc_trans.h>
13 
14 namespace isc {
15 namespace d2 {
16 
19 public:
20  NameRemoveTransactionError(const char* file, size_t line,
21  const char* what) :
22  isc::Exception(file, line, what) { };
23 };
24 
52 public:
53 
55  static const int REMOVING_FWD_ADDRS_ST = NCT_DERIVED_STATE_MIN + 1;
57 
60 
64 
66 
69 
84  DdnsDomainPtr& forward_domain,
85  DdnsDomainPtr& reverse_domain,
86  D2CfgMgrPtr& cfg_mgr);
87 
89  virtual ~NameRemoveTransaction();
90 
91 protected:
98  virtual void defineEvents();
99 
107  virtual void verifyEvents();
108 
115  virtual void defineStates();
116 
124  virtual void verifyStates();
125 
146  void readyHandler();
147 
170 
194 
237 
288  void removingFwdRRsHandler();
289 
330  void removingRevPtrsHandler();
331 
346  void processRemoveOkHandler();
347 
367 
384 
404 
421 };
422 
424 typedef boost::shared_ptr<NameRemoveTransaction> NameRemoveTransactionPtr;
425 
426 
427 } // namespace isc::d2
428 } // namespace isc
429 #endif
isc::d2::NameRemoveTransactionError::NameRemoveTransactionError
NameRemoveTransactionError(const char *file, size_t line, const char *what)
Definition: nc_remove.h:20
isc::d2::NameRemoveTransaction::~NameRemoveTransaction
virtual ~NameRemoveTransaction()
Destructor.
Definition: nc_remove.cc:42
isc::d2::D2CfgMgrPtr
boost::shared_ptr< D2CfgMgr > D2CfgMgrPtr
Defines a shared pointer to D2CfgMgr.
Definition: d2_cfg_mgr.h:297
isc::d2::NameRemoveTransaction::buildRemoveFwdRRsRequest
void buildRemoveFwdRRsRequest()
Builds a DNS request to remove all forward DNS RRs for a FQDN.
Definition: nc_remove.cc:631
isc::d2::NameRemoveTransaction::processRemoveOkHandler
void processRemoveOkHandler()
State handler for PROCESS_TRANS_OK_ST.
Definition: nc_remove.cc:563
isc::dhcp_ddns::NameChangeRequestPtr
boost::shared_ptr< NameChangeRequest > NameChangeRequestPtr
Defines a pointer to a NameChangeRequest.
Definition: ncr_msg.h:212
isc::d2::NameRemoveTransaction::selectingFwdServerHandler
void selectingFwdServerHandler()
State handler for SELECTING_FWD_SERVER_ST.
Definition: nc_remove.cc:149
isc::d2::NameRemoveTransaction::verifyStates
virtual void verifyStates()
Validates the contents of the set of states.
Definition: nc_remove.cc:112
isc::d2::NameRemoveTransaction::buildRemoveRevPtrsRequest
void buildRemoveRevPtrsRequest()
Builds a DNS request to remove a reverse DNS entry for a FQDN.
Definition: nc_remove.cc:679
isc::d2::NameRemoveTransaction::removingFwdRRsHandler
void removingFwdRRsHandler()
State handler for REMOVING_FWD_RRS_ST.
Definition: nc_remove.cc:288
isc::Exception
This is a base class for exceptions thrown from the DNS library module.
Definition: exceptions/exceptions.h:23
isc::d2::NameRemoveTransaction
Embodies the "life-cycle" required to carry out a DDNS Remove update.
Definition: nc_remove.h:51
isc::d2::NameRemoveTransaction::NameRemoveTransaction
NameRemoveTransaction(asiolink::IOServicePtr &io_service, dhcp_ddns::NameChangeRequestPtr &ncr, DdnsDomainPtr &forward_domain, DdnsDomainPtr &reverse_domain, D2CfgMgrPtr &cfg_mgr)
Event sent when replace attempt to fails with address not in use.
Definition: nc_remove.cc:29
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition: agent_parser.cc:144
isc::Exception::what
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Definition: exceptions/exceptions.cc:32
isc::d2::NameRemoveTransaction::defineStates
virtual void defineStates()
Adds states defined by NameRemoveTransaction to the state set.
Definition: nc_remove.cc:74
isc::d2::NameRemoveTransaction::REMOVING_REV_PTRS_ST
static const int REMOVING_REV_PTRS_ST
State that attempts to remove reverse PTR records.
Definition: nc_remove.h:62
isc::d2::NameRemoveTransaction::buildRemoveFwdAddressRequest
void buildRemoveFwdAddressRequest()
Builds a DNS request to remove a forward DNS address for a FQDN.
Definition: nc_remove.cc:599
isc::d2::NameRemoveTransaction::removingFwdAddrsHandler
void removingFwdAddrsHandler()
State handler for REMOVING_FWD_ADDRS_ST.
Definition: nc_remove.cc:178
isc::dns::Exception
Definition: dns/exceptions.h:25
nc_trans.h
isc::d2::NameRemoveTransaction::readyHandler
void readyHandler()
State handler for READY_ST.
Definition: nc_remove.cc:129
isc::d2::NameRemoveTransaction::processRemoveFailedHandler
void processRemoveFailedHandler()
State handler for PROCESS_TRANS_FAILED_ST.
Definition: nc_remove.cc:580
isc::d2::NameChangeTransaction
Embodies the "life-cycle" required to carry out a DDNS update.
Definition: nc_trans.h:77
isc::d2::NameRemoveTransaction::removingRevPtrsHandler
void removingRevPtrsHandler()
State handler for REMOVING_REV_PTRS_ST.
Definition: nc_remove.cc:448
isc::d2::NameRemoveTransaction::verifyEvents
virtual void verifyEvents()
Validates the contents of the set of events.
Definition: nc_remove.cc:56
isc::d2::NameRemoveTransaction::selectingRevServerHandler
void selectingRevServerHandler()
State handler for SELECTING_REV_SERVER_ST.
Definition: nc_remove.cc:418
isc::d2::NameRemoveTransaction::REMOVING_FWD_ADDRS_ST
static const int REMOVING_FWD_ADDRS_ST
State that attempts to remove specific forward address record.
Definition: nc_remove.h:56
isc::d2::NameRemoveTransaction::REMOVING_FWD_RRS_ST
static const int REMOVING_FWD_RRS_ST
State that attempts to remove any other forward RRs for the DHCID.
Definition: nc_remove.h:59
isc::d2::NameRemoveTransactionPtr
boost::shared_ptr< NameRemoveTransaction > NameRemoveTransactionPtr
Defines a pointer to a NameRemoveTransaction.
Definition: nc_remove.h:424
isc::d2::NameChangeTransaction::NCT_DERIVED_STATE_MIN
static const int NCT_DERIVED_STATE_MIN
Value at which custom states in a derived class should begin.
Definition: nc_trans.h:108
isc::d2::NameRemoveTransactionError
Thrown if the NameRemoveTransaction encounters a general error.
Definition: nc_remove.h:18
isc::d2::DdnsDomainPtr
boost::shared_ptr< DdnsDomain > DdnsDomainPtr
Defines a pointer for DdnsDomain instances.
Definition: d2_config.h:586
isc::d2::NameRemoveTransaction::defineEvents
virtual void defineEvents()
Adds events defined by NameRemoveTransaction to the event set.
Definition: nc_remove.cc:46