19#include <boost/optional.hpp>
33class AbstractMessageRenderer;
100 explicit RRClass(uint16_t classcode) : classcode_(classcode) {
127 explicit RRClass(
const std::string& class_str);
195 const std::string
toText()
const;
247 return (classcode_ == other.classcode_);
262 return (classcode_ != other.classcode_);
285 return (classcode_ < other.classcode_);
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
The AbstractMessageRenderer class is an abstract base class that provides common interfaces for rende...
Base class for all sorts of text parse errors.
A standard DNS module exception that is thrown if an RRClass object is being constructed from a incom...
IncompleteRRClass(const char *file, size_t line, const char *what)
A standard DNS module exception that is thrown if an RRClass object is being constructed from an unre...
InvalidRRClass(const char *file, size_t line, const char *what)
The RRClass class encapsulates DNS resource record classes.
bool operator!=(const RRClass &other) const
Same as nequals().
static const RRClass & ANY()
static const RRClass & NONE()
bool operator==(const RRClass &other) const
Same as equals().
static const RRClass & CH()
uint16_t getCode() const
Returns the RR class code as a 16-bit unsigned integer.
void toWire(AbstractMessageRenderer &renderer) const
Render the RRClass in the wire format.
static RRClass * createFromText(const std::string &class_str)
A separate factory of RRClass from text.
bool operator<(const RRClass &other) const
Less-than comparison for RRClass against other.
static const RRClass & IN()
bool nequals(const RRClass &other) const
Return true iff two RRClasses are not equal.
const std::string toText() const
Convert the RRClass to a string.
RRClass(uint16_t classcode)
Constructor from an integer class code.
bool equals(const RRClass &other) const
Return true iff two RRClasses are equal.
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
ostream & operator<<(std::ostream &os, const EDNS &edns)
Insert the EDNS as a string into stream.
Defines the logger used by the top-level component of kea-lfc.