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),
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_)
A generic exception that is thrown if a parameter given to a method would refer to or modify out-of-r...
static const uint8_t OPTION6_HASH_MSG_LEN
uint8_t protocol_
keeps protocol type
static const uint8_t OPTION6_AUTH_MIN_LEN
static const uint8_t OPTION6_HDR
uint64_t rdm_value_
keeps replay detection method value
uint8_t rdm_method_
keeps replay detection method type
virtual std::string toText(int indent=0) const
Provides human readable text representation.
uint8_t algorithm_
keeps hash algorithm value
virtual OptionPtr clone() const
Copies this option and returns a pointer to the copy.
std::vector< uint8_t > auth_info_
keeps authentication information
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...
void pack(isc::util::OutputBuffer &buf, bool check=true) const
Writes option in wire-format to buf, returns pointer to first unused byte after stored option.
Option6Auth(const uint8_t proto, const uint8_t algo, const uint8_t method, const uint64_t rdm, const std::vector< uint8_t > &info)
Constructor, used for auth options while transmitting.
virtual void unpack(OptionBufferConstIter begin, OptionBufferConstIter end)
Parses received buffer.
uint16_t type_
option type (0-255 for DHCPv4, 0-65535 for DHCPv6)
OptionPtr cloneInternal() const
Copies this option and returns a pointer to the copy.
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
void writeUint64(uint64_t data)
Write an unsigned 64-bit integer in host byte order into the buffer in network byte order.
void writeUint8(uint8_t data)
Write an unsigned 8-bit integer into the buffer.
void writeUint16(uint16_t data)
Write an unsigned 16-bit integer in host byte order into the buffer in network byte order.
size_t getCapacity() const
Return the current capacity of the buffer.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
OptionBuffer::const_iterator OptionBufferConstIter
const_iterator for walking over OptionBuffer
boost::shared_ptr< Option > OptionPtr
string encodeHex(const vector< uint8_t > &binary)
Encode binary data in the base16 format.
uint64_t readUint64(void const *const buffer, size_t const length)
uint16_t wrapper over readUint.
Defines the logger used by the top-level component of kea-lfc.