Kea 2.5.8
option6_dnr.h
Go to the documentation of this file.
1// Copyright (C) 2023-2024 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 OPTION6_DNR_H
8#define OPTION6_DNR_H
9
10#include <dhcp/option4_dnr.h>
11
12namespace isc {
13namespace dhcp {
14
26class Option6Dnr : public Option, public DnrInstance {
27public:
45 bool convenient_notation = false);
46
50 OptionPtr clone() const override;
51
63 void pack(util::OutputBuffer& buf, bool check = false) const override;
64
73 void unpack(OptionBufferConstIter begin, OptionBufferConstIter end) override;
74
80 std::string toText(int indent = 0) const override;
81
86 uint16_t len() const override;
87
96 void packAddresses(isc::util::OutputBuffer& buf) const override;
97
109
110private:
113 bool convenient_notation_;
114};
115
117typedef boost::shared_ptr<Option6Dnr> Option6DnrPtr;
118
119} // namespace dhcp
120} // namespace isc
121
122#endif // OPTION6_DNR_H
Represents DNR Instance which is used both in DHCPv4 and DHCPv6 Encrypted DNS Option.
Definition: option4_dnr.h:55
Represents DHCPv6 Encrypted DNS Option (code 144).
Definition: option6_dnr.h:26
uint16_t len() const override
Returns length of the complete option (data length + DHCPv4/DHCPv6 option header)
Definition: option6_dnr.cc:103
void packAddresses(isc::util::OutputBuffer &buf) const override
Writes the IP address(es) in the wire format into a buffer.
Definition: option6_dnr.cc:47
void unpackAddresses(OptionBufferConstIter &begin, OptionBufferConstIter end) override
Unpacks IP address(es) from wire data and stores it/them in ip_addresses_.
Definition: option6_dnr.cc:108
std::string toText(int indent=0) const override
Returns string representation of the option.
Definition: option6_dnr.cc:94
void unpack(OptionBufferConstIter begin, OptionBufferConstIter end) override
Parses received wire data buffer.
Definition: option6_dnr.cc:59
void pack(util::OutputBuffer &buf, bool check=false) const override
Writes option in wire-format to a buffer.
Definition: option6_dnr.cc:31
OptionPtr clone() const override
Copies this option and returns a pointer to the copy.
Definition: option6_dnr.cc:26
void check() const
A protected method used for option correctness.
Definition: option.cc:90
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
Definition: buffer.h:343
OptionBuffer::const_iterator OptionBufferConstIter
const_iterator for walking over OptionBuffer
Definition: option.h:30
boost::shared_ptr< Option6Dnr > Option6DnrPtr
A pointer to the Option6Dnr object.
Definition: option6_dnr.h:117
boost::shared_ptr< Option > OptionPtr
Definition: option.h:37
Defines the logger used by the top-level component of kea-lfc.