Kea: option6_client_fqdn.cc Source File

| Kea 3.2.0-git

option6_client_fqdn.cc
Go to the documentation of this file.
1// Copyright (C) 2013-2026 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#include <config.h>
8
9#include <dhcp/dhcp6.h>
10#include <dhcp/option6_client_fqdn.h>
11#include <dns/labelsequence.h>
12#include <util/buffer.h>
13#include <util/str.h>
14#include <sstream>
15
16namespace isc {
17namespace dhcp {
18
29 class Option6ClientFqdnImpl {
30public:
32 uint8_t flags_;
34 boost::shared_ptr<isc::dns::Name> domain_name_;
36 Option6ClientFqdn::DomainNameType domain_name_type_;
37
45 Option6ClientFqdnImpl(const uint8_t flags,
46 const std::string& domain_name,
47 const Option6ClientFqdn::DomainNameType name_type);
48
55 Option6ClientFqdnImpl(OptionBufferConstIter first,
56 OptionBufferConstIter last);
57
61 Option6ClientFqdnImpl(const Option6ClientFqdnImpl& source);
62
66 Option6ClientFqdnImpl& operator=(const Option6ClientFqdnImpl& source);
67
73 void setDomainName(const std::string& domain_name,
74 const Option6ClientFqdn::DomainNameType name_type);
75
87 static void checkFlags(const uint8_t flags, const bool check_mbz);
88
95 void parseWireData(OptionBufferConstIter first,
96 OptionBufferConstIter last);
97
98};
99
100Option6ClientFqdnImpl::
101 Option6ClientFqdnImpl(const uint8_t flags,
102 const std::string& domain_name,
103 // cppcheck 1.57 complains that const enum value is not
104 // passed by reference. Note that it accepts the non-const
105 // enum to be passed by value. In both cases it is
106 // unnecessary to pass the enum by reference.
107 // cppcheck-suppress passedByValue
108 const Option6ClientFqdn::DomainNameType name_type)
109 : flags_(flags),
110 domain_name_(),
111 domain_name_type_(name_type) {
112
113 // Check if flags are correct. Also check if MBZ bits are set.
114 checkFlags(flags_, true);
115 // Set domain name. It may throw an exception if domain name has wrong
116 // format.
117 setDomainName(domain_name, name_type);
118}
119
120 Option6ClientFqdnImpl::Option6ClientFqdnImpl(OptionBufferConstIter first,
121 OptionBufferConstIter last) {
122 parseWireData(first, last);
123 // Verify that flags value was correct. Do not check if MBZ bits are
124 // set because we should ignore those bits in received message.
125 try {
126 checkFlags(flags_, false);
127 } catch (const InvalidOption6FqdnFlags& ex) {
128 if (Option::lenient_parsing_) {
129 flags_ &= ~Option6ClientFqdn::FLAG_N;
130 } else {
131 throw;
132 }
133 }
134}
135
136 Option6ClientFqdnImpl::
137 Option6ClientFqdnImpl(const Option6ClientFqdnImpl& source)
138 : flags_(source.flags_),
139 domain_name_(),
140 domain_name_type_(source.domain_name_type_) {
141 if (source.domain_name_) {
142 domain_name_.reset(new isc::dns::Name(*source.domain_name_));
143 }
144}
145
146 Option6ClientFqdnImpl&
147// This assignment operator handles assignment to self, it copies all
148// required values.
149// cppcheck-suppress operatorEqToSelf
150Option6ClientFqdnImpl::operator=(const Option6ClientFqdnImpl& source) {
151 if (source.domain_name_) {
152 domain_name_.reset(new isc::dns::Name(*source.domain_name_));
153
154 } else {
155 domain_name_.reset();
156
157 }
158
159 // This assignment should be exception safe.
160 flags_ = source.flags_;
161 domain_name_type_ = source.domain_name_type_;
162
163 return (*this);
164}
165
166void
167Option6ClientFqdnImpl::
168 setDomainName(const std::string& domain_name,
169 // cppcheck 1.57 complains that const enum value is not
170 // passed by reference. Note that it accepts the non-const
171 // enum to be passed by value. In both cases it is
172 // unnecessary to pass the enum by reference.
173 // cppcheck-suppress passedByValue
174 const Option6ClientFqdn::DomainNameType name_type) {
175 // domain-name must be trimmed. Otherwise, string comprising spaces only
176 // would be treated as a fully qualified name.
177 std::string name = isc::util::str::trim(domain_name);
178 if (name.empty()) {
179 if (name_type == Option6ClientFqdn::FULL) {
180 isc_throw(InvalidOption6FqdnDomainName,
181 "fully qualified domain-name must not be empty"
182 << " when setting new domain-name for DHCPv6 Client"
183 << " FQDN Option");
184 }
185 // The special case when domain-name is empty is marked by setting the
186 // pointer to the domain-name object to NULL.
187 domain_name_.reset();
188
189 } else {
190 try {
191 domain_name_.reset(new isc::dns::Name(name, true));
192
193 } catch (const Exception&) {
194 isc_throw(InvalidOption6FqdnDomainName, "invalid domain-name value '"
195 << domain_name << "' when setting new domain-name for"
196 << " DHCPv6 Client FQDN Option");
197
198 }
199 }
200
201 domain_name_type_ = name_type;
202}
203
204void
205Option6ClientFqdnImpl::checkFlags(const uint8_t flags, const bool check_mbz) {
206 // The Must Be Zero (MBZ) bits must not be set.
207 if (check_mbz && ((flags & ~Option6ClientFqdn::FLAG_MASK) != 0)) {
208 isc_throw(InvalidOption6FqdnFlags,
209 "invalid DHCPv6 Client FQDN Option flags: 0x"
210 << std::hex << static_cast<int>(flags) << std::dec);
211 }
212
213 // According to RFC 4704, section 4.1. if the N bit is 1, the S bit
214 // MUST be 0. Checking it here.
215 if ((flags & (Option6ClientFqdn::FLAG_N | Option6ClientFqdn::FLAG_S))
216 == (Option6ClientFqdn::FLAG_N | Option6ClientFqdn::FLAG_S)) {
217 isc_throw(InvalidOption6FqdnFlags,
218 "both N and S flag of the DHCPv6 Client FQDN Option are set."
219 << " According to RFC 4704, if the N bit is 1 the S bit"
220 << " MUST be 0");
221 }
222}
223
224void
225Option6ClientFqdnImpl::parseWireData(OptionBufferConstIter first,
226 OptionBufferConstIter last) {
227
228 // Buffer must comprise at least one byte with the flags.
229 // The domain-name may be empty.
230 if (std::distance(first, last) < Option6ClientFqdn::FLAG_FIELD_LEN) {
231 isc_throw(OutOfRange, "DHCPv6 Client FQDN Option ("
232 << D6O_CLIENT_FQDN << ") is truncated. Minimal option"
233 << " size is " << Option6ClientFqdn::FLAG_FIELD_LEN
234 << ", got option with size " << std::distance(first, last));
235 }
236
237 // Parse flags
238 flags_ = *(first++);
239
240 // Parse domain-name if any.
241 if (std::distance(first, last) > 0) {
242 // The FQDN may comprise a partial domain-name. In this case it lacks
243 // terminating 0. If this is the case, we will need to add zero at
244 // the end because Name object constructor requires it.
245 if (*(last - 1) != 0) {
246 // Create temporary buffer and add terminating zero.
247 OptionBuffer buf(first, last);
248 buf.push_back(0);
249 // Reset domain name.
250 isc::util::InputBuffer name_buf(&buf[0], buf.size());
251 try {
252 domain_name_.reset(new isc::dns::Name(name_buf, true));
253 } catch (const Exception&) {
254 if (Option::lenient_parsing_) {
255 isc_throw(SkipThisOptionError, "failed to parse "
256 "partial domain-name from wire format");
257 } else {
258 isc_throw(InvalidOption6FqdnDomainName, "failed to parse "
259 "partial domain-name from wire format");
260 }
261 }
262 // Terminating zero was missing, so set the domain-name type
263 // to partial.
264 domain_name_type_ = Option6ClientFqdn::PARTIAL;
265 } else {
266 // We are dealing with fully qualified domain name so there is
267 // no need to add terminating zero. Simply pass the buffer to
268 // Name object constructor.
269 isc::util::InputBuffer name_buf(&(*first),
270 std::distance(first, last));
271 try {
272 domain_name_.reset(new isc::dns::Name(name_buf, true));
273 } catch (const Exception&) {
274 if (Option::lenient_parsing_) {
275 isc_throw(SkipThisOptionError, "failed to parse "
276 "fully qualified domain-name from wire format");
277 } else {
278 isc_throw(InvalidOption6FqdnDomainName, "failed to parse "
279 "fully qualified domain-name from wire format");
280 }
281 }
282 // Set the domain-type to fully qualified domain name.
283 domain_name_type_ = Option6ClientFqdn::FULL;
284 }
285 }
286}
287
288 Option6ClientFqdn::Option6ClientFqdn(const uint8_t flag)
289 : Option(Option::V6, D6O_CLIENT_FQDN),
290 impl_(new Option6ClientFqdnImpl(flag, "", PARTIAL)) {
291}
292
293Option6ClientFqdn::Option6ClientFqdn(const uint8_t flag,
294 const std::string& domain_name,
295 const DomainNameType domain_name_type)
296 : Option(Option::V6, D6O_CLIENT_FQDN),
297 impl_(new Option6ClientFqdnImpl(flag, domain_name, domain_name_type)) {
298}
299
300 Option6ClientFqdn::Option6ClientFqdn(OptionBufferConstIter first,
301 OptionBufferConstIter last)
302 : Option(Option::V6, D6O_CLIENT_FQDN, first, last),
303 impl_(new Option6ClientFqdnImpl(first, last)) {
304}
305
306Option6ClientFqdn::~Option6ClientFqdn() {
307 delete(impl_);
308}
309
310 Option6ClientFqdn::Option6ClientFqdn(const Option6ClientFqdn& source)
311 : Option(source),
312 impl_(new Option6ClientFqdnImpl(*source.impl_)) {
313}
314
315 OptionPtr
316Option6ClientFqdn::clone() const {
317 return (cloneInternal<Option6ClientFqdn>());
318}
319
320 Option6ClientFqdn&
321// This assignment operator handles assignment to self, it uses copy
322// constructor of Option6ClientFqdnImpl to copy all required values.
323// cppcheck-suppress operatorEqToSelf
324Option6ClientFqdn::operator=(const Option6ClientFqdn& source) {
325 Option::operator=(source);
326 Option6ClientFqdnImpl* old_impl = impl_;
327 impl_ = new Option6ClientFqdnImpl(*source.impl_);
328 delete(old_impl);
329 return (*this);
330}
331
332bool
333Option6ClientFqdn::getFlag(const uint8_t flag) const {
334 // Caller should query for one of the: N, S or O flags. Any other
335 // value is invalid.
336 if (flag != FLAG_S && flag != FLAG_O && flag != FLAG_N) {
337 isc_throw(InvalidOption6FqdnFlags, "invalid DHCPv6 Client FQDN"
338 << " Option flag specified, expected N, S or O");
339 }
340
341 return ((impl_->flags_ & flag) != 0);
342}
343
344void
345Option6ClientFqdn::setFlag(const uint8_t flag, const bool set_flag) {
346 // Check that flag is in range between 0x1 and 0x7. Note that this
347 // allows to set or clear multiple flags concurrently. Setting
348 // concurrent bits is discouraged (see header file) but it is not
349 // checked here so it will work.
350 if (((flag & ~FLAG_MASK) != 0) || (flag == 0)) {
351 isc_throw(InvalidOption6FqdnFlags, "invalid DHCPv6 Client FQDN"
352 << " Option flag 0x" << std::hex
353 << static_cast<int>(flag) << std::dec
354 << " is being set. Expected: N, S or O");
355 }
356
357 // Copy the current flags into local variable. That way we will be able
358 // to test new flags settings before applying them.
359 uint8_t new_flag = impl_->flags_;
360 if (set_flag) {
361 new_flag |= flag;
362 } else {
363 new_flag &= ~flag;
364 }
365
366 // Check new flags. If they are valid, apply them.
367 Option6ClientFqdnImpl::checkFlags(new_flag, true);
368 impl_->flags_ = new_flag;
369}
370
371void
372Option6ClientFqdn::resetFlags() {
373 impl_->flags_ = 0;
374}
375
376std::string
377Option6ClientFqdn::getDomainName() const {
378 if (impl_->domain_name_) {
379 return (impl_->domain_name_->toText(impl_->domain_name_type_ ==
380 PARTIAL));
381 }
382 // If an object holding domain-name is NULL it means that the domain-name
383 // is empty.
384 return ("");
385}
386
387void
388Option6ClientFqdn::packDomainName(isc::util::OutputBuffer& buf) const {
389 // There is nothing to do if domain-name is empty.
390 if (!impl_->domain_name_) {
391 return;
392 }
393
394 // Domain name, encoded as a set of labels.
395 isc::dns::LabelSequence labels(*impl_->domain_name_);
396 if (labels.getDataLength() > 0) {
397 size_t read_len = 0;
398 const uint8_t* data = labels.getData(&read_len);
399 if (impl_->domain_name_type_ == PARTIAL) {
400 --read_len;
401 }
402 buf.writeData(data, read_len);
403 }
404}
405
406void
407Option6ClientFqdn::setDomainName(const std::string& domain_name,
408 const DomainNameType domain_name_type) {
409 impl_->setDomainName(domain_name, domain_name_type);
410}
411
412void
413Option6ClientFqdn::resetDomainName() {
414 setDomainName("", PARTIAL);
415}
416
417 Option6ClientFqdn::DomainNameType
418Option6ClientFqdn::getDomainNameType() const {
419 return (impl_->domain_name_type_);
420}
421
422void
423Option6ClientFqdn::pack(isc::util::OutputBuffer& buf, bool) const {
424 // Header = option code and length.
425 packHeader(buf);
426 // Flags field.
427 buf.writeUint8(impl_->flags_);
428 // Domain name.
429 packDomainName(buf);
430}
431
432void
433Option6ClientFqdn::unpack(OptionBufferConstIter first,
434 OptionBufferConstIter last) {
435 setData(first, last);
436 impl_->parseWireData(first, last);
437 // Check that the flags in the received option are valid. Ignore MBZ bits
438 // because we don't want to discard the whole option because of MBZ bits
439 // being set.
440 try {
441 impl_->checkFlags(impl_->flags_, false);
442 } catch (const InvalidOption6FqdnFlags& ex) {
443 if (Option::lenient_parsing_) {
444 impl_->flags_ &= ~Option6ClientFqdn::FLAG_N;
445 } else {
446 throw;
447 }
448 }
449}
450
451std::string
452Option6ClientFqdn::toText(int indent) const {
453 std::ostringstream stream;
454 std::string in(indent, ' '); // base indentation
455 stream << in << "type=" << type_ << "(CLIENT_FQDN), "
456 << "flags: ("
457 << "N=" << (getFlag(FLAG_N) ? "1" : "0") << ", "
458 << "O=" << (getFlag(FLAG_O) ? "1" : "0") << ", "
459 << "S=" << (getFlag(FLAG_S) ? "1" : "0") << "), "
460 << "domain-name='" << getDomainName() << "' ("
461 << (getDomainNameType() == PARTIAL ? "partial" : "full")
462 << ")";
463
464 return (stream.str());
465}
466
467uint16_t
468Option6ClientFqdn::len() const {
469 uint16_t domain_name_length = 0;
470 if (impl_->domain_name_) {
471 // If domain name is partial, the NULL terminating character
472 // is not included and the option. Length has to be adjusted.
473 domain_name_length = impl_->domain_name_type_ == FULL ?
474 impl_->domain_name_->getLength() :
475 impl_->domain_name_->getLength() - 1;
476 }
477 return (getHeaderLen() + FLAG_FIELD_LEN + domain_name_length);
478}
479
480} // end of isc::dhcp namespace
481} // end of isc namespace
buffer.h
isc::Exception
This is a base class for exceptions thrown from the DNS library module.
Definition exceptions/exceptions.h:23
isc::OutOfRange
A generic exception that is thrown if a parameter given to a method would refer to or modify out-of-r...
Definition exceptions/exceptions.h:115
isc::dhcp::InvalidOption6FqdnDomainName
Exception thrown when invalid domain name is specified.
Definition option6_client_fqdn.h:27
isc::dhcp::InvalidOption6FqdnFlags
Exception thrown when invalid flags have been specified for DHCPv6 Client Fqdn Option.
Definition option6_client_fqdn.h:20
isc::dhcp::Option6ClientFqdnImpl
Implements the logic for the Option6ClientFqdn class.
Definition option6_client_fqdn.cc:29
isc::dhcp::Option6ClientFqdnImpl::operator=
Option6ClientFqdnImpl & operator=(const Option6ClientFqdnImpl &source)
Assignment operator.
Definition option6_client_fqdn.cc:150
isc::dhcp::Option6ClientFqdnImpl::domain_name_
boost::shared_ptr< isc::dns::Name > domain_name_
Holds the pointer to a domain name carried in the option.
Definition option6_client_fqdn.cc:34
isc::dhcp::Option6ClientFqdnImpl::flags_
uint8_t flags_
Holds flags carried by the option.
Definition option6_client_fqdn.cc:32
isc::dhcp::Option6ClientFqdnImpl::domain_name_type_
Option6ClientFqdn::DomainNameType domain_name_type_
Indicates whether domain name is partial or fully qualified.
Definition option6_client_fqdn.cc:36
isc::dhcp::Option6ClientFqdnImpl::setDomainName
void setDomainName(const std::string &domain_name, const Option6ClientFqdn::DomainNameType name_type)
Set a new domain name for the option.
Definition option6_client_fqdn.cc:168
isc::dhcp::Option6ClientFqdnImpl::parseWireData
void parseWireData(OptionBufferConstIter first, OptionBufferConstIter last)
Parse the Option provided in the wire format.
Definition option6_client_fqdn.cc:225
isc::dhcp::Option6ClientFqdnImpl::Option6ClientFqdnImpl
Option6ClientFqdnImpl(const uint8_t flags, const std::string &domain_name, const Option6ClientFqdn::DomainNameType name_type)
Constructor, from domain name.
Definition option6_client_fqdn.cc:101
isc::dhcp::Option6ClientFqdnImpl::checkFlags
static void checkFlags(const uint8_t flags, const bool check_mbz)
Check if flags are valid.
Definition option6_client_fqdn.cc:205
isc::dhcp::Option6ClientFqdn
Represents DHCPv6 Client FQDN Option (code 39).
Definition option6_client_fqdn.h:87
isc::dhcp::Option6ClientFqdn::resetFlags
void resetFlags()
Sets the flag field value to 0.
Definition option6_client_fqdn.cc:372
isc::dhcp::Option6ClientFqdn::FLAG_S
static const uint8_t FLAG_S
S bit.
Definition option6_client_fqdn.h:93
isc::dhcp::Option6ClientFqdn::FLAG_N
static const uint8_t FLAG_N
N bit.
Definition option6_client_fqdn.h:95
isc::dhcp::Option6ClientFqdn::getDomainNameType
DomainNameType getDomainNameType() const
Returns enumerator value which indicates whether domain-name is partial or full.
Definition option6_client_fqdn.cc:418
isc::dhcp::Option6ClientFqdn::clone
virtual OptionPtr clone() const
Copies this option and returns a pointer to the copy.
Definition option6_client_fqdn.cc:316
isc::dhcp::Option6ClientFqdn::FLAG_FIELD_LEN
static const uint16_t FLAG_FIELD_LEN
The length of the flag field within DHCPv6 Client Fqdn Option.
Definition option6_client_fqdn.h:102
isc::dhcp::Option6ClientFqdn::setDomainName
void setDomainName(const std::string &domain_name, const DomainNameType domain_name_type)
Set new domain-name.
Definition option6_client_fqdn.cc:407
isc::dhcp::Option6ClientFqdn::resetDomainName
void resetDomainName()
Set empty domain-name.
Definition option6_client_fqdn.cc:413
isc::dhcp::Option6ClientFqdn::FLAG_O
static const uint8_t FLAG_O
O bit.
Definition option6_client_fqdn.h:94
isc::dhcp::Option6ClientFqdn::FLAG_MASK
static const uint8_t FLAG_MASK
Mask which zeroes MBZ flag bits.
Definition option6_client_fqdn.h:99
isc::dhcp::Option6ClientFqdn::len
virtual uint16_t len() const
Returns length of the complete option (data length + DHCPv6 option header).
Definition option6_client_fqdn.cc:468
isc::dhcp::Option6ClientFqdn::unpack
virtual void unpack(OptionBufferConstIter first, OptionBufferConstIter last)
Parses option from the received buffer.
Definition option6_client_fqdn.cc:433
isc::dhcp::Option6ClientFqdn::Option6ClientFqdn
Option6ClientFqdn(const uint8_t flags, const std::string &domain_name, const DomainNameType domain_name_type=FULL)
Constructor, creates option instance using flags and domain name.
Definition option6_client_fqdn.cc:293
isc::dhcp::Option6ClientFqdn::getDomainName
std::string getDomainName() const
Returns the domain-name in the text format.
Definition option6_client_fqdn.cc:377
isc::dhcp::Option6ClientFqdn::pack
virtual void pack(isc::util::OutputBuffer &buf, bool check=true) const
Writes option in the wire format into a buffer.
Definition option6_client_fqdn.cc:423
isc::dhcp::Option6ClientFqdn::operator=
Option6ClientFqdn & operator=(const Option6ClientFqdn &source)
Assignment operator.
Definition option6_client_fqdn.cc:324
isc::dhcp::Option6ClientFqdn::DomainNameType
DomainNameType
Type of the domain-name: partial or full.
Definition option6_client_fqdn.h:105
isc::dhcp::Option6ClientFqdn::PARTIAL
@ PARTIAL
Definition option6_client_fqdn.h:106
isc::dhcp::Option6ClientFqdn::FULL
@ FULL
Definition option6_client_fqdn.h:107
isc::dhcp::Option6ClientFqdn::packDomainName
void packDomainName(isc::util::OutputBuffer &buf) const
Writes domain-name in the wire format into a buffer.
Definition option6_client_fqdn.cc:388
isc::dhcp::Option6ClientFqdn::toText
virtual std::string toText(int indent=0) const
Returns string representation of the option.
Definition option6_client_fqdn.cc:452
isc::dhcp::Option6ClientFqdn::getFlag
bool getFlag(const uint8_t flag) const
Checks if the specified flag of the DHCPv6 Client FQDN Option is set.
Definition option6_client_fqdn.cc:333
isc::dhcp::Option6ClientFqdn::~Option6ClientFqdn
virtual ~Option6ClientFqdn()
Destructor.
Definition option6_client_fqdn.cc:306
isc::dhcp::Option6ClientFqdn::setFlag
void setFlag(const uint8_t flag, const bool set)
Modifies the value of the specified DHCPv6 Client Fqdn Option flag.
Definition option6_client_fqdn.cc:345
isc::dhcp::Option::type_
uint16_t type_
option type (0-255 for DHCPv4, 0-65535 for DHCPv6)
Definition option.h:598
isc::dhcp::Option::lenient_parsing_
static bool lenient_parsing_
Governs whether options should be parsed less strictly.
Definition option.h:490
isc::dhcp::Option::getHeaderLen
virtual uint16_t getHeaderLen() const
Returns length of header (2 for v4, 4 for v6).
Definition option.cc:328
isc::dhcp::Option::V6
@ V6
Definition option.h:90
isc::dhcp::Option::operator=
Option & operator=(const Option &rhs)
Assignment operator.
Definition option.cc:73
isc::dhcp::Option::setData
void setData(InputIterator first, InputIterator last)
Sets content of this option from buffer.
Definition option.h:434
isc::dhcp::Option::cloneInternal
OptionPtr cloneInternal() const
Copies this option and returns a pointer to the copy.
Definition option.h:504
isc::dhcp::Option::packHeader
void packHeader(isc::util::OutputBuffer &buf, bool check=true) const
Store option's header in a buffer.
Definition option.cc:119
isc::dhcp::Option::Option
Option(Universe u, uint16_t type)
ctor, used for options constructed, usually during transmission
Definition option.cc:39
isc::dhcp::SkipThisOptionError
Exception thrown during option unpacking This exception is thrown when an error has occurred unpackin...
Definition option.h:67
isc::dns::LabelSequence
Light-weight Accessor to Name data.
Definition labelsequence.h:35
isc::dns::LabelSequence::getData
const uint8_t * getData(size_t *len) const
Return the wire-format data for this LabelSequence.
Definition labelsequence.cc:82
isc::dns::LabelSequence::getDataLength
size_t getDataLength() const
Return the length of the wire-format data of this LabelSequence.
Definition labelsequence.cc:88
isc::dns::Name
The Name class encapsulates DNS names.
Definition name.h:219
isc::util::InputBuffer
The InputBuffer class is a buffer abstraction for manipulating read-only data.
Definition buffer.h:81
isc::util::OutputBuffer
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
Definition buffer.h:346
isc::util::OutputBuffer::writeUint8
void writeUint8(uint8_t data)
Write an unsigned 8-bit integer into the buffer.
Definition buffer.h:476
isc::util::OutputBuffer::writeData
void writeData(const void *data, size_t len)
Copy an arbitrary length of data into the buffer.
Definition buffer.h:559
dhcp6.h
D6O_CLIENT_FQDN
@ D6O_CLIENT_FQDN
Definition dhcp6.h:59
isc_throw
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
Definition exceptions/exceptions.h:210
labelsequence.h
isc::data
Definition base_stamped_element.cc:12
isc::dhcp
Definition dhcp4/client_handler.cc:20
isc::dhcp::OptionBufferConstIter
OptionBuffer::const_iterator OptionBufferConstIter
const_iterator for walking over OptionBuffer
Definition option.h:30
isc::dhcp::OptionBuffer
std::vector< uint8_t > OptionBuffer
buffer types used in DHCP code.
Definition option.h:24
isc::dhcp::OptionPtr
boost::shared_ptr< Option > OptionPtr
Definition option.h:37
isc::util::str::trim
string trim(const string &input)
Trim leading and trailing spaces.
Definition str.cc:32
isc
Defines the logger used by the top-level component of kea-lfc.
Definition check_exists_add.cc:18
option6_client_fqdn.h
str.h