7#ifndef DNS_RDATACLASS_H 
    8#define DNS_RDATACLASS_H 
   18#include <boost/shared_ptr.hpp> 
   46    explicit TSIG(
const std::string& type_str);
 
   82    TSIG(
const Name& algorithm, uint64_t time_signed, uint16_t fudge,
 
   83         uint16_t mac_size, 
const void* mac, uint16_t original_id,
 
   84         uint16_t error, uint16_t other_len, 
const void* other_data);
 
  158    std::unique_ptr<TSIGImpl> constructFromLexer(
MasterLexer& lexer, 
const Name* origin);
 
  160    std::unique_ptr<TSIGImpl> impl_;
 
 
 
  169    explicit A(
const std::string& type_str);
 
 
 
  210    return (
Name(str_region.
beg, str_region.
len, origin));
 
 
  213template<
class Type, u
int16_t typeCode>
 
  220    explicit NS(
const std::string& type_str);
 
  233    explicit NS(
const Name& nsname) : nsname_(nsname) {
 
 
 
  247    explicit OPT(
const std::string& type_str);
 
  272                 boost::shared_ptr<std::vector<uint8_t> >& 
data);
 
  286        boost::shared_ptr<std::vector<uint8_t>> data_;
 
 
  308    std::unique_ptr<OPTImpl> impl_;
 
 
  313    explicit PTR(
const std::string& type_str);
 
  327    explicit PTR(
const Name& ptr_name) : ptr_name_(ptr_name) {
 
 
 
  347    explicit RRSIG(
const std::string& type_str);
 
  365    std::unique_ptr<RRSIGImpl> constructFromLexer(
MasterLexer& lexer, 
const Name* origin);
 
  367    std::unique_ptr<RRSIGImpl> impl_;
 
 
  372    explicit SOA(
const std::string& type_str);
 
  384        uint32_t refresh, uint32_t retry, uint32_t expire,
 
  398    uint8_t numdata_[20];
 
 
  411    explicit TKEY(
const std::string& type_str);
 
  442    TKEY(
const Name& algorithm, uint32_t inception, uint32_t expire,
 
  443         uint16_t mode, uint16_t error, uint16_t key_len,
 
  444         const void* key, uint16_t other_len, 
const void* other_data);
 
  517    std::unique_ptr<TKEYImpl> constructFromLexer(
MasterLexer& lexer, 
const Name* origin);
 
  519    std::unique_ptr<TKEYImpl> impl_;
 
 
  524    explicit TXT(
const std::string& type_str);
 
  540    std::unique_ptr<TXTImpl> impl_;
 
 
  549    explicit A(
const std::string& type_str);
 
 
  565    explicit AAAA(
const std::string& type_str);
 
 
  587    explicit DHCID(
const std::string& type_str);
 
  611    std::vector<uint8_t> digest_;
 
 
 
The AbstractMessageRenderer class is an abstract base class that provides common interfaces for rende...
Tokenizer for parsing DNS master files.
const MasterToken & getNextToken(Options options=NONE)
Parse and return another token from the input.
Set of issue callbacks for a loader.
Options
Options how the parsing should work.
const StringRegion & getStringRegion() const
Return the value of a string-variant token.
The Name class encapsulates DNS names.
The RRType class encapsulates DNS resource record types.
This class defines DNS serial numbers and serial arithmetic.
Rdata()
The default constructor.
TSIG(isc::util::InputBuffer &buffer, size_t rdata_len)
TSIG(const Name &algorithm, uint64_t time_signed, uint16_t fudge, uint16_t mac_size, const void *mac, uint16_t original_id, uint16_t error, uint16_t other_len, const void *other_data)
Constructor from RDATA field parameters.
uint16_t getOriginalID() const
Return the value of the Original ID field.
uint16_t getError() const
Return the value of the Error field.
virtual std::string toText() const
Convert an Rdata to a string.
TSIG & operator=(const TSIG &source)
Assignment operator.
virtual void toWire(AbstractMessageRenderer &renderer) const
Render the Rdata in the wire format into a MessageRenderer object.
TSIG(MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
const Name & getAlgorithm() const
Return the algorithm name.
uint16_t getOtherLen() const
Return the value of the Other Len field.
TSIG(const std::string &type_str)
const void * getOtherData() const
Return the value of the Other Data field.
virtual int compare(const Rdata &other) const
Compare two instances of Rdata.
const void * getMAC() const
Return the value of the MAC field.
uint16_t getFudge() const
Return the value of the Fudge field.
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
uint16_t getMACSize() const
Return the value of the MAC Size field.
uint64_t getTimeSigned() const
Return the value of the Time Signed field.
A(MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
A(const std::string &type_str)
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
virtual int compare(const Rdata &other) const
Compare two instances of Rdata.
virtual void toWire(AbstractMessageRenderer &renderer) const
Render the Rdata in the wire format into a MessageRenderer object.
A(isc::util::InputBuffer &buffer, size_t rdata_len)
virtual std::string toText() const
Convert an Rdata to a string.
virtual std::string toText() const
Convert an Rdata to a string.
NS(MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
NS(isc::util::InputBuffer &buffer, size_t rdata_len)
virtual int compare(const Rdata &other) const
Compare two instances of Rdata.
NS(const std::string &type_str)
virtual void toWire(AbstractMessageRenderer &renderer) const
Render the Rdata in the wire format into a MessageRenderer object.
const Name & getNSName() const
Specialized methods.
NS(const Name &nsname)
Specialized constructor.
const uint8_t * getData() const
Return the option data of this pseudo RR.
uint16_t getLength() const
Return the length of the option data of this pseudo RR.
uint16_t getCode() const
Return the option code of this pseudo RR.
PseudoRR(uint16_t code, boost::shared_ptr< std::vector< uint8_t > > &data)
Constructor.
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
virtual std::string toText() const
Convert an Rdata to a string.
void appendPseudoRR(uint16_t code, const uint8_t *data, uint16_t length)
Append a pseudo RR (option) in this OPT RR.
virtual int compare(const Rdata &other) const
Compare two instances of Rdata.
OPT & operator=(const OPT &source)
const std::vector< PseudoRR > & getPseudoRRs() const
Return a vector of the pseudo RRs (options) in this OPT RR.
OPT(MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
virtual void toWire(AbstractMessageRenderer &renderer) const
Render the Rdata in the wire format into a MessageRenderer object.
OPT(isc::util::InputBuffer &buffer, size_t rdata_len)
OPT(const std::string &type_str)
virtual std::string toText() const
Convert an Rdata to a string.
PTR(const std::string &type_str)
virtual void toWire(AbstractMessageRenderer &renderer) const
Render the Rdata in the wire format into a MessageRenderer object.
PTR(isc::util::InputBuffer &buffer, size_t rdata_len)
PTR(MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
virtual int compare(const Rdata &other) const
Compare two instances of Rdata.
const Name & getPTRName() const
Specialized methods.
PTR(const Name &ptr_name)
Specialized constructor.
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
const RRType & typeCovered() const
RRSIG(const RRSIG &other)
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
virtual std::string toText() const
Convert an Rdata to a string.
RRSIG(const std::string &type_str)
virtual int compare(const Rdata &other) const
Compare two instances of Rdata.
RRSIG(MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
RRSIG & operator=(const RRSIG &source)
virtual void toWire(AbstractMessageRenderer &renderer) const
Render the Rdata in the wire format into a MessageRenderer object.
RRSIG(isc::util::InputBuffer &buffer, size_t rdata_len)
SOA(const std::string &type_str)
Serial getSerial() const
Returns the serial stored in the SOA.
SOA(const Name &mname, const Name &rname, uint32_t serial, uint32_t refresh, uint32_t retry, uint32_t expire, uint32_t minimum)
SOA(isc::util::InputBuffer &buffer, size_t rdata_len)
virtual std::string toText() const
Convert an Rdata to a string.
virtual int compare(const Rdata &other) const
Compare two instances of Rdata.
virtual void toWire(AbstractMessageRenderer &renderer) const
Render the Rdata in the wire format into a MessageRenderer object.
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
uint32_t getMinimum() const
brief Returns the minimum TTL field value of the SOA.
SOA(MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
const Name & getAlgorithm() const
Return the algorithm name.
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
virtual int compare(const Rdata &other) const
Compare two instances of Rdata.
TKEY & operator=(const TKEY &source)
Assignment operator.
uint32_t getInception() const
Return the value of the Inception field as a number.
uint16_t getMode() const
Return the value of the Mode field.
virtual void toWire(AbstractMessageRenderer &renderer) const
Render the Rdata in the wire format into a MessageRenderer object.
std::string getInceptionDate() const
Return the value of the Inception field as a string.
virtual std::string toText() const
Convert an Rdata to a string.
TKEY(isc::util::InputBuffer &buffer, size_t rdata_len)
uint32_t getExpire() const
Return the value of the Expire field as a number.
static const uint16_t GSS_API_MODE
The GSS_API constant for the Mode field.
const void * getKey() const
Return the value of the Key field.
std::string getExpireDate() const
Return the value of the Expire field as a string.
TKEY(const std::string &type_str)
uint16_t getOtherLen() const
Return the value of the Other Len field.
TKEY(MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
uint16_t getError() const
Return the value of the Error field.
TKEY(const Name &algorithm, uint32_t inception, uint32_t expire, uint16_t mode, uint16_t error, uint16_t key_len, const void *key, uint16_t other_len, const void *other_data)
Constructor from RDATA field parameters.
uint16_t getKeyLen() const
Return the value of the Key Len field.
const void * getOtherData() const
Return the value of the Other Data field.
virtual int compare(const Rdata &other) const
Compare two instances of Rdata.
TXT(MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
virtual std::string toText() const
Convert an Rdata to a string.
virtual void toWire(AbstractMessageRenderer &renderer) const
Render the Rdata in the wire format into a MessageRenderer object.
TXT & operator=(const TXT &source)
TXT(const std::string &type_str)
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
TXT(isc::util::InputBuffer &buffer, size_t rdata_len)
rdata::TXTLikeImpl class represents the TXT-like RDATA for TXT and SPF types.
virtual void toWire(AbstractMessageRenderer &renderer) const
Render the Rdata in the wire format into a MessageRenderer object.
AAAA(isc::util::InputBuffer &buffer, size_t rdata_len)
AAAA(MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
virtual int compare(const Rdata &other) const
Compare two instances of Rdata.
virtual std::string toText() const
Convert an Rdata to a string.
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
AAAA(const std::string &type_str)
A(const std::string &type_str)
A(isc::util::InputBuffer &buffer, size_t rdata_len)
virtual void toWire(AbstractMessageRenderer &renderer) const
Render the Rdata in the wire format into a MessageRenderer object.
virtual int compare(const Rdata &other) const
Compare two instances of Rdata.
A(MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
virtual std::string toText() const
Convert an Rdata to a string.
virtual int compare(const Rdata &other) const
Compare two instances of Rdata.
virtual void toWire(isc::util::OutputBuffer &buffer) const
Render the Rdata in the wire format into a buffer.
DHCID(isc::util::InputBuffer &buffer, size_t rdata_len)
virtual std::string toText() const
Convert an Rdata to a string.
DHCID(const DHCID &other)
DHCID(const std::string &type_str)
virtual void toWire(AbstractMessageRenderer &renderer) const
Render the Rdata in the wire format into a MessageRenderer object.
const std::vector< uint8_t > & getDigest() const
Return the digest.
DHCID(MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
Name createNameFromLexer(MasterLexer &lexer, const Name *origin)
Construct a Name object using a master lexer and optional origin.
Defines the logger used by the top-level component of kea-lfc.
A simple representation of a range of a string.
size_t len
The length of the string in bytes.
const char * beg
The start address of the string.