 |
Kea
1.5.0
|
Go to the documentation of this file.
36 template<
typename LeasePtrType,
typename IdentifierType>
37 void queueNCRCommon(
const NameChangeType& chg_type,
const LeasePtrType& lease,
38 const IdentifierType& identifier,
const std::string& label) {
41 if (lease->hostname_.empty() || (!lease->fqdn_fwd_ && !lease->fqdn_rev_)
44 DHCPSRV_QUEUE_NCR_SKIP)
46 .arg(lease->addr_.toText());
53 std::vector<uint8_t> hostname_wire;
60 lease->hostname_, lease->addr_.toText(),
61 dhcid, lease->cltt_ + lease->valid_lft_,
66 .arg(chg_type ==
CHG_ADD ?
"add" :
"remove")
72 }
catch (
const std::exception& ex) {
75 .arg(chg_type ==
CHG_ADD ?
"add" :
"remove")
76 .arg(lease->addr_.toText())
89 if (lease->client_id_) {
90 queueNCRCommon(chg_type, lease, lease->client_id_->getClientId(),
96 queueNCRCommon(chg_type, lease, lease->hwaddr_,
105 queueNCRCommon(chg_type, lease, *(lease->duid_),
#define LOG_ERROR(LOGGER, MESSAGE)
Macro to conveniently test error output and log it.
static CfgMgr & instance()
returns a single instance of Configuration Manager
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
boost::shared_ptr< Lease6 > Lease6Ptr
Pointer to a Lease6 structure.
const int DHCPSRV_DBG_TRACE_DETAIL
Additional information.
static std::string makeLabel(const HWAddrPtr &hwaddr, const ClientIdPtr &client_id, const uint32_t transid)
Returns text representation of the given packet identifiers.
boost::shared_ptr< NameChangeRequest > NameChangeRequestPtr
Defines a pointer to a NameChangeRequest.
Container class for handling the DHCID value within a NameChangeRequest.
static std::string makeLabel(const DuidPtr duid, const uint32_t transid, const HWAddrPtr &hwaddr)
Returns text representation of the given packet identifiers.
NameChangeType
Defines the types of DNS updates that can be requested.
bool ddnsEnabled()
Convenience method for checking if DHCP-DDNS is enabled.
static void writeFqdn(const std::string &fqdn, std::vector< uint8_t > &buf, const bool downcase=false)
Append FQDN into a buffer.
Defines the logger used by the top-level component of kea-dhcp-ddns.
#define LOG_DEBUG(LOGGER, LEVEL, MESSAGE)
Macro to conveniently test debug output and log it.
@ TYPE_PD
the lease contains IPv6 prefix (for prefix delegation)
void sendRequest(dhcp_ddns::NameChangeRequestPtr &ncr)
Send the given NameChangeRequests to kea-dhcp-ddns.
Represents a DHCP-DDNS client request.
D2ClientMgr & getD2ClientMgr()
Fetches the DHCP-DDNS manager.
const int DHCPSRV_DBG_TRACE_DETAIL_DATA
Additional information.
void queueNCR(const NameChangeType &chg_type, const Lease4Ptr &lease)
Creates name change request from the DHCPv4 lease.
isc::log::Logger dhcpsrv_logger("dhcpsrv")
DHCP server library Logger.