 |
Kea
1.5.0
|
Go to the documentation of this file.
27 const size_t RR_COMMON_LEN = 10;
36 const size_t RDATA_COMMON_LEN = 16;
41 TSIGRecord::TSIGRecord(
const Name& key_name,
43 key_name_(key_name), rdata_(tsig_rdata),
44 length_(RR_COMMON_LEN + RDATA_COMMON_LEN + key_name_.getLength() +
45 rdata_.getAlgorithm().getLength() +
46 rdata_.getMACSize() + rdata_.getOtherLen())
60 "TSIG record is being constructed from "
61 "incompatible RDATA: " << rdata.
toText());
70 key_name_(name), rdata_(castToTSIGRdata(rdata)), length_(length)
92 template <
typename OUTPUT>
119 toWireCommon(renderer, rdata_);
126 toWireCommon(buffer, rdata_);
139 return (os << record.
toText());
static const RRClass & ANY()
size_t getLength() const
Return the length of data written in the internal buffer.
uint16_t getMACSize() const
Return the value of the MAC Size field.
void toWire(AbstractMessageRenderer &renderer) const
Render the RRClass in the wire format.
std::string toText() const
Convert the TSIG record to a string.
static const RRClass & getClass()
Return the RR class of TSIG.
std::string toText(bool omit_final_dot=false) const
Convert the Name to a string.
virtual void writeName(const Name &name, bool compress=true)=0
Write a Name object into the internal buffer in wire format, with or without name compression.
The Rdata class is an abstract base class that provides a set of common interfaces to manipulate conc...
static const uint32_t TSIG_TTL
The TTL value to be used in TSIG RRs.
rdata::TSIG class represents the TSIG RDATA as defined in RFC2845.
The AbstractMessageRenderer class is an abstract base class that provides common interfaces for rende...
Defines the logger used by the top-level component of kea-dhcp-ddns.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
ostream & operator<<(std::ostream &os, const EDNS &edns)
Insert the EDNS as a string into stream.
virtual std::string toText() const =0
Convert an Rdata to a string.
The Name class encapsulates DNS names.
const Name & getAlgorithm() const
Return the algorithm name.
virtual std::string toText() const
Convert an Rdata to a string.
size_t getLength() const
Gets the length of the Name in its wire format.
virtual void setTruncated()=0
Mark the renderer to indicate truncation has occurred while rendering.
static const RRType & TSIG()
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
void toWire(AbstractMessageRenderer &renderer) const
Render the Name in the wire format with compression.
The RRTTL class encapsulates TTLs used in DNS resource records.
void toWire(AbstractMessageRenderer &renderer) const
Render the RRType in the wire format.
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
TSIGRecord(const Name &key_name, const rdata::any::TSIG &tsig_rdata)
Constructor from TSIG key name and RDATA.
uint16_t getOtherLen() const
Return the value of the Other Len field.
int toWire(AbstractMessageRenderer &renderer) const
Render the TSIG RR in the wire format.
static const RRTTL & getTTL()
Return the TTL value of TSIG.
virtual size_t getLengthLimit() const =0
Return the maximum length of rendered data that can fit in the corresponding DNS message without trun...
The RRClass class encapsulates DNS resource record classes.