| Kea 3.0.2-git

nc_add.cc
Go to the documentation of this file.
1// Copyright (C) 2013-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#include <config.h>
8
9#include <d2/nc_add.h>
10#include <d2srv/d2_cfg_mgr.h>
11#include <d2srv/d2_log.h>
12
13#include <util/buffer.h>
14#include <dns/rdataclass.h>
15
16#include <functional>
17
18 namespace isc {
19 namespace d2 {
20
21// NameAddTransaction states
22 const int NameAddTransaction::ADDING_FWD_ADDRS_ST;
23 const int NameAddTransaction::REPLACING_FWD_ADDRS_ST;
24 const int NameAddTransaction::REPLACING_REV_PTRS_ST;
25
26// NameAddTransaction events
27 const int NameAddTransaction::FQDN_IN_USE_EVT;
28 const int NameAddTransaction::FQDN_NOT_IN_USE_EVT;
29
30 NameAddTransaction::
31 NameAddTransaction(asiolink::IOServicePtr& io_service,
32 dhcp_ddns::NameChangeRequestPtr& ncr,
33 DdnsDomainPtr& forward_domain,
34 DdnsDomainPtr& reverse_domain,
35 D2CfgMgrPtr& cfg_mgr)
36 : NameChangeTransaction(io_service, ncr, forward_domain, reverse_domain,
37 cfg_mgr) {
38 if (ncr->getChangeType() != isc::dhcp_ddns::CHG_ADD) {
39 isc_throw (NameAddTransactionError,
40 "NameAddTransaction, request type must be CHG_ADD");
41 }
42}
43
44 NameAddTransaction::~NameAddTransaction(){
45}
46
47 void
48 NameAddTransaction::defineEvents() {
49 // Call superclass impl first.
50 NameChangeTransaction::defineEvents();
51
52 // Define NameAddTransaction events.
53 defineEvent(FQDN_IN_USE_EVT, "FQDN_IN_USE_EVT");
54 defineEvent(FQDN_NOT_IN_USE_EVT, "FQDN_NOT_IN_USE_EVT");
55}
56
57 void
58 NameAddTransaction::verifyEvents() {
59 // Call superclass implementation first to verify its events. These are
60 // events common to all transactions, and they must be defined.
61 // SELECT_SERVER_EVT
62 // SERVER_SELECTED_EVT
63 // SERVER_IO_ERROR_EVT
64 // NO_MORE_SERVERS_EVT
65 // IO_COMPLETED_EVT
66 // UPDATE_OK_EVT
67 // UPDATE_FAILED_EVT
68 NameChangeTransaction::verifyEvents();
69
70 // Verify NameAddTransaction events by attempting to fetch them.
71 getEvent(FQDN_IN_USE_EVT);
72 getEvent(FQDN_NOT_IN_USE_EVT);
73}
74
75 void
76 NameAddTransaction::defineStates() {
77 // Call superclass impl first.
78 NameChangeTransaction::defineStates();
79
80 // Define NameAddTransaction states.
81 defineState(READY_ST, "READY_ST",
82 std::bind(&NameAddTransaction::readyHandler, this));
83
84 defineState(SELECTING_FWD_SERVER_ST, "SELECTING_FWD_SERVER_ST",
85 std::bind(&NameAddTransaction::selectingFwdServerHandler, this));
86
87 defineState(SELECTING_REV_SERVER_ST, "SELECTING_REV_SERVER_ST",
88 std::bind(&NameAddTransaction::selectingRevServerHandler, this));
89
90 defineState(ADDING_FWD_ADDRS_ST, "ADDING_FWD_ADDRS_ST",
91 std::bind(&NameAddTransaction::addingFwdAddrsHandler, this));
92
93 defineState(REPLACING_FWD_ADDRS_ST, "REPLACING_FWD_ADDRS_ST",
94 std::bind(&NameAddTransaction::replacingFwdAddrsHandler, this));
95
96 defineState(REPLACING_REV_PTRS_ST, "REPLACING_REV_PTRS_ST",
97 std::bind(&NameAddTransaction::replacingRevPtrsHandler, this));
98
99 defineState(PROCESS_TRANS_OK_ST, "PROCESS_TRANS_OK_ST",
100 std::bind(&NameAddTransaction::processAddOkHandler, this));
101
102 defineState(PROCESS_TRANS_FAILED_ST, "PROCESS_TRANS_FAILED_ST",
103 std::bind(&NameAddTransaction::processAddFailedHandler, this));
104}
105
106 void
107 NameAddTransaction::verifyStates() {
108 // Call superclass implementation first to verify its states. These are
109 // states common to all transactions, and they must be defined.
110 // READY_ST
111 // SELECTING_FWD_SERVER_ST
112 // SELECTING_REV_SERVER_ST
113 // PROCESS_TRANS_OK_ST
114 // PROCESS_TRANS_FAILED_ST
115 NameChangeTransaction::verifyStates();
116
117 // Verify NameAddTransaction states by attempting to fetch them.
118 getStateInternal(ADDING_FWD_ADDRS_ST);
119 getStateInternal(REPLACING_FWD_ADDRS_ST);
120 getStateInternal(REPLACING_REV_PTRS_ST);
121}
122
123 void
124 NameAddTransaction::readyHandler() {
125 switch(getNextEvent()) {
126 case START_EVT:
127 if (getForwardDomain()) {
128 // Request includes a forward change, do that first.
129 transition(SELECTING_FWD_SERVER_ST, SELECT_SERVER_EVT);
130 } else {
131 // Reverse change only, transition accordingly.
132 transition(SELECTING_REV_SERVER_ST, SELECT_SERVER_EVT);
133 }
134
135 break;
136 default:
137 // Event is invalid.
138 isc_throw(NameAddTransactionError,
139 "Wrong event for context: " << getContextStr());
140 }
141}
142
143 void
144 NameAddTransaction::selectingFwdServerHandler() {
145 switch(getNextEvent()) {
146 case SELECT_SERVER_EVT:
147 // First time through for this transaction, so initialize server
148 // selection.
149 initServerSelection(getForwardDomain());
150 break;
151 case SERVER_IO_ERROR_EVT:
152 // We failed to communicate with current server. Attempt to select
153 // another one below.
154 break;
155 default:
156 // Event is invalid.
157 isc_throw(NameAddTransactionError,
158 "Wrong event for context: " << getContextStr());
159 }
160
161 // Select the next server from the list of forward servers.
162 if (selectNextServer()) {
163 // We have a server to try.
164 transition(ADDING_FWD_ADDRS_ST, SERVER_SELECTED_EVT);
165 } else {
166 // Server list is exhausted, so fail the transaction.
167 transition(PROCESS_TRANS_FAILED_ST, NO_MORE_SERVERS_EVT);
168 }
169}
170
171 void
172 NameAddTransaction::addingFwdAddrsHandler() {
173 if (doOnEntry()) {
174 // Clear the update attempts count on initial transition.
175 clearUpdateAttempts();
176 }
177
178 switch(getNextEvent()) {
179 case SERVER_SELECTED_EVT:
180 try {
181 clearDnsUpdateRequest();
182 buildAddFwdAddressRequest();
183 } catch (const std::exception& ex) {
184 // While unlikely, the build might fail if we have invalid
185 // data. Should that be the case, we need to fail the
186 // transaction.
187 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_ADD_BUILD_FAILURE)
188 .arg(getRequestId())
189 .arg(getNcr()->toText())
190 .arg(ex.what());
191 transition(PROCESS_TRANS_FAILED_ST, UPDATE_FAILED_EVT);
192 break;
193 }
194
195 // Call sendUpdate() to initiate the async send. Note it also sets
196 // next event to NOP_EVT.
197 sendUpdate("Forward Add");
198 break;
199
200 case IO_COMPLETED_EVT: {
201 switch (getDnsUpdateStatus()) {
202 case DNSClient::SUCCESS: {
203 // We successfully received a response packet from the server.
204 const dns::Rcode& rcode = getDnsUpdateResponse()->getRcode();
205 if (rcode == dns::Rcode::NOERROR()) {
206 // We were able to add it. Mark it as done.
207 setForwardChangeCompleted(true);
208
209 // If request calls for reverse update then do that next,
210 // otherwise we can process ok.
211 if (getReverseDomain()) {
212 transition(SELECTING_REV_SERVER_ST, SELECT_SERVER_EVT);
213 } else {
214 transition(PROCESS_TRANS_OK_ST, UPDATE_OK_EVT);
215 }
216 } else if (rcode == dns::Rcode::YXDOMAIN()) {
217 // FQDN is in use so we need to attempt to replace
218 // forward address.
219 transition(REPLACING_FWD_ADDRS_ST, FQDN_IN_USE_EVT);
220 } else {
221 // Per RFC4703 any other value means cease.
222 // If we get not authorized should we try the next server in
223 // the list? @todo This needs some discussion perhaps.
224 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_ADD_REJECTED)
225 .arg(getRequestId())
226 .arg(getCurrentServer()->toText())
227 .arg(getNcr()->getFqdn())
228 .arg(rcode.getCode());
229 transition(PROCESS_TRANS_FAILED_ST, UPDATE_FAILED_EVT);
230 }
231
232 break;
233 }
234
235 case DNSClient::TIMEOUT:
236 // No response from the server, log it and set up
237 // to select the next server for a retry.
238 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_ADD_TIMEOUT)
239 .arg(getRequestId())
240 .arg(getNcr()->getFqdn())
241 .arg(getCurrentServer()->toText());
242
243 retryTransition(SELECTING_FWD_SERVER_ST);
244 break;
245
246 case DNSClient::OTHER:
247 // We couldn't send to the current server, log it and set up
248 // to select the next server for a retry.
249 // @note For now we treat OTHER as an IO error like TIMEOUT. It
250 // is not entirely clear if this is accurate.
251 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_ADD_IO_ERROR)
252 .arg(getRequestId())
253 .arg(getNcr()->getFqdn())
254 .arg(getCurrentServer()->toText());
255
256 retryTransition(SELECTING_FWD_SERVER_ST);
257 break;
258
259 case DNSClient::INVALID_RESPONSE:
260 // A response was received but was corrupt. Retry it like an IO
261 // error.
262 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_ADD_RESP_CORRUPT)
263 .arg(getRequestId())
264 .arg(getCurrentServer()->toText())
265 .arg(getNcr()->getFqdn());
266
267 retryTransition(SELECTING_FWD_SERVER_ST);
268 break;
269
270 default:
271 // Any other value and we will fail this transaction, something
272 // bigger is wrong.
273 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_ADD_BAD_DNSCLIENT_STATUS)
274 .arg(getRequestId())
275 .arg(getDnsUpdateStatus())
276 .arg(getNcr()->getFqdn())
277 .arg(getCurrentServer()->toText());
278
279 transition(PROCESS_TRANS_FAILED_ST, UPDATE_FAILED_EVT);
280 break;
281 } // end switch on dns_status
282
283 break;
284 } // end case IO_COMPLETE_EVT
285
286 default:
287 // Event is invalid.
288 isc_throw(NameAddTransactionError,
289 "Wrong event for context: " << getContextStr());
290 }
291}
292
293 void
294 NameAddTransaction::replacingFwdAddrsHandler() {
295 if (doOnEntry()) {
296 // Clear the update attempts count on initial transition.
297 clearUpdateAttempts();
298 }
299
300 switch(getNextEvent()) {
301 case FQDN_IN_USE_EVT:
302 case SERVER_SELECTED_EVT:
303 try {
304 clearDnsUpdateRequest();
305 buildReplaceFwdAddressRequest();
306 } catch (const std::exception& ex) {
307 // While unlikely, the build might fail if we have invalid
308 // data. Should that be the case, we need to fail the
309 // transaction.
310 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REPLACE_BUILD_FAILURE)
311 .arg(getRequestId())
312 .arg(getNcr()->toText())
313 .arg(ex.what());
314 transition(PROCESS_TRANS_FAILED_ST, UPDATE_FAILED_EVT);
315 break;
316 }
317
318 // Call sendUpdate() to initiate the async send. Note it also sets
319 // next event to NOP_EVT.
320 sendUpdate("Forward Replace");
321 break;
322
323 case IO_COMPLETED_EVT: {
324 switch (getDnsUpdateStatus()) {
325 case DNSClient::SUCCESS: {
326 // We successfully received a response packet from the server.
327 const dns::Rcode& rcode = getDnsUpdateResponse()->getRcode();
328 if (rcode == dns::Rcode::NOERROR()) {
329 // We were able to replace the forward mapping. Mark it as done.
330 setForwardChangeCompleted(true);
331
332 // If request calls for reverse update then do that next,
333 // otherwise we can process ok.
334 if (getReverseDomain()) {
335 transition(SELECTING_REV_SERVER_ST, SELECT_SERVER_EVT);
336 } else {
337 transition(PROCESS_TRANS_OK_ST, UPDATE_OK_EVT);
338 }
339 } else if (rcode == dns::Rcode::NXDOMAIN()) {
340 // FQDN is NOT in use so go back and do the forward add address.
341 // Covers the case that it was there when we tried to add it,
342 // but has since been removed per RFC 4703.
343 transition(ADDING_FWD_ADDRS_ST, SERVER_SELECTED_EVT);
344 } else {
345 // Per RFC4703 any other value means cease.
346 // If we get not authorized should try the next server in
347 // the list? @todo This needs some discussion perhaps.
348 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REPLACE_REJECTED)
349 .arg(getRequestId())
350 .arg(getCurrentServer()->toText())
351 .arg(getNcr()->getFqdn())
352 .arg(rcode.getCode());
353 transition(PROCESS_TRANS_FAILED_ST, UPDATE_FAILED_EVT);
354 }
355
356 break;
357 }
358
359 case DNSClient::TIMEOUT:
360 // No response from the server, log it and set up
361 // to select the next server for a retry.
362 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REPLACE_TIMEOUT)
363 .arg(getRequestId())
364 .arg(getNcr()->getFqdn())
365 .arg(getCurrentServer()->toText());
366
367 retryTransition(SELECTING_FWD_SERVER_ST);
368 break;
369
370 case DNSClient::OTHER:
371 // We couldn't send to the current server, log it and set up
372 // to select the next server for a retry.
373 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REPLACE_IO_ERROR)
374 .arg(getRequestId())
375 .arg(getNcr()->getFqdn())
376 .arg(getCurrentServer()->toText());
377
378 // If we are out of retries on this server, we go back and start
379 // all over on a new server.
380 retryTransition(SELECTING_FWD_SERVER_ST);
381 break;
382
383 case DNSClient::INVALID_RESPONSE:
384 // A response was received but was corrupt. Retry it like an IO
385 // error.
386 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REPLACE_RESP_CORRUPT)
387 .arg(getRequestId())
388 .arg(getCurrentServer()->toText())
389 .arg(getNcr()->getFqdn());
390
391 // If we are out of retries on this server, we go back and start
392 // all over on a new server.
393 retryTransition(SELECTING_FWD_SERVER_ST);
394 break;
395
396 default:
397 // Any other value and we will fail this transaction, something
398 // bigger is wrong.
399 LOG_ERROR(d2_to_dns_logger,
400 DHCP_DDNS_FORWARD_REPLACE_BAD_DNSCLIENT_STATUS)
401 .arg(getRequestId())
402 .arg(getDnsUpdateStatus())
403 .arg(getNcr()->getFqdn())
404 .arg(getCurrentServer()->toText());
405
406 transition(PROCESS_TRANS_FAILED_ST, UPDATE_FAILED_EVT);
407 break;
408 } // end switch on dns_status
409
410 break;
411 } // end case IO_COMPLETE_EVT
412
413 default:
414 // Event is invalid.
415 isc_throw(NameAddTransactionError,
416 "Wrong event for context: " << getContextStr());
417 }
418}
419
420 void
421 NameAddTransaction::selectingRevServerHandler() {
422 switch(getNextEvent()) {
423 case SELECT_SERVER_EVT:
424 // First time through for this transaction, so initialize server
425 // selection.
426 initServerSelection(getReverseDomain());
427 break;
428 case SERVER_IO_ERROR_EVT:
429 // We failed to communicate with current server. Attempt to select
430 // another one below.
431 break;
432 default:
433 // Event is invalid.
434 isc_throw(NameAddTransactionError,
435 "Wrong event for context: " << getContextStr());
436 }
437
438 // Select the next server from the list of forward servers.
439 if (selectNextServer()) {
440 // We have a server to try.
441 transition(REPLACING_REV_PTRS_ST, SERVER_SELECTED_EVT);
442 } else {
443 // Server list is exhausted, so fail the transaction.
444 transition(PROCESS_TRANS_FAILED_ST, NO_MORE_SERVERS_EVT);
445 }
446}
447
448
449 void
450 NameAddTransaction::replacingRevPtrsHandler() {
451 if (doOnEntry()) {
452 // Clear the update attempts count on initial transition.
453 clearUpdateAttempts();
454 }
455
456 switch(getNextEvent()) {
457 case SERVER_SELECTED_EVT:
458 try {
459 clearDnsUpdateRequest();
460 buildReplaceRevPtrsRequest();
461 } catch (const std::exception& ex) {
462 // While unlikely, the build might fail if we have invalid
463 // data. Should that be the case, we need to fail the
464 // transaction.
465 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REPLACE_BUILD_FAILURE)
466 .arg(getRequestId())
467 .arg(getNcr()->toText())
468 .arg(ex.what());
469 transition(PROCESS_TRANS_FAILED_ST, UPDATE_FAILED_EVT);
470 break;
471 }
472
473 // Call sendUpdate() to initiate the async send. Note it also sets
474 // next event to NOP_EVT.
475 sendUpdate("Reverse Replace");
476 break;
477
478 case IO_COMPLETED_EVT: {
479 switch (getDnsUpdateStatus()) {
480 case DNSClient::SUCCESS: {
481 // We successfully received a response packet from the server.
482 const dns::Rcode& rcode = getDnsUpdateResponse()->getRcode();
483 if (rcode == dns::Rcode::NOERROR()) {
484 // We were able to update the reverse mapping. Mark it as done.
485 setReverseChangeCompleted(true);
486 transition(PROCESS_TRANS_OK_ST, UPDATE_OK_EVT);
487 } else {
488 // Per RFC4703 any other value means cease.
489 // If we get not authorized should try the next server in
490 // the list? @todo This needs some discussion perhaps.
491 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REPLACE_REJECTED)
492 .arg(getRequestId())
493 .arg(getCurrentServer()->toText())
494 .arg(getNcr()->getFqdn())
495 .arg(rcode.getCode());
496 transition(PROCESS_TRANS_FAILED_ST, UPDATE_FAILED_EVT);
497 }
498
499 break;
500 }
501
502 case DNSClient::TIMEOUT:
503 // No response from the server, log it and set up
504 // to select the next server for a retry.
505 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REPLACE_TIMEOUT)
506 .arg(getRequestId())
507 .arg(getNcr()->getFqdn())
508 .arg(getCurrentServer()->toText());
509
510 retryTransition(SELECTING_REV_SERVER_ST);
511 break;
512
513 case DNSClient::OTHER:
514 // We couldn't send to the current server, log it and set up
515 // to select the next server for a retry.
516 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REPLACE_IO_ERROR)
517 .arg(getRequestId())
518 .arg(getNcr()->getFqdn())
519 .arg(getCurrentServer()->toText());
520
521 // If we are out of retries on this server, we go back and start
522 // all over on a new server.
523 retryTransition(SELECTING_REV_SERVER_ST);
524 break;
525
526 case DNSClient::INVALID_RESPONSE:
527 // A response was received but was corrupt. Retry it like an IO
528 // error.
529 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REPLACE_RESP_CORRUPT)
530 .arg(getRequestId())
531 .arg(getCurrentServer()->toText())
532 .arg(getNcr()->getFqdn());
533
534 // If we are out of retries on this server, we go back and start
535 // all over on a new server.
536 retryTransition(SELECTING_REV_SERVER_ST);
537 break;
538
539 default:
540 // Any other value and we will fail this transaction, something
541 // bigger is wrong.
542 LOG_ERROR(d2_to_dns_logger,
543 DHCP_DDNS_REVERSE_REPLACE_BAD_DNSCLIENT_STATUS)
544 .arg(getRequestId())
545 .arg(getDnsUpdateStatus())
546 .arg(getNcr()->getFqdn())
547 .arg(getCurrentServer()->toText());
548
549 transition(PROCESS_TRANS_FAILED_ST, UPDATE_FAILED_EVT);
550 break;
551 } // end switch on dns_status
552
553 break;
554 } // end case IO_COMPLETE_EVT
555
556 default:
557 // Event is invalid.
558 isc_throw(NameAddTransactionError,
559 "Wrong event for context: " << getContextStr());
560 }
561}
562
563 void
564 NameAddTransaction::processAddOkHandler() {
565 switch(getNextEvent()) {
566 case UPDATE_OK_EVT:
567 LOG_INFO(d2_to_dns_logger, DHCP_DDNS_ADD_SUCCEEDED)
568 .arg(getRequestId())
569 .arg(getNcr()->toText());
570 setNcrStatus(dhcp_ddns::ST_COMPLETED);
571 endModel();
572 break;
573 default:
574 // Event is invalid.
575 isc_throw(NameAddTransactionError,
576 "Wrong event for context: " << getContextStr());
577 }
578}
579
580 void
581 NameAddTransaction::processAddFailedHandler() {
582 switch(getNextEvent()) {
583 case UPDATE_FAILED_EVT:
584 case NO_MORE_SERVERS_EVT:
585 setNcrStatus(dhcp_ddns::ST_FAILED);
586 LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_ADD_FAILED)
587 .arg(getRequestId())
588 .arg(transactionOutcomeString());
589 endModel();
590 break;
591 default:
592 // Event is invalid.
593 isc_throw(NameAddTransactionError,
594 "Wrong event for context: " << getContextStr());
595 }
596}
597
598 void
599 NameAddTransaction::buildAddFwdAddressRequest() {
600 // Construct an empty request.
601 D2UpdateMessagePtr request = prepNewRequest(getForwardDomain());
602
603 // Construct dns::Name from NCR fqdn.
604 dns::Name fqdn(dns::Name(getNcr()->getFqdn()));
605
606 // Content on this request is based on RFC 4703, section 5.3.1
607 // First build the Prerequisite Section.
608
609 // Create 'FQDN Is Not In Use' prerequisite and add it to the
610 // prerequisite section.
611 // Based on RFC 2136, section 2.4.5
612 dns::RRsetPtr prereq(new dns::RRset(fqdn, dns::RRClass::NONE(),
613 dns::RRType::ANY(), dns::RRTTL(0)));
614 request->addRRset(D2UpdateMessage::SECTION_PREREQUISITE, prereq);
615
616 // Next build the Update Section.
617
618 // Create the TTL based on lease length.
619 dns::RRTTL lease_ttl(getNcr()->getLeaseLength());
620
621 // Create the FQDN/IP 'add' RR and add it to the to update section.
622 // Based on RFC 2136, section 2.5.1
623 dns::RRsetPtr update(new dns::RRset(fqdn, dns::RRClass::IN(),
624 getAddressRRType(), lease_ttl));
625
626 addLeaseAddressRdata(update);
627 request->addRRset(D2UpdateMessage::SECTION_UPDATE, update);
628
629 // Now create the FQDN/DHCID 'add' RR and add it to update section.
630 // Based on RFC 2136, section 2.5.1
631 update.reset(new dns::RRset(fqdn, dns::RRClass::IN(),
632 dns::RRType::DHCID(), lease_ttl));
633 addDhcidRdata(update);
634 request->addRRset(D2UpdateMessage::SECTION_UPDATE, update);
635
636 // Set the transaction's update request to the new request.
637 setDnsUpdateRequest(request);
638}
639
640 void
641 NameAddTransaction::buildReplaceFwdAddressRequest() {
642 // Construct an empty request.
643 D2UpdateMessagePtr request = prepNewRequest(getForwardDomain());
644
645 // Construct dns::Name from NCR fqdn.
646 dns::Name fqdn(dns::Name(getNcr()->getFqdn()));
647
648 // Content on this request is based on RFC 4703, section 5.3.2
649 // First build the Prerequisite Section.
650
651 // Create an 'FQDN Is In Use' prerequisite and add it to the
652 // pre-requisite section.
653 // Based on RFC 2136, section 2.4.4
654 dns::RRsetPtr prereq(new dns::RRset(fqdn, dns::RRClass::ANY(),
655 dns::RRType::ANY(), dns::RRTTL(0)));
656 request->addRRset(D2UpdateMessage::SECTION_PREREQUISITE, prereq);
657
658 // Create an DHCID matches prerequisite RR and add it to the
659 // pre-requisite section.
660 // Based on RFC 2136, section 2.4.2.
661 prereq.reset(new dns::RRset(fqdn, dns::RRClass::IN(),
662 dns::RRType::DHCID(), dns::RRTTL(0)));
663 addDhcidRdata(prereq);
664 request->addRRset(D2UpdateMessage::SECTION_PREREQUISITE, prereq);
665
666 // Next build the Update Section.
667
668 // Create the TTL based on lease length.
669 dns::RRTTL lease_ttl(getNcr()->getLeaseLength());
670
671 // Create the FQDN/IP 'delete' RR and add it to the update section.
672 // Based on RFC 2136, section 2.5.2
673 dns::RRsetPtr update(new dns::RRset(fqdn, dns::RRClass::ANY(),
674 getAddressRRType(), dns::RRTTL(0)));
675 request->addRRset(D2UpdateMessage::SECTION_UPDATE, update);
676
677 // Create the FQDN/IP 'add' RR and add it to the update section.
678 // Based on RFC 2136, section 2.5.1
679 update.reset(new dns::RRset(fqdn, dns::RRClass::IN(),
680 getAddressRRType(), lease_ttl));
681 addLeaseAddressRdata(update);
682 request->addRRset(D2UpdateMessage::SECTION_UPDATE, update);
683
684 // Set the transaction's update request to the new request.
685 setDnsUpdateRequest(request);
686}
687
688 void
689 NameAddTransaction::buildReplaceRevPtrsRequest() {
690 // Construct an empty request.
691 D2UpdateMessagePtr request = prepNewRequest(getReverseDomain());
692
693 // Create the reverse IP address "FQDN".
694 std::string rev_addr = D2CfgMgr::reverseIpAddress(getNcr()->getIpAddress());
695 dns::Name rev_ip(rev_addr);
696
697 // Create the TTL based on lease length.
698 dns::RRTTL lease_ttl(getNcr()->getLeaseLength());
699
700 // Content on this request is based on RFC 4703, section 5.4
701 // Reverse replacement has no prerequisites so straight on to
702 // building the Update section.
703
704 // Create the PTR 'delete' RR and add it to update section.
705 dns::RRsetPtr update(new dns::RRset(rev_ip, dns::RRClass::ANY(),
706 dns::RRType::PTR(), dns::RRTTL(0)));
707 request->addRRset(D2UpdateMessage::SECTION_UPDATE, update);
708
709 // Create the DHCID 'delete' RR and add it to the update section.
710 update.reset(new dns::RRset(rev_ip, dns::RRClass::ANY(),
711 dns::RRType::DHCID(), dns::RRTTL(0)));
712 request->addRRset(D2UpdateMessage::SECTION_UPDATE, update);
713
714 // Create the FQDN/IP PTR 'add' RR, add the FQDN as the PTR Rdata
715 // then add it to update section.
716 update.reset(new dns::RRset(rev_ip, dns::RRClass::IN(),
717 dns::RRType::PTR(), lease_ttl));
718 addPtrRdata(update);
719 request->addRRset(D2UpdateMessage::SECTION_UPDATE, update);
720
721 // Create the FQDN/IP PTR 'add' RR, add the DHCID Rdata
722 // then add it to update section.
723 update.reset(new dns::RRset(rev_ip, dns::RRClass::IN(),
724 dns::RRType::DHCID(), lease_ttl));
725 addDhcidRdata(update);
726 request->addRRset(D2UpdateMessage::SECTION_UPDATE, update);
727
728 // Set the transaction's update request to the new request.
729 setDnsUpdateRequest(request);
730}
731
732} // namespace isc::d2
733} // namespace isc
buffer.h
isc::d2::D2CfgMgr::reverseIpAddress
static std::string reverseIpAddress(const std::string &address)
Generate a reverse order string for the given IP address.
Definition d2_cfg_mgr.cc:183
isc::d2::D2UpdateMessage::SECTION_UPDATE
@ SECTION_UPDATE
Definition d2_update_message.h:120
isc::d2::D2UpdateMessage::SECTION_PREREQUISITE
@ SECTION_PREREQUISITE
Definition d2_update_message.h:119
isc::d2::DNSClient::TIMEOUT
@ TIMEOUT
No response, timeout.
Definition dns_client.h:60
isc::d2::DNSClient::OTHER
@ OTHER
Other, unclassified error.
Definition dns_client.h:63
isc::d2::DNSClient::INVALID_RESPONSE
@ INVALID_RESPONSE
Response received but invalid.
Definition dns_client.h:62
isc::d2::DNSClient::SUCCESS
@ SUCCESS
Response received and is ok.
Definition dns_client.h:59
isc::d2::NameAddTransactionError
Thrown if the NameAddTransaction encounters a general error.
Definition nc_add.h:19
isc::d2::NameAddTransaction::processAddFailedHandler
void processAddFailedHandler()
State handler for PROCESS_TRANS_FAILED_ST.
Definition nc_add.cc:581
isc::d2::NameAddTransaction::defineEvents
virtual void defineEvents()
Adds events defined by NameAddTransaction to the event set.
Definition nc_add.cc:48
isc::d2::NameAddTransaction::ADDING_FWD_ADDRS_ST
static const int ADDING_FWD_ADDRS_ST
State that attempts to add forward address records.
Definition nc_add.h:57
isc::d2::NameAddTransaction::~NameAddTransaction
virtual ~NameAddTransaction()
Destructor.
Definition nc_add.cc:44
isc::d2::NameAddTransaction::buildReplaceFwdAddressRequest
void buildReplaceFwdAddressRequest()
Builds a DNS request to replace forward DNS entry for an FQDN.
Definition nc_add.cc:641
isc::d2::NameAddTransaction::verifyStates
virtual void verifyStates()
Validates the contents of the set of states.
Definition nc_add.cc:107
isc::d2::NameAddTransaction::FQDN_NOT_IN_USE_EVT
static const int FQDN_NOT_IN_USE_EVT
Event sent when replace attempt to fails with address not in use.
Definition nc_add.h:71
isc::d2::NameAddTransaction::replacingFwdAddrsHandler
void replacingFwdAddrsHandler()
State handler for REPLACING_FWD_ADDRS_ST.
Definition nc_add.cc:294
isc::d2::NameAddTransaction::processAddOkHandler
void processAddOkHandler()
State handler for PROCESS_TRANS_OK_ST.
Definition nc_add.cc:564
isc::d2::NameAddTransaction::REPLACING_FWD_ADDRS_ST
static const int REPLACING_FWD_ADDRS_ST
State that attempts to replace forward address records.
Definition nc_add.h:60
isc::d2::NameAddTransaction::verifyEvents
virtual void verifyEvents()
Validates the contents of the set of events.
Definition nc_add.cc:58
isc::d2::NameAddTransaction::addingFwdAddrsHandler
void addingFwdAddrsHandler()
State handler for ADD_FWD_ADDRS_ST.
Definition nc_add.cc:172
isc::d2::NameAddTransaction::selectingRevServerHandler
void selectingRevServerHandler()
State handler for SELECTING_REV_SERVER_ST.
Definition nc_add.cc:421
isc::d2::NameAddTransaction::replacingRevPtrsHandler
void replacingRevPtrsHandler()
State handler for REPLACING_REV_PTRS_ST.
Definition nc_add.cc:450
isc::d2::NameAddTransaction::readyHandler
void readyHandler()
State handler for READY_ST.
Definition nc_add.cc:124
isc::d2::NameAddTransaction::NameAddTransaction
NameAddTransaction(asiolink::IOServicePtr &io_service, dhcp_ddns::NameChangeRequestPtr &ncr, DdnsDomainPtr &forward_domain, DdnsDomainPtr &reverse_domain, D2CfgMgrPtr &cfg_mgr)
Constructor.
Definition nc_add.cc:31
isc::d2::NameAddTransaction::FQDN_IN_USE_EVT
static const int FQDN_IN_USE_EVT
Event sent when an add attempt fails with address in use.
Definition nc_add.h:68
isc::d2::NameAddTransaction::defineStates
virtual void defineStates()
Adds states defined by NameAddTransaction to the state set.
Definition nc_add.cc:76
isc::d2::NameAddTransaction::selectingFwdServerHandler
void selectingFwdServerHandler()
State handler for SELECTING_FWD_SERVER_ST.
Definition nc_add.cc:144
isc::d2::NameAddTransaction::buildReplaceRevPtrsRequest
void buildReplaceRevPtrsRequest()
Builds a DNS request to replace a reverse DNS entry for an FQDN.
Definition nc_add.cc:689
isc::d2::NameAddTransaction::buildAddFwdAddressRequest
void buildAddFwdAddressRequest()
Builds a DNS request to add an forward DNS entry for an FQDN.
Definition nc_add.cc:599
isc::d2::NameAddTransaction::REPLACING_REV_PTRS_ST
static const int REPLACING_REV_PTRS_ST
State that attempts to replace reverse PTR records.
Definition nc_add.h:63
isc::d2::NameChangeTransaction::SELECTING_FWD_SERVER_ST
static const int SELECTING_FWD_SERVER_ST
State in which forward DNS server selection is done.
Definition nc_trans.h:91
isc::d2::NameChangeTransaction::retryTransition
void retryTransition(const int fail_to_state)
Determines the state and next event based on update attempts.
Definition nc_trans.cc:287
isc::d2::NameChangeTransaction::PROCESS_TRANS_FAILED_ST
static const int PROCESS_TRANS_FAILED_ST
State which processes an unsuccessful transaction conclusion.
Definition nc_trans.h:105
isc::d2::NameChangeTransaction::READY_ST
static const int READY_ST
State from which a transaction is started.
Definition nc_trans.h:83
isc::d2::NameChangeTransaction::getDnsUpdateResponse
const D2UpdateMessagePtr & getDnsUpdateResponse() const
Fetches the most recent DNS update response packet.
Definition nc_trans.cc:554
isc::d2::NameChangeTransaction::PROCESS_TRANS_OK_ST
static const int PROCESS_TRANS_OK_ST
State which processes successful transaction conclusion.
Definition nc_trans.h:102
isc::d2::NameChangeTransaction::UPDATE_OK_EVT
static const int UPDATE_OK_EVT
Issued when the attempted update successfully completed.
Definition nc_trans.h:135
isc::d2::NameChangeTransaction::verifyStates
virtual void verifyStates()
Validates the contents of the set of states.
Definition nc_trans.cc:266
isc::d2::NameChangeTransaction::prepNewRequest
virtual D2UpdateMessagePtr prepNewRequest(DdnsDomainPtr domain)
Creates a new DNS update request based on the given domain.
Definition nc_trans.cc:344
isc::d2::NameChangeTransaction::NameChangeTransaction
NameChangeTransaction(asiolink::IOServicePtr &io_service, dhcp_ddns::NameChangeRequestPtr &ncr, DdnsDomainPtr &forward_domain, DdnsDomainPtr &reverse_domain, D2CfgMgrPtr &cfg_mgr)
Constructor.
Definition nc_trans.cc:69
isc::d2::NameChangeTransaction::UPDATE_FAILED_EVT
static const int UPDATE_FAILED_EVT
Issued when the attempted update fails to complete.
Definition nc_trans.h:141
isc::d2::NameChangeTransaction::getAddressRRType
const dns::RRType & getAddressRRType() const
Returns the DHCP data type for the lease address.
Definition nc_trans.cc:574
isc::d2::NameChangeTransaction::getNcr
const dhcp_ddns::NameChangeRequestPtr & getNcr() const
Fetches the NameChangeRequest for this transaction.
Definition nc_trans.cc:426
isc::d2::NameChangeTransaction::initServerSelection
void initServerSelection(const DdnsDomainPtr &domain)
Initializes server selection from the given DDNS domain.
Definition nc_trans.cc:456
isc::d2::NameChangeTransaction::IO_COMPLETED_EVT
static const int IO_COMPLETED_EVT
Issued when a DNS update packet exchange has completed.
Definition nc_trans.h:130
isc::d2::NameChangeTransaction::SELECT_SERVER_EVT
static const int SELECT_SERVER_EVT
Issued when a server needs to be selected.
Definition nc_trans.h:113
isc::d2::NameChangeTransaction::SERVER_IO_ERROR_EVT
static const int SERVER_IO_ERROR_EVT
Issued when an update fails due to an IO error.
Definition nc_trans.h:119
isc::d2::NameChangeTransaction::getRequestId
std::string getRequestId() const
Fetches the request id that identifies this transaction.
Definition nc_trans.cc:436
isc::d2::NameChangeTransaction::defineStates
virtual void defineStates()
Adds states defined by NameChangeTransaction to the state set.
Definition nc_trans.cc:258
isc::d2::NameChangeTransaction::addLeaseAddressRdata
void addLeaseAddressRdata(dns::RRsetPtr &rrset)
Adds an RData for the lease address to the given RRset.
Definition nc_trans.cc:367
isc::d2::NameChangeTransaction::sendUpdate
virtual void sendUpdate(const std::string &comment="")
Send the update request to the current server.
Definition nc_trans.cc:193
isc::d2::NameChangeTransaction::setForwardChangeCompleted
void setForwardChangeCompleted(const bool value)
Sets the forward change completion flag to the given value.
Definition nc_trans.cc:329
isc::d2::NameChangeTransaction::addPtrRdata
void addPtrRdata(dns::RRsetPtr &rrset)
Adds an RData for the lease FQDN to the given RRset.
Definition nc_trans.cc:409
isc::d2::NameChangeTransaction::selectNextServer
bool selectNextServer()
Selects the next server in the current server list.
Definition nc_trans.cc:468
isc::d2::NameChangeTransaction::setNcrStatus
void setNcrStatus(const dhcp_ddns::NameChangeStatus &status)
Sets the status of the transaction's NameChangeRequest.
Definition nc_trans.cc:539
isc::d2::NameChangeTransaction::getForwardDomain
DdnsDomainPtr & getForwardDomain()
Fetches the forward DdnsDomain.
Definition nc_trans.cc:446
isc::d2::NameChangeTransaction::verifyEvents
virtual void verifyEvents()
Validates the contents of the set of events.
Definition nc_trans.cc:243
isc::d2::NameChangeTransaction::addDhcidRdata
void addDhcidRdata(dns::RRsetPtr &rrset)
Adds an RData for the lease client's DHCID to the given RRset.
Definition nc_trans.cc:389
isc::d2::NameChangeTransaction::clearDnsUpdateRequest
void clearDnsUpdateRequest()
Destroys the current update request packet.
Definition nc_trans.cc:304
isc::d2::NameChangeTransaction::clearUpdateAttempts
void clearUpdateAttempts()
Resets the update attempts count.
Definition nc_trans.cc:309
isc::d2::NameChangeTransaction::SELECTING_REV_SERVER_ST
static const int SELECTING_REV_SERVER_ST
State in which reverse DNS server selection is done.
Definition nc_trans.h:99
isc::d2::NameChangeTransaction::getDnsUpdateStatus
DNSClient::Status getDnsUpdateStatus() const
Fetches the most recent DNS update status.
Definition nc_trans.cc:549
isc::d2::NameChangeTransaction::setDnsUpdateRequest
void setDnsUpdateRequest(D2UpdateMessagePtr &request)
Sets the update request packet to the given packet.
Definition nc_trans.cc:299
isc::d2::NameChangeTransaction::NO_MORE_SERVERS_EVT
static const int NO_MORE_SERVERS_EVT
Issued when there are no more servers from which to select.
Definition nc_trans.h:125
isc::d2::NameChangeTransaction::defineEvents
virtual void defineEvents()
Adds events defined by NameChangeTransaction to the event set.
Definition nc_trans.cc:228
isc::d2::NameChangeTransaction::setReverseChangeCompleted
void setReverseChangeCompleted(const bool value)
Sets the reverse change completion flag to the given value.
Definition nc_trans.cc:334
isc::d2::NameChangeTransaction::getCurrentServer
const DnsServerInfoPtr & getCurrentServer() const
Fetches the currently selected server.
Definition nc_trans.cc:534
isc::d2::NameChangeTransaction::SERVER_SELECTED_EVT
static const int SERVER_SELECTED_EVT
Issued when a server has been selected.
Definition nc_trans.h:116
isc::d2::NameChangeTransaction::getReverseDomain
DdnsDomainPtr & getReverseDomain()
Fetches the reverse DdnsDomain.
Definition nc_trans.cc:451
isc::d2::NameChangeTransaction::transactionOutcomeString
std::string transactionOutcomeString() const
Returns a string version of transaction outcome.
Definition nc_trans.cc:171
isc::dns::Name
The Name class encapsulates DNS names.
Definition name.h:219
isc::dns::RRClass::ANY
static const RRClass & ANY()
Definition rrclass.h:298
isc::dns::RRClass::NONE
static const RRClass & NONE()
Definition rrclass.h:316
isc::dns::RRClass::IN
static const RRClass & IN()
Definition rrclass.h:304
isc::dns::RRTTL
The RRTTL class encapsulates TTLs used in DNS resource records.
Definition rrttl.h:51
isc::dns::RRType::ANY
static const RRType & ANY()
Definition rrtype.h:345
isc::dns::RRType::PTR
static const RRType & PTR()
Definition rrtype.h:303
isc::dns::RRType::DHCID
static const RRType & DHCID()
Definition rrtype.h:327
isc::dns::RRset
The RRset class is a concrete derived class of BasicRRset which contains a pointer to an additional R...
Definition rrset.h:844
isc::dns::Rcode
DNS Response Codes (RCODEs) class.
Definition rcode.h:40
isc::dns::Rcode::NOERROR
static const Rcode & NOERROR()
A constant object for the NOERROR Rcode (see Rcode::NOERROR_CODE).
Definition rcode.h:228
isc::dns::Rcode::NXDOMAIN
static const Rcode & NXDOMAIN()
A constant object for the NXDOMAIN Rcode (see Rcode::NXDOMAIN_CODE).
Definition rcode.h:246
isc::dns::Rcode::getCode
uint16_t getCode() const
Returns the Rcode code value.
Definition rcode.h:106
isc::dns::Rcode::YXDOMAIN
static const Rcode & YXDOMAIN()
A constant object for the YXDOMAIN Rcode (see Rcode::YXDOMAIN_CODE).
Definition rcode.h:264
isc::util::StateModel::getEvent
const EventPtr & getEvent(unsigned int value)
Fetches the event referred to by value.
Definition state_model.cc:186
isc::util::StateModel::endModel
void endModel()
Conducts a normal transition to the end of the model.
Definition state_model.cc:271
isc::util::StateModel::defineState
void defineState(unsigned int value, const std::string &label, StateHandler handler, const StatePausing &state_pausing=STATE_PAUSE_NEVER)
Adds an state value and associated label to the set of states.
Definition state_model.cc:196
isc::util::StateModel::getNextEvent
unsigned int getNextEvent() const
Fetches the model's next event.
Definition state_model.cc:373
isc::util::StateModel::defineEvent
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
isc::util::StateModel::transition
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
isc::util::StateModel::doOnEntry
bool doOnEntry()
Checks if on entry flag is true.
Definition state_model.cc:339
isc::util::StateModel::START_EVT
static const int START_EVT
Event issued to start the model execution.
Definition state_model.h:295
isc::util::StateModel::getStateInternal
const StatePtr getStateInternal(unsigned int value)
Fetches the state referred to by value.
Definition state_model.cc:219
isc::util::StateModel::getContextStr
std::string getContextStr() const
Convenience method which returns a string rendition of the current state and next event.
Definition state_model.cc:443
d2_cfg_mgr.h
d2_log.h
isc_throw
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
Definition exceptions/exceptions.h:210
LOG_ERROR
#define LOG_ERROR(LOGGER, MESSAGE)
Macro to conveniently test error output and log it.
Definition macros.h:32
LOG_INFO
#define LOG_INFO(LOGGER, MESSAGE)
Macro to conveniently test info output and log it.
Definition macros.h:20
isc::asiolink::IOServicePtr
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
Definition io_service.h:28
isc::d2
Definition check_exists_add.cc:19
isc::d2::D2UpdateMessagePtr
boost::shared_ptr< D2UpdateMessage > D2UpdateMessagePtr
Pointer to the DNS Update Message.
Definition d2_update_message.h:73
isc::d2::DHCP_DDNS_FORWARD_ADD_BUILD_FAILURE
const isc::log::MessageID DHCP_DDNS_FORWARD_ADD_BUILD_FAILURE
Definition d2_messages.h:22
isc::d2::DHCP_DDNS_FORWARD_REPLACE_RESP_CORRUPT
const isc::log::MessageID DHCP_DDNS_FORWARD_REPLACE_RESP_CORRUPT
Definition d2_messages.h:43
isc::d2::DdnsDomainPtr
boost::shared_ptr< DdnsDomain > DdnsDomainPtr
Defines a pointer for DdnsDomain instances.
Definition d2_config.h:624
isc::d2::DHCP_DDNS_FORWARD_ADD_REJECTED
const isc::log::MessageID DHCP_DDNS_FORWARD_ADD_REJECTED
Definition d2_messages.h:24
isc::d2::DHCP_DDNS_REVERSE_REPLACE_RESP_CORRUPT
const isc::log::MessageID DHCP_DDNS_REVERSE_REPLACE_RESP_CORRUPT
Definition d2_messages.h:80
isc::d2::D2CfgMgrPtr
boost::shared_ptr< D2CfgMgr > D2CfgMgrPtr
Defines a shared pointer to D2CfgMgr.
Definition d2_cfg_mgr.h:367
isc::d2::DHCP_DDNS_FORWARD_REPLACE_REJECTED
const isc::log::MessageID DHCP_DDNS_FORWARD_REPLACE_REJECTED
Definition d2_messages.h:42
isc::d2::DHCP_DDNS_ADD_SUCCEEDED
const isc::log::MessageID DHCP_DDNS_ADD_SUCCEEDED
Definition d2_messages.h:12
isc::d2::DHCP_DDNS_FORWARD_ADD_IO_ERROR
const isc::log::MessageID DHCP_DDNS_FORWARD_ADD_IO_ERROR
Definition d2_messages.h:23
isc::d2::DHCP_DDNS_REVERSE_REPLACE_TIMEOUT
const isc::log::MessageID DHCP_DDNS_REVERSE_REPLACE_TIMEOUT
Definition d2_messages.h:81
isc::d2::DHCP_DDNS_ADD_FAILED
const isc::log::MessageID DHCP_DDNS_ADD_FAILED
Definition d2_messages.h:11
isc::d2::DHCP_DDNS_FORWARD_REPLACE_BAD_DNSCLIENT_STATUS
const isc::log::MessageID DHCP_DDNS_FORWARD_REPLACE_BAD_DNSCLIENT_STATUS
Definition d2_messages.h:39
isc::d2::d2_to_dns_logger
isc::log::Logger d2_to_dns_logger("d2-to-dns")
Definition d2_log.h:20
isc::d2::DHCP_DDNS_FORWARD_ADD_TIMEOUT
const isc::log::MessageID DHCP_DDNS_FORWARD_ADD_TIMEOUT
Definition d2_messages.h:26
isc::d2::DHCP_DDNS_REVERSE_REPLACE_REJECTED
const isc::log::MessageID DHCP_DDNS_REVERSE_REPLACE_REJECTED
Definition d2_messages.h:79
isc::d2::DHCP_DDNS_REVERSE_REPLACE_BUILD_FAILURE
const isc::log::MessageID DHCP_DDNS_REVERSE_REPLACE_BUILD_FAILURE
Definition d2_messages.h:77
isc::d2::DHCP_DDNS_FORWARD_REPLACE_BUILD_FAILURE
const isc::log::MessageID DHCP_DDNS_FORWARD_REPLACE_BUILD_FAILURE
Definition d2_messages.h:40
isc::d2::DHCP_DDNS_FORWARD_ADD_BAD_DNSCLIENT_STATUS
const isc::log::MessageID DHCP_DDNS_FORWARD_ADD_BAD_DNSCLIENT_STATUS
Definition d2_messages.h:21
isc::d2::DHCP_DDNS_FORWARD_REPLACE_TIMEOUT
const isc::log::MessageID DHCP_DDNS_FORWARD_REPLACE_TIMEOUT
Definition d2_messages.h:44
isc::d2::DHCP_DDNS_REVERSE_REPLACE_BAD_DNSCLIENT_STATUS
const isc::log::MessageID DHCP_DDNS_REVERSE_REPLACE_BAD_DNSCLIENT_STATUS
Definition d2_messages.h:76
isc::d2::DHCP_DDNS_REVERSE_REPLACE_IO_ERROR
const isc::log::MessageID DHCP_DDNS_REVERSE_REPLACE_IO_ERROR
Definition d2_messages.h:78
isc::d2::DHCP_DDNS_FORWARD_REPLACE_IO_ERROR
const isc::log::MessageID DHCP_DDNS_FORWARD_REPLACE_IO_ERROR
Definition d2_messages.h:41
isc::d2::DHCP_DDNS_FORWARD_ADD_RESP_CORRUPT
const isc::log::MessageID DHCP_DDNS_FORWARD_ADD_RESP_CORRUPT
Definition d2_messages.h:25
isc::dhcp_ddns::ST_COMPLETED
@ ST_COMPLETED
Definition ncr_msg.h:54
isc::dhcp_ddns::ST_FAILED
@ ST_FAILED
Definition ncr_msg.h:55
isc::dhcp_ddns::NameChangeRequestPtr
boost::shared_ptr< NameChangeRequest > NameChangeRequestPtr
Defines a pointer to a NameChangeRequest.
Definition ncr_msg.h:241
isc::dhcp_ddns::CHG_ADD
@ CHG_ADD
Definition ncr_msg.h:46
isc::dns::RRsetPtr
boost::shared_ptr< AbstractRRset > RRsetPtr
A pointer-like type pointing to an RRset object.
Definition rrset.h:50
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148
nc_add.h
This file defines the class NameAddTransaction.
rdataclass.h