| Kea 3.0.2-git

isc::dhcp::Option6ClientFqdnImpl Class Reference

Implements the logic for the Option6ClientFqdn class. More...

## Public Member Functions
| Option6ClientFqdnImpl (const Option6ClientFqdnImpl &source)
| Copy constructor.
| Option6ClientFqdnImpl (const uint8_t flags, const std::string &domain_name, const Option6ClientFqdn::DomainNameType name_type)
| Constructor, from domain name.
| Option6ClientFqdnImpl (OptionBufferConstIter first, OptionBufferConstIter last)
| Constructor, from wire data.
Option6ClientFqdnImpl & | operator= (const Option6ClientFqdnImpl &source)
| Assignment operator.
void | parseWireData (OptionBufferConstIter first, OptionBufferConstIter last)
| Parse the Option provided in the wire format.
void | setDomainName (const std::string &domain_name, const Option6ClientFqdn::DomainNameType name_type)
| Set a new domain name for the option.

## Static Public Member Functions
static void | checkFlags (const uint8_t flags, const bool check_mbz)
| Check if flags are valid.

## Public Attributes
boost::shared_ptr< isc::dns::Name > | domain_name_
| Holds the pointer to a domain name carried in the option.
Option6ClientFqdn::DomainNameType | domain_name_type_
| Indicates whether domain name is partial or fully qualified.
uint8_t | flags_
| Holds flags carried by the option.

## Detailed Description

Implements the logic for the Option6ClientFqdn class.

The purpose of the class is to separate the implementation details of the Option6ClientFqdn class from the interface. This implementation uses kea-libdns classes to process FQDNs. At some point it may be desired to split kea-libdhcp++ from kea-libdns. In such case the implementation of this class may be changed. The declaration of the Option6ClientFqdn class holds the pointer to implementation, so the transition to a different implementation would not affect the header file.

Definition at line 29 of file option6_client_fqdn.cc.

## Constructor & Destructor Documentation

## ◆ Option6ClientFqdnImpl() [1/3]

isc::dhcp::Option6ClientFqdnImpl::Option6ClientFqdnImpl | ( | const uint8_t | flags,
|  | const std::string & | domain_name,
|  | const Option6ClientFqdn::DomainNameType | name_type )

Constructor, from domain name.

Parameters

  flags | A value of the flags option field.
  domain_name | A domain name carried by the option given in the textual format.
  name_type | A value which indicates whether domain-name is partial or fully qualified.

Definition at line 100 of file option6_client_fqdn.cc.

References checkFlags(), domain_name_, domain_name_type_, flags_, and setDomainName().

Referenced by Option6ClientFqdnImpl(), and operator=().

Here is the call graph for this function:

## ◆ Option6ClientFqdnImpl() [2/3]

isc::dhcp::Option6ClientFqdnImpl::Option6ClientFqdnImpl | ( | OptionBufferConstIter | first,
|  | OptionBufferConstIter | last )

Constructor, from wire data.

Parameters

  first | An iterator pointing to the beginning of the option data in the wire format.
  last | An iterator pointing to the end of the option data in the wire format.

Definition at line 120 of file option6_client_fqdn.cc.

References checkFlags(), flags_, and parseWireData().

Here is the call graph for this function:

## ◆ Option6ClientFqdnImpl() [3/3]

isc::dhcp::Option6ClientFqdnImpl::Option6ClientFqdnImpl | ( | const Option6ClientFqdnImpl & | source | ) |

Copy constructor.

Parameters

  source | An object being copied.

Definition at line 128 of file option6_client_fqdn.cc.

References Option6ClientFqdnImpl(), domain_name_, domain_name_type_, and flags_.

Here is the call graph for this function:

## Member Function Documentation

## ◆ checkFlags()

void isc::dhcp::Option6ClientFqdnImpl::checkFlags | ( | const uint8_t | flags,
|  | const bool | check_mbz )
| static

Check if flags are valid.

In particular, this function checks if the N and S bits are not set to 1 in the same time.

Parameters

  flags | A value carried by the flags field of the option.
  check_mbz | A boolean value which indicates if this function should check if the MBZ bits are set (if true). This parameter should be set to false when validating flags in the received message. This is because server should ignore MBZ bits in received messages.

Exceptions

  InvalidOption6FqdnFlags | if flags are invalid.

Definition at line 197 of file option6_client_fqdn.cc.

References isc::dhcp::Option6ClientFqdn::FLAG_MASK, isc::dhcp::Option6ClientFqdn::FLAG_N, isc::dhcp::Option6ClientFqdn::FLAG_S, and isc_throw.

Referenced by Option6ClientFqdnImpl(), Option6ClientFqdnImpl(), and isc::dhcp::Option6ClientFqdn::setFlag().

## ◆ operator=()

Option6ClientFqdnImpl & isc::dhcp::Option6ClientFqdnImpl::operator= | ( | const Option6ClientFqdnImpl & | source | ) |

Assignment operator.

Parameters

  source | An object which is being assigned.

Definition at line 142 of file option6_client_fqdn.cc.

References Option6ClientFqdnImpl(), domain_name_, domain_name_type_, and flags_.

Here is the call graph for this function:

## ◆ parseWireData()

void isc::dhcp::Option6ClientFqdnImpl::parseWireData | ( | OptionBufferConstIter | first,
|  | OptionBufferConstIter | last )

Parse the Option provided in the wire format.

Parameters

  first | An iterator pointing to the beginning of the option data in the wire format.
  last | An iterator pointing to the end of the option data in the wire format.

Definition at line 217 of file option6_client_fqdn.cc.

References D6O_CLIENT_FQDN, domain_name_, domain_name_type_, isc::dhcp::Option6ClientFqdn::FLAG_FIELD_LEN, flags_, isc::dhcp::Option6ClientFqdn::FULL, isc_throw, isc::dhcp::Option::lenient_parsing_, and isc::dhcp::Option6ClientFqdn::PARTIAL.

Referenced by Option6ClientFqdnImpl().

## ◆ setDomainName()

void isc::dhcp::Option6ClientFqdnImpl::setDomainName | ( | const std::string & | domain_name,
|  | const Option6ClientFqdn::DomainNameType | name_type )

Set a new domain name for the option.

Parameters

  domain_name | A new domain name to be assigned.
  name_type | A value which indicates whether the domain-name is partial or fully qualified.

Definition at line 159 of file option6_client_fqdn.cc.

References domain_name_, domain_name_type_, isc::dhcp::Option6ClientFqdn::FULL, isc_throw, and isc::util::str::trim().

Referenced by Option6ClientFqdnImpl().

Here is the call graph for this function:

## Member Data Documentation

## ◆ domain_name_

boost::shared_ptr<isc::dns::Name> isc::dhcp::Option6ClientFqdnImpl::domain_name_

Holds the pointer to a domain name carried in the option.

Definition at line 34 of file option6_client_fqdn.cc.

Referenced by Option6ClientFqdnImpl(), Option6ClientFqdnImpl(), operator=(), parseWireData(), and setDomainName().

## ◆ domain_name_type_

Option6ClientFqdn::DomainNameType isc::dhcp::Option6ClientFqdnImpl::domain_name_type_

Indicates whether domain name is partial or fully qualified.

Definition at line 36 of file option6_client_fqdn.cc.

Referenced by Option6ClientFqdnImpl(), Option6ClientFqdnImpl(), operator=(), parseWireData(), and setDomainName().

## ◆ flags_

uint8_t isc::dhcp::Option6ClientFqdnImpl::flags_

Holds flags carried by the option.

Definition at line 32 of file option6_client_fqdn.cc.

Referenced by Option6ClientFqdnImpl(), Option6ClientFqdnImpl(), Option6ClientFqdnImpl(), operator=(), and parseWireData().

The documentation for this class was generated from the following file:

- option6_client_fqdn.cc