libkea_dhcp___la_SOURCES += option_custom.cc option_custom.h
libkea_dhcp___la_SOURCES += option_data_types.cc option_data_types.h
libkea_dhcp___la_SOURCES += option_definition.cc option_definition.h
+libkea_dhcp___la_SOURCES += option_dnr.cc option_dnr.h
libkea_dhcp___la_SOURCES += option_int.h
libkea_dhcp___la_SOURCES += option_int_array.h
libkea_dhcp___la_SOURCES += option_opaque_data_tuples.cc option_opaque_data_tuples.h
--- /dev/null
+// Copyright (C) 2018-2023 Internet Systems Consortium, Inc. ("ISC")
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#include <config.h>
+
+#include <dhcp/option_dnr.h>
+
+namespace isc {
+namespace dhcp {
+
+OptionDNR6::OptionDNR6(const uint16_t type) : Option(Universe::V6, type) {
+}
+
+OptionDNR6::OptionDNR6(const uint16_t type,
+ OptionBufferConstIter begin,
+ OptionBufferConstIter end) : Option(Universe::V6, type) {
+ unpack(begin, end);
+}
+
+OptionPtr
+OptionDNR6::clone() const {
+ return Option::clone();
+}
+
+void
+OptionDNR6::pack(util::OutputBuffer& buf, bool check) const {
+ Option::pack(buf, check);
+}
+
+void
+OptionDNR6::unpack(OptionBufferConstIter begin, OptionBufferConstIter end) {
+ Option::unpack(begin, end);
+}
+
+std::string
+OptionDNR6::toText(int indent) const {
+ return Option::toText(indent);
+}
+
+uint16_t
+OptionDNR6::len() const {
+ return Option::len();
+}
+
+OptionDNR4::OptionDNR4(const uint16_t type) : Option(V4, type) {
+}
+
+OptionDNR4::OptionDNR4(const uint16_t type,
+ OptionBufferConstIter begin,
+ OptionBufferConstIter end) : Option(V4, type) {
+ unpack(begin, end);
+}
+
+OptionPtr
+OptionDNR4::clone() const {
+ return Option::clone();
+}
+
+void
+OptionDNR4::pack(util::OutputBuffer& buf, bool check) const {
+ Option::pack(buf, check);
+}
+
+void
+OptionDNR4::unpack(OptionBufferConstIter begin, OptionBufferConstIter end) {
+ Option::unpack(begin, end);
+}
+
+std::string
+OptionDNR4::toText(int indent) const {
+ return Option::toText(indent);
+}
+
+uint16_t
+OptionDNR4::len() const {
+ return Option::len();
+}
+
+} // namespace dhcp
+} // namespace isc
--- /dev/null
+// Copyright (C) 2018-2023 Internet Systems Consortium, Inc. ("ISC")
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this
+// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef OPTION_DNR_H
+#define OPTION_DNR_H
+
+#include <dhcp/option.h>
+
+namespace isc {
+namespace dhcp {
+
+class OptionDNR6 : public Option {
+ OptionDNR6(const uint16_t type);
+
+ OptionDNR6(const uint16_t type, OptionBufferConstIter begin, OptionBufferConstIter end);
+
+public:
+ virtual OptionPtr clone() const;
+ virtual void pack(util::OutputBuffer& buf, bool check) const;
+ virtual void unpack(OptionBufferConstIter begin, OptionBufferConstIter end);
+ virtual std::string toText(int indent) const;
+ virtual uint16_t len() const;
+};
+
+class OptionDNR4 : public Option {
+ OptionDNR4(const uint16_t type);
+
+ OptionDNR4(const uint16_t type, OptionBufferConstIter begin, OptionBufferConstIter end);
+
+public:
+ virtual OptionPtr clone() const;
+ virtual void pack(util::OutputBuffer& buf, bool check) const;
+ virtual void unpack(OptionBufferConstIter begin, OptionBufferConstIter end);
+ virtual std::string toText(int indent) const;
+ virtual uint16_t len() const;
+};
+
+} // namespace dhcp
+} // namespace isc
+
+#endif // OPTION_DNR_H
//
// DNR Instance Data Length (2 octets), Service Priority (2 octets), ADN Length (1 octet),
// authentication-domain-name FQDN(s), Addr Length (1 octet), IPv4 address(es), SvcParams
-RECORD_DECL(V4_DNR_RECORDS, OPT_UINT16_TYPE, OPT_UINT16_TYPE, OPT_UINT8_TYPE, OPT_FQDN_TYPE,
- OPT_UINT8_TYPE, OPT_IPV4_ADDRESS_TYPE, OPT_BINARY_TYPE);
+//RECORD_DECL(V4_DNR_RECORDS, OPT_UINT16_TYPE, OPT_UINT16_TYPE, OPT_UINT8_TYPE, OPT_FQDN_TYPE,
+// OPT_UINT8_TYPE, OPT_IPV4_ADDRESS_TYPE, OPT_BINARY_TYPE);
/// @brief Definitions of standard DHCPv4 options.
const OptionDefParams STANDARD_V4_OPTION_DEFINITIONS[] = {
OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
{ "v4-portparams", DHO_V4_PORTPARAMS, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE,
false, RECORD_DEF(V4_PORTPARAMS_RECORDS), "" },
- { "v4-dnr", DHO_V4_DNR, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE,
- true, RECORD_DEF(V4_DNR_RECORDS), "" },
+ { "v4-dnr", DHO_V4_DNR, DHCP4_OPTION_SPACE, OPT_TUPLE_TYPE,
+ true, NO_RECORD_DEF, "" },
{ "option-6rd", DHO_6RD, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE, true,
RECORD_DEF(OPT_6RD_RECORDS), "" },
{ "v4-access-domain", DHO_V4_ACCESS_DOMAIN, DHCP4_OPTION_SPACE,