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