| Kea 3.0.2-git

isc::dhcp::IdentifierType< min_size, max_size > Class Template Reference

`#include <duid.h>`

Inheritance diagram for isc::dhcp::IdentifierType< min_size, max_size >:
[legend]

## Public Member Functions
| IdentifierType (const std::vector< uint8_t > &data)
| Constructor from vector.
| IdentifierType (const uint8_t *data, size_t len)
| Constructor from array and array size.
bool | operator!= (const IdentifierType &other) const
| Compares two identifiers for inequality.
bool | operator== (const IdentifierType &other) const
| Compares two identifiers for equality.
std::string | toText () const
| Returns textual representation of the identifier (e.g.

## Static Public Member Functions
static std::vector< uint8_t > | fromText (const std::string &text)
| This static function parses an Identifier specified in the textual format.
static constexpr size_t | getMaxSize ()
| Return the maximum size of the acceptable data.
static constexpr size_t | getMinSize ()
| Return the minimum size of the acceptable data.

## Protected Attributes
std::vector< uint8_t > | data_
| The actual content of the Identifier.

## Additional Inherited Members
Protected Member Functions inherited from isc::dhcp::IdentifierBaseType
virtual | ~IdentifierBaseType ()=0
| Pure virtual destructor.

## Detailed Description

template<size_t min_size, size_t max_size>
class isc::dhcp::IdentifierType< min_size, max_size >

Definition at line 37 of file duid.h.

## Constructor & Destructor Documentation

## ◆ IdentifierType() [1/2]

template<size_t min_size, size_t max_size>

isc::dhcp::IdentifierType< min_size, max_size >::IdentifierType | ( | const std::vector< uint8_t > & | data | ) |
| inline

Constructor from vector.

Parameters

  data | The data used to create the IdentifierType

Definition at line 43 of file duid.h.

References data_, and isc_throw.

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

## ◆ IdentifierType() [2/2]

template<size_t min_size, size_t max_size>

isc::dhcp::IdentifierType< min_size, max_size >::IdentifierType | ( | const uint8_t * | data,
|  | size_t | len )
| inline

Constructor from array and array size.

Parameters

  data | The data used to create the Identifier
  len | The data len used to create the Identifier

Definition at line 59 of file duid.h.

References data_, and isc_throw.

## Member Function Documentation

## ◆ fromText()

template<size_t min_size, size_t max_size>

std::vector< uint8_t > isc::dhcp::IdentifierType< min_size, max_size >::fromText | ( | const std::string & | text | ) |
| inline static

This static function parses an Identifier specified in the textual format.

Parameters

  text | Identifier in the hexadecimal format with digits representing individual bytes separated by colons.

Returns
  The data resulted from parsing the textual format.

Definition at line 108 of file duid.h.

References isc::util::str::decodeFormattedHexString().

Referenced by isc::dhcp::ClientId::fromText(), and isc::dhcp::DUID::fromText().

Here is the call graph for this function:

## ◆ getMaxSize()

template<size_t min_size, size_t max_size>

constexpr size_t isc::dhcp::IdentifierType< min_size, max_size >::getMaxSize | ( |  | ) |
| inline static constexpr

Return the maximum size of the acceptable data.

Returns
  the maximum size of the acceptable data.

Definition at line 81 of file duid.h.

## ◆ getMinSize()

template<size_t min_size, size_t max_size>

constexpr size_t isc::dhcp::IdentifierType< min_size, max_size >::getMinSize | ( |  | ) |
| inline static constexpr

Return the minimum size of the acceptable data.

Returns
  the minimum size of the acceptable data.

Definition at line 74 of file duid.h.

## ◆ operator!=()

template<size_t min_size, size_t max_size>

bool isc::dhcp::IdentifierType< min_size, max_size >::operator!= | ( | const IdentifierType< min_size, max_size > & | other | ) | const
| inline

Compares two identifiers for inequality.

Returns
  True if the two identifiers are different, false otherwise.

Definition at line 124 of file duid.h.

References IdentifierType(), and data_.

Here is the call graph for this function:

## ◆ operator==()

template<size_t min_size, size_t max_size>

bool isc::dhcp::IdentifierType< min_size, max_size >::operator== | ( | const IdentifierType< min_size, max_size > & | other | ) | const
| inline

Compares two identifiers for equality.

Returns
  True if the two identifiers are equal, false otherwise.

Definition at line 117 of file duid.h.

References IdentifierType(), and data_.

Here is the call graph for this function:

## ◆ toText()

template<size_t min_size, size_t max_size>

std::string isc::dhcp::IdentifierType< min_size, max_size >::toText | ( |  | ) | const
| inline

Returns textual representation of the identifier (e.g.

00:01:02:03:ff)

Returns
  textual representation of the identifier (e.g. 00:01:02:03:ff)

Definition at line 88 of file duid.h.

References data_.

Referenced by isc::dhcp::Memfile_LeaseMgr::getLease4(), isc::dhcp::Memfile_LeaseMgr::getLease4(), isc::dhcp::LeaseMgr::getLease6(), isc::dhcp::Memfile_LeaseMgr::getLeases6(), isc::dhcp::Memfile_LeaseMgr::getLeases6(), isc::dhcp::Memfile_LeaseMgr::getLeases6(), isc::dhcp::Memfile_LeaseMgr::getLeases6ByRelayId(), isc::lease_query::LeaseQueryImpl4::leaseQueryLabel(), pkt4_receive(), pkt4_send(), pkt6_receive(), pkt6_send(), isc::perfdhcp::ExchangeStats::receivedLeases(), and isc::flex_id::retrieveFlexId().

## Member Data Documentation

## ◆ data_

template<size_t min_size, size_t max_size>

std::vector<uint8_t> isc::dhcp::IdentifierType< min_size, max_size >::data_
| protected

The actual content of the Identifier.

Definition at line 131 of file duid.h.

Referenced by IdentifierType(), IdentifierType(), operator!=(), operator==(), and toText().

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

- duid.h