Kea 2.7.5
|
Holds Client identifier or client IPv4 address. More...
#include <duid.h>
Public Member Functions | |
ClientId (const std::vector< uint8_t > &data) | |
Constructor based on vector<uint8_t> | |
ClientId (const uint8_t *data, size_t len) | |
Constructor based on array and array size. | |
const std::vector< uint8_t > & | getClientId () const |
Returns reference to the client-id data. | |
Public Member Functions inherited from isc::dhcp::IdentifierType< 2, 255 > | |
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 ClientIdPtr | fromText (const std::string &text) |
Create client identifier from the textual format. | |
Static Public Member Functions inherited from isc::dhcp::IdentifierType< 2, 255 > | |
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. | |
Static Public Attributes | |
static constexpr size_t | MAX_CLIENT_ID_LEN = IdentifierType::getMaxSize() |
Maximum size of a client ID. | |
static constexpr size_t | MIN_CLIENT_ID_LEN = IdentifierType::getMinSize() |
Minimum size of a client ID. | |
Additional Inherited Members | |
Protected Member Functions inherited from isc::dhcp::IdentifierBaseType | |
virtual | ~IdentifierBaseType ()=0 |
Pure virtual destructor. | |
Protected Attributes inherited from isc::dhcp::IdentifierType< 2, 255 > | |
std::vector< uint8_t > | data_ |
The actual content of the Identifier. | |
Holds Client identifier or client IPv4 address.
This class is intended to be a generic IPv4 client identifier. It can hold a client-id
isc::dhcp::ClientId::ClientId | ( | const std::vector< uint8_t > & | data | ) |
Constructor based on vector<uint8_t>
data | The data used to create the ClientId |
Definition at line 63 of file duid.cc.
Referenced by fromText().
isc::dhcp::ClientId::ClientId | ( | const uint8_t * | data, |
size_t | len ) |
|
static |
Create client identifier from the textual format.
This static function creates the instance of the ClientId
from the textual format.
text | Client identifier in the textual format. |
ClientId
. isc::BadValue | if parsing the client identifier failed. |
isc::OutOfRange | if the client identifier is truncated. |
Definition at line 73 of file duid.cc.
References ClientId(), and isc::dhcp::IdentifierType< min_size, max_size >::fromText().
Referenced by isc::dhcp::Lease4::fromElement(), isc::lease_cmds::LeaseCmdsImpl::getParameters(), isc::lease_cmds::LeaseCmdsImpl::leaseGetByClientIdHandler(), and isc::lease_cmds::Lease4Parser::parse().
const std::vector< uint8_t > & isc::dhcp::ClientId::getClientId | ( | ) | const |
Returns reference to the client-id data.
Definition at line 69 of file duid.cc.
References isc::dhcp::IdentifierType< 2, 255 >::data_.
|
staticconstexpr |
Maximum size of a client ID.
Definition at line 235 of file duid.h.
Referenced by isc::dhcp::Host::getIdentifierMaxLength().
|
staticconstexpr |