Kea 2.7.6
|
Implements the logic for the Option6ClientFqdn class. More...
Public Member Functions | |
Option4ClientFqdnImpl (const Option4ClientFqdnImpl &source) | |
Copy constructor. | |
Option4ClientFqdnImpl (const uint8_t flags, const Option4ClientFqdn::Rcode &rcode, const std::string &domain_name, const Option4ClientFqdn::DomainNameType name_type) | |
Constructor, from domain name. | |
Option4ClientFqdnImpl (OptionBufferConstIter first, OptionBufferConstIter last) | |
Constructor, from wire data. | |
Option4ClientFqdnImpl & | operator= (const Option4ClientFqdnImpl &source) |
Assignment operator. | |
void | parseASCIIDomainName (OptionBufferConstIter first, OptionBufferConstIter last) |
Parse domain-name encoded in the deprecated ASCII format. | |
void | parseCanonicalDomainName (OptionBufferConstIter first, OptionBufferConstIter last) |
Parse domain-name encoded in the canonical format. | |
void | parseWireData (OptionBufferConstIter first, OptionBufferConstIter last) |
Parse the Option provided in the wire format. | |
void | setDomainName (const std::string &domain_name, const Option4ClientFqdn::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. | |
Option4ClientFqdn::DomainNameType | domain_name_type_ |
Indicates whether domain name is partial or fully qualified. | |
uint8_t | flags_ |
Holds flags carried by the option. | |
Option4ClientFqdn::Rcode | rcode1_ |
Holds RCODE1 and RCODE2 values. | |
Option4ClientFqdn::Rcode | rcode2_ |
Implements the logic for the Option6ClientFqdn class.
The purpose of the class is to separate the implementation details of the Option4ClientFqdn class from the interface. This implementation uses libdns classes to process FQDNs. At some point it may be desired to split libdhcp++ from 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 option4_client_fqdn.cc.
isc::dhcp::Option4ClientFqdnImpl::Option4ClientFqdnImpl | ( | const uint8_t | flags, |
const Option4ClientFqdn::Rcode & | rcode, | ||
const std::string & | domain_name, | ||
const Option4ClientFqdn::DomainNameType | name_type ) |
Constructor, from domain name.
flags | A value of the flags option field. |
rcode | An object representing the RCODE1 and RCODE2 values. |
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 119 of file option4_client_fqdn.cc.
References checkFlags(), flags_, and setDomainName().
isc::dhcp::Option4ClientFqdnImpl::Option4ClientFqdnImpl | ( | OptionBufferConstIter | first, |
OptionBufferConstIter | last ) |
Constructor, from wire data.
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 143 of file option4_client_fqdn.cc.
References checkFlags(), flags_, and parseWireData().
isc::dhcp::Option4ClientFqdnImpl::Option4ClientFqdnImpl | ( | const Option4ClientFqdnImpl & | source | ) |
Copy constructor.
source | An object being copied. |
Definition at line 154 of file option4_client_fqdn.cc.
References domain_name_.
|
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.
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. |
InvalidOption6FqdnFlags | if flags are invalid. |
Definition at line 229 of file option4_client_fqdn.cc.
References isc::dhcp::Option4ClientFqdn::FLAG_MASK, isc::dhcp::Option4ClientFqdn::FLAG_N, isc::dhcp::Option4ClientFqdn::FLAG_S, and isc_throw.
Referenced by Option4ClientFqdnImpl(), Option4ClientFqdnImpl(), isc::dhcp::Option4ClientFqdn::setFlag(), and isc::dhcp::Option4ClientFqdn::unpack().
Option4ClientFqdnImpl & isc::dhcp::Option4ClientFqdnImpl::operator= | ( | const Option4ClientFqdnImpl & | source | ) |
Assignment operator.
source | An object which is being assigned. |
Definition at line 170 of file option4_client_fqdn.cc.
References domain_name_, domain_name_type_, flags_, rcode1_, and rcode2_.
void isc::dhcp::Option4ClientFqdnImpl::parseASCIIDomainName | ( | OptionBufferConstIter | first, |
OptionBufferConstIter | last ) |
Parse domain-name encoded in the deprecated ASCII format.
first | An iterator pointing to the beginning of the option data where domain-name is stored. |
last | An iterator pointing to the end of the option data where domain-name is stored. |
Definition at line 322 of file option4_client_fqdn.cc.
References domain_name_, domain_name_type_, isc::dhcp::Option4ClientFqdn::FULL, and isc::dhcp::Option4ClientFqdn::PARTIAL.
Referenced by parseWireData().
void isc::dhcp::Option4ClientFqdnImpl::parseCanonicalDomainName | ( | OptionBufferConstIter | first, |
OptionBufferConstIter | last ) |
Parse domain-name encoded in the canonical format.
Definition at line 287 of file option4_client_fqdn.cc.
References domain_name_, domain_name_type_, isc::dhcp::Option4ClientFqdn::FULL, and isc::dhcp::Option4ClientFqdn::PARTIAL.
Referenced by parseWireData().
void isc::dhcp::Option4ClientFqdnImpl::parseWireData | ( | OptionBufferConstIter | first, |
OptionBufferConstIter | last ) |
Parse the Option provided in the wire format.
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 249 of file option4_client_fqdn.cc.
References isc::dhcp::DHO_FQDN, isc::dhcp::Option4ClientFqdn::FIXED_FIELDS_LEN, isc::dhcp::Option4ClientFqdn::FLAG_E, flags_, isc_throw, isc::dhcp::Option::lenient_parsing_, parseASCIIDomainName(), parseCanonicalDomainName(), rcode1_, rcode2_, and isc::Exception::what().
Referenced by Option4ClientFqdnImpl(), and isc::dhcp::Option4ClientFqdn::unpack().
void isc::dhcp::Option4ClientFqdnImpl::setDomainName | ( | const std::string & | domain_name, |
const Option4ClientFqdn::DomainNameType | name_type ) |
Set a new domain name for the option.
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 188 of file option4_client_fqdn.cc.
References domain_name_, domain_name_type_, isc::dhcp::Option4ClientFqdn::FULL, isc_throw, and isc::util::str::trim().
Referenced by Option4ClientFqdnImpl(), and isc::dhcp::Option4ClientFqdn::setDomainName().
boost::shared_ptr<isc::dns::Name> isc::dhcp::Option4ClientFqdnImpl::domain_name_ |
Holds the pointer to a domain name carried in the option.
Definition at line 37 of file option4_client_fqdn.cc.
Referenced by Option4ClientFqdnImpl(), isc::dhcp::Option4ClientFqdn::getDomainName(), isc::dhcp::Option4ClientFqdn::len(), operator=(), isc::dhcp::Option4ClientFqdn::packDomainName(), parseASCIIDomainName(), parseCanonicalDomainName(), and setDomainName().
Option4ClientFqdn::DomainNameType isc::dhcp::Option4ClientFqdnImpl::domain_name_type_ |
Indicates whether domain name is partial or fully qualified.
Definition at line 39 of file option4_client_fqdn.cc.
Referenced by isc::dhcp::Option4ClientFqdn::getDomainName(), isc::dhcp::Option4ClientFqdn::getDomainNameType(), isc::dhcp::Option4ClientFqdn::len(), operator=(), isc::dhcp::Option4ClientFqdn::packDomainName(), parseASCIIDomainName(), parseCanonicalDomainName(), and setDomainName().
uint8_t isc::dhcp::Option4ClientFqdnImpl::flags_ |
Holds flags carried by the option.
Definition at line 32 of file option4_client_fqdn.cc.
Referenced by Option4ClientFqdnImpl(), Option4ClientFqdnImpl(), isc::dhcp::Option4ClientFqdn::getFlag(), operator=(), isc::dhcp::Option4ClientFqdn::pack(), parseWireData(), isc::dhcp::Option4ClientFqdn::resetFlags(), isc::dhcp::Option4ClientFqdn::setFlag(), and isc::dhcp::Option4ClientFqdn::unpack().
Option4ClientFqdn::Rcode isc::dhcp::Option4ClientFqdnImpl::rcode1_ |
Holds RCODE1 and RCODE2 values.
Definition at line 34 of file option4_client_fqdn.cc.
Referenced by isc::dhcp::Option4ClientFqdn::getRcode(), operator=(), isc::dhcp::Option4ClientFqdn::pack(), parseWireData(), and isc::dhcp::Option4ClientFqdn::setRcode().
Option4ClientFqdn::Rcode isc::dhcp::Option4ClientFqdnImpl::rcode2_ |
Definition at line 35 of file option4_client_fqdn.cc.
Referenced by isc::dhcp::Option4ClientFqdn::getRcode(), operator=(), isc::dhcp::Option4ClientFqdn::pack(), parseWireData(), and isc::dhcp::Option4ClientFqdn::setRcode().