Kea 2.5.9
simple_add_without_dhcid.h
Go to the documentation of this file.
1// Copyright (C) 2023 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 SIMPLE_ADD_WITHOUT_DHCID_H
8#define SIMPLE_ADD_WITHOUT_DHCID_H
9
11
12#include <d2srv/nc_trans.h>
13#include <dns/rdata.h>
14
15namespace isc {
16namespace d2 {
17
20public:
21 SimpleAddWithoutDHCIDTransactionError(const char* file, size_t line,
22 const char* what) :
23 isc::Exception(file, line, what) { };
24};
25
50public:
51
53
55
59
61
62 static const int FQDN_IN_USE_EVT = NCT_DERIVED_EVENT_MIN + 1;
63
67
82 DdnsDomainPtr& forward_domain,
83 DdnsDomainPtr& reverse_domain,
84 D2CfgMgrPtr& cfg_mgr);
85
88
89protected:
96 virtual void defineEvents();
97
105 virtual void verifyEvents();
106
113 virtual void defineStates();
114
122 virtual void verifyStates();
123
144 void readyHandler();
145
168
192
237
279
294 void processAddOkHandler();
295
313
330
346};
347
349typedef boost::shared_ptr<SimpleAddWithoutDHCIDTransaction> SimpleAddWithoutDHCIDTransactionPtr;
350
351} // namespace isc::d2
352} // namespace isc
353#endif
This is a base class for exceptions thrown from the DNS library module.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Embodies the "life-cycle" required to carry out a DDNS update.
Definition: nc_trans.h:77
static const int NCT_DERIVED_STATE_MIN
Value at which custom states in a derived class should begin.
Definition: nc_trans.h:108
static const int NCT_DERIVED_EVENT_MIN
Value at which custom events in a derived class should begin.
Definition: nc_trans.h:144
Thrown if the SimpleAddWithoutDHCIDTransaction encounters a general error.
SimpleAddWithoutDHCIDTransactionError(const char *file, size_t line, const char *what)
Embodies the "life-cycle" required to carry out a DDNS Add update without checking for conflicts.
void replacingRevPtrsHandler()
State handler for REPLACING_REV_PTRS_ST.
static const int FQDN_NOT_IN_USE_EVT
Event sent when replace attempt fails with address not in use.
virtual void defineStates()
Adds states defined by SimpleAddWithoutDHCID to the state set.
static const int REPLACING_REV_PTRS_ST
State that attempts to replace reverse PTR records.
virtual void defineEvents()
Adds events defined by SimpleAddWithoutDHCID to the event set.
static const int REPLACING_FWD_ADDRS_ST
State that attempts to add forward address records.
void readyHandler()
State handler for READY_ST.
void buildReplaceRevPtrsRequest()
Builds a DNS request to replace a reverse DNS entry for an FQDN.
void buildReplaceFwdAddressRequest()
Builds a DNS request to add/replace a forward DNS entry for an FQDN.
void selectingRevServerHandler()
State handler for SELECTING_REV_SERVER_ST.
static const int FQDN_IN_USE_EVT
Event sent when an add attempt fails with address in use.
virtual void verifyEvents()
Validates the contents of the set of events.
void selectingFwdServerHandler()
State handler for SELECTING_FWD_SERVER_ST.
virtual void verifyStates()
Validates the contents of the set of states.
void replacingFwdAddrsHandler()
State handler for REPLACING_FWD_ADDRS_ST.
void processAddFailedHandler()
State handler for PROCESS_TRANS_FAILED_ST.
void processAddOkHandler()
State handler for PROCESS_TRANS_OK_ST.
boost::shared_ptr< DdnsDomain > DdnsDomainPtr
Defines a pointer for DdnsDomain instances.
Definition: d2_config.h:622
boost::shared_ptr< D2CfgMgr > D2CfgMgrPtr
Defines a shared pointer to D2CfgMgr.
Definition: d2_cfg_mgr.h:334
boost::shared_ptr< SimpleAddWithoutDHCIDTransaction > SimpleAddWithoutDHCIDTransactionPtr
Defines a pointer to a SimpleAddWithoutDHCID.
boost::shared_ptr< NameChangeRequest > NameChangeRequestPtr
Defines a pointer to a NameChangeRequest.
Definition: ncr_msg.h:241
Defines the logger used by the top-level component of kea-lfc.
This file defines the class NameChangeTransaction.