25 Option6Auth::Option6Auth(
const uint8_t proto,
const uint8_t algo,
26 const uint8_t method,
const uint64_t rdm,
27 const std::vector<uint8_t>&
info)
29 protocol_(proto), algorithm_(algo),
30 rdm_method_(method), rdm_value_(rdm),
36 return (cloneInternal<Option6Auth>());
70 "computing hash input");
101 begin +=
sizeof(uint8_t);
104 begin +=
sizeof(uint8_t);
107 begin +=
sizeof(uint8_t);
110 begin +=
sizeof(uint64_t);
113 std::for_each(begin, end, [
this](uint8_t msgdata)
120 std::string in(indent,
' ');
122 output << in <<
"protocol=" <<
static_cast<int>(
protocol_)
123 <<
", algorithm=" << static_cast<int>(
algorithm_)
124 <<
", rdm method=" <<
static_cast<int>(
rdm_method_)
uint64_t rdm_value_
keeps replay detection method value
uint8_t rdm_method_
keeps replay detection method type
size_t getCapacity() const
Return the current capacity of the buffer.
boost::shared_ptr< Option > OptionPtr
static const uint8_t OPTION6_AUTH_MIN_LEN
virtual OptionPtr clone() const
Copies this option and returns a pointer to the copy.
std::vector< uint8_t > auth_info_
keeps authentication information
void writeUint64(uint64_t data)
Write an unsigned 64-bit integer in host byte order into the buffer in network byte order...
void packHashInput(isc::util::OutputBuffer &buf) const
Writes option in wire-format to buf, for computing hash auth info filled with 0 for a length of 128 b...
static const uint8_t OPTION6_HDR
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
uint8_t protocol_
keeps protocol type
uint8_t algorithm_
keeps hash algorithm value
void pack(isc::util::OutputBuffer &buf) const
Writes option in wire-format to buf, returns pointer to first unused byte after stored option...
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
OptionBuffer::const_iterator OptionBufferConstIter
const_iterator for walking over OptionBuffer
virtual std::string toText(int indent=0) const
Provides human readable text representation.
Defines the logger used by the top-level component of kea-dhcp-ddns.
string encodeHex(const vector< uint8_t > &binary)
Encode binary data in the base16 ('hex') format.
void writeUint8(uint8_t data)
Write an unsigned 8-bit integer into the buffer.
static const uint8_t OPTION6_HASH_MSG_LEN
void writeUint16(uint16_t data)
Write an unsigned 16-bit integer in host byte order into the buffer in network byte order...
virtual void unpack(OptionBufferConstIter begin, OptionBufferConstIter end)
Parses received buffer.
A generic exception that is thrown if a parameter given to a method would refer to or modify out-of-r...
uint16_t type_
option type (0-255 for DHCPv4, 0-65535 for DHCPv6)
uint64_t readUint64(const uint8_t *buffer, size_t length)
Read Unsigned 64-Bit Integer from Buffer.