ncr_generator.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright (C) 2015 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. #ifndef NCR_GENERATOR_H
  7. #define NCR_GENERATOR_H
  8. #include <dhcp_ddns/ncr_msg.h>
  9. #include <dhcpsrv/lease.h>
  10. namespace isc {
  11. namespace dhcp {
  12. /// @brief Creates name change request from the DHCPv4 lease.
  13. ///
  14. /// This function creates name change request from the information contained
  15. /// in the DHCPv4 lease. If the client identifier is present in the lease,
  16. /// this identifier is used to compute the DHCID, otherwise the HW address
  17. /// is used.
  18. ///
  19. /// This function is exception safe. On failure, it logs an error.
  20. ///
  21. /// @param chg_type Type of the name change request
  22. /// @param lease Pointer to the lease.
  23. void queueNCR(const dhcp_ddns::NameChangeType& chg_type, const Lease4Ptr& lease);
  24. /// @brief Creates name change request from the DHCPv6 lease.
  25. ///
  26. /// This function creates name change request from the information contained
  27. /// in the DHCPv6 lease. The DUID is used to compute the DHCID for the name
  28. /// change request.
  29. ///
  30. /// This function will skip sending the NCR if the lease type is a delegated
  31. /// prefix.
  32. ///
  33. /// This function is exception safe. On failure, it logs an error.
  34. ///
  35. /// @param chg_type Type of the name change request
  36. /// @param lease Pointer to the lease.
  37. void queueNCR(const dhcp_ddns::NameChangeType& chg_type, const Lease6Ptr& lease);
  38. } // end of isc::dhcp namespace
  39. } // end of isc namespace
  40. #endif // NCR_GENERATOR_H