542 std::string
toText()
const;
The Name class encapsulates DNS names.
const RRsetIterator endSection(const Section section) const
Return an iterator corresponding to the end of the given section (other than Question) of the message...
const Rcode & getRcode() const
Return the Response Code of the message.
void toWire(AbstractMessageRenderer &renderer, TSIGContext *tsig_ctx=NULL)
Render the message in wire formant into a message renderer object with (or without) TSIG...
Render mode (building an outgoing message)
void clear(Mode mode)
Clear the message content (if any) and reinitialize it in the specified mode.
void setEDNS(ConstEDNSPtr edns)
Set EDNS for the message.
Mode
Constants to specify the operation mode of the Message.
ostream & operator<<(std::ostream &os, const EDNS &edns)
Insert the EDNS as a string into stream.
A standard DNS module exception that is thrown if a Message class method is called that is prohibited...
bool operator==(const SectionIterator< T > &other) const
ParseOptions
Parse options.
const QuestionIterator beginQuestion() const
Return an iterator corresponding to the beginning of the Question section of the message.
The Question class encapsulates the common search key of DNS lookup, consisting of owner name...
bool hasRRset(const Section section, const Name &name, const RRClass &rrclass, const RRType &rrtype) const
Determine whether the given section already has an RRset matching the given name, RR class and RR typ...
boost::shared_ptr< const EDNS > ConstEDNSPtr
A pointer-like type pointing to an immutable EDNS object.
~Message()
The destructor.
qid_t getQid() const
Return the query ID given in the header section of the message.
void clearSection(const Section section)
Remove all RRSets from the given Section.
InvalidMessageUDPSize(const char *file, size_t line, const char *what)
void setRcode(const Rcode &rcode)
Set the Response Code of the message.
DNS Response Codes (RCODEs) class.
void setHeaderFlag(const HeaderFlag flag, const bool on=true)
Set or clear the specified header flag bit in the header section.
SectionIterator< T > & operator++()
const T & operator*() const
const Opcode & getOpcode() const
Return the OPCODE given in the header section of the message.
const T * operator->() const
The Message class encapsulates a standard DNS message.
SectionIterator< QuestionPtr > QuestionIterator
The RRClass class encapsulates DNS resource record classes.
boost::shared_ptr< Message > MessagePtr
Pointer-like type pointing to a Message.
Template version of Section Iterator.
void operator=(const SectionIterator< T > &source)
ConstEDNSPtr getEDNS() const
Return, if any, the EDNS associated with the message.
A standard DNS module exception that is thrown if a section iterator is being constructed for an inco...
void fromWire(isc::util::InputBuffer &buffer, ParseOptions options=PARSE_DEFAULT)
(Re)build a Message object from wire-format data.
The AbstractMessageRenderer class is an abstract base class that provides common interfaces for rende...
InvalidMessageSection(const char *file, size_t line, const char *what)
void addQuestion(QuestionPtr question)
Add a (pointer like object of) Question to the message.
const QuestionIterator endQuestion() const
Return an iterator corresponding to the end of the Question section of the message.
bool operator!=(const SectionIterator< T > &other) const
bool getHeaderFlag(const HeaderFlag flag) const
Return whether the specified header flag bit is set in the header section.
Parse mode (handling an incoming message)
Query (if cleared) or response (if set)
DNSSEC checking disabled (RFC4035)
A standard DNS module exception that is thrown if a wire format message parser encounters a short len...
MessageTooShort(const char *file, size_t line, const char *what)
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
std::string toText() const
Convert the Message to a string.
A standard DNS module exception that is thrown if a UDP buffer size smaller than the standard default...
Defines the logger used by the top-level component of kea-dhcp-ddns.
const RRsetIterator beginSection(const Section section) const
Return an iterator corresponding to the beginning of the given section (other than Question) of the m...
SectionIterator is a templated class to provide standard-compatible iterators for Questions and RRset...
SectionIterator< RRsetPtr > RRsetIterator
unsigned int getRRCount(const Section section) const
Returns the number of RRs contained in the given section.
void setOpcode(const Opcode &opcode)
Set the OPCODE of the header section of the message.
Section
Constants to specify sections of a DNS message.
bool removeRRset(const Section section, RRsetIterator &iterator)
Remove RRSet from Message.
void appendSection(const Section section, const Message &source)
Adds all rrsets from the source the given section in the source message to the same section of this m...
The RRType class encapsulates DNS resource record types.
InvalidMessageOperation(const char *file, size_t line, const char *what)
const TSIGRecord * getTSIGRecord() const
Return, if any, the TSIG record contained in the received message.
void parseHeader(isc::util::InputBuffer &buffer)
Parse the header section of the Message.
void setQid(qid_t qid)
Set the query ID of the header section of the message.
boost::shared_ptr< AbstractRRset > RRsetPtr
A pointer-like type pointing to an RRset object.
HeaderFlag
Constants for flag bit fields of a DNS message header.
void makeResponse()
Prepare for making a response from a request.
static const uint16_t DEFAULT_MAX_UDPSIZE
The default maximum size of UDP DNS messages that don't cause truncation.
The Opcode class objects represent standard OPCODEs of the header section of DNS messages as defined ...
boost::shared_ptr< Question > QuestionPtr
A pointer-like type pointing to an Question object.
boost::shared_ptr< const Message > ConstMessagePtr
void addRRset(const Section section, RRsetPtr rrset)
Add a (pointer like object of) RRset to the given section of the message.
Preserve RR order and don't combine them.
Message(Mode mode)
The constructor.
static const uint16_t DEFAULT_MAX_EDNS0_UDPSIZE
The default maximum size of UDP DNS messages we can handle.