Kea 2.7.6
ncr_generator.h
Go to the documentation of this file.
1// Copyright (C) 2015-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 NCR_GENERATOR_H
8#define NCR_GENERATOR_H
9
10#include <dhcp_ddns/ncr_msg.h>
11#include <dhcpsrv/lease.h>
12#include <util/optional.h>
13
14namespace isc {
15namespace dhcp {
16
28void queueNCR(const dhcp_ddns::NameChangeType& chg_type, const Lease4Ptr& lease);
29
43void queueNCR(const dhcp_ddns::NameChangeType& chg_type, const Lease6Ptr& lease);
44
67uint32_t calculateDdnsTtl(uint32_t lease_life_time,
68 const util::Optional<double>& ddns_ttl_percent
69 = util::Optional<double>(),
70 const util::Optional<uint32_t>& ddns_ttl
71 = util::Optional<uint32_t>(),
72 const util::Optional<uint32_t>& ddns_ttl_min
73 = util::Optional<uint32_t>(),
74 const util::Optional<uint32_t>& ddns_ttl_max
75 = util::Optional<uint32_t>());
76
77} // end of isc::dhcp namespace
78} // end of isc namespace
79
80#endif // NCR_GENERATOR_H
NameChangeType
Defines the types of DNS updates that can be requested.
Definition ncr_msg.h:45
uint32_t calculateDdnsTtl(uint32_t lease_lft, const util::Optional< double > &ddns_ttl_percent, const util::Optional< uint32_t > &ddns_ttl, const util::Optional< uint32_t > &ddns_ttl_min, const util::Optional< uint32_t > &ddns_ttl_max)
Calculates TTL for a DNS resource record based on lease life time.
void queueNCR(const NameChangeType &chg_type, const Lease4Ptr &lease)
Creates name change request from the DHCPv4 lease.
boost::shared_ptr< Lease6 > Lease6Ptr
Pointer to a Lease6 structure.
Definition lease.h:508
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
Definition lease.h:295
Defines the logger used by the top-level component of kea-lfc.
This file provides the classes needed to embody, compose, and decompose DNS update requests that are ...