13#include <boost/shared_ptr.hpp>
39class AbstractMessageRenderer;
50typedef boost::shared_ptr<AbstractRRset>
RRsetPtr;
285 virtual std::string
toText()
const = 0;
401 virtual void addRdata(
const std::string& rdata_str) = 0;
722 virtual std::string
toText()
const;
763 virtual void addRdata(
const std::string& rdata_str);
807 "BasicRRset does not implement the addRRsig() method");
812 "BasicRRset does not implement the addRRsig() method");
817 "BasicRRset does not implement the addRRsig() method");
822 "BasicRRset does not implement the addRRsig() method");
827 "BasicRRset does not implement the addRRsig() method");
832 "BasicRRset does not implement the removeRRsig() method");
836 boost::shared_ptr<BasicRRsetImpl> impl_;
883 rrsig_->addRdata(rdata);
904 for (it->first(); !it->isLast(); it->next()) {
905 rrsig_->addRdata(it->getCurrent());
948std::ostream&
operator<<(std::ostream& os,
const AbstractRRset& rrset);
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
A generic exception that is thrown when a function is not implemented.
The AbstractMessageRenderer class is an abstract base class that provides common interfaces for rende...
The AbstractRRset class is an abstract base class that models a DNS RRset.
AbstractRRset()
The default constructor.
virtual uint32_t toWire(AbstractMessageRenderer &renderer) const =0
Render the RRset in the wire format with name compression and truncation handling.
virtual const RRType & getType() const =0
Returns the RR Type of the RRset.
virtual uint32_t getRdataCount() const =0
Returns the number of Rdata objects contained in the RRset.
virtual std::string toText() const =0
Convert the RRset to a string.
virtual void addRRsig(const ConstRRsetPtr &sigs)=0
Adds RRSIG RRset RRs to the associated RRSIG RRset.
virtual void addRRsig(const rdata::ConstRdataPtr &rdata)=0
Adds RRSIG RRset RRs to the associated RRSIG RRset.
virtual uint16_t getLength() const =0
Get the wire format length of the AbstractRRset.
virtual bool isSameKind(const AbstractRRset &other) const
Check whether two RRsets are of the same kind.
virtual RRsetPtr getRRsig() const =0
Return pointer to this RRset's RRSIG RRset.
virtual void addRdata(const std::string &rdata_str)=0
Add an RDATA to the RRset (string version).
virtual void setTTL(const RRTTL &ttl)=0
Updates the TTL of the RRset.
virtual const Name & getName() const =0
Returns the owner name of the RRset.
virtual const RRTTL & getTTL() const =0
Returns the TTL of the RRset.
virtual RdataIteratorPtr getRdataIterator() const =0
Return an iterator to go through all RDATA stored in the RRset.
virtual void addRRsig(const rdata::RdataPtr &rdata)=0
Adds RRSIG RRset RRs to the associated RRSIG RRset.
virtual ~AbstractRRset()
The destructor.
virtual void addRdata(rdata::ConstRdataPtr rdata)=0
Add an RDATA to the RRset (pointer version).
virtual const RRClass & getClass() const =0
Returns the RR Class of the RRset.
virtual uint32_t getRRsigDataCount() const =0
Returns the number of RRSIG records associated with the RRset.
virtual void removeRRsig()=0
Clear the RRSIGs for this RRset.
virtual void addRRsig(const RRsetPtr &sigs)=0
Adds RRSIG RRset RRs to the associated RRSIG RRset.
virtual void addRRsig(const AbstractRRset &sigs)=0
Adds RRSIG RRset RRs to the associated RRSIG RRset.
The BasicRRset class is a concrete derived class of AbstractRRset that defines a straightforward RRse...
virtual void removeRRsig()
Clear the RRSIGs for this RRset.
virtual RdataIteratorPtr getRdataIterator() const
Return an iterator to go through all RDATA stored in the BasicRRset.
virtual const RRTTL & getTTL() const
Returns the TTL of the RRset.
virtual void addRRsig(const ConstRRsetPtr &)
Adds RRSIG RRset RRs to the associated RRSIG RRset.
virtual void addRRsig(const rdata::ConstRdataPtr &)
Adds RRSIG RRset RRs to the associated RRSIG RRset.
virtual void addRRsig(const AbstractRRset &)
Adds RRSIG RRset RRs to the associated RRSIG RRset.
virtual uint32_t getRRsigDataCount() const
Returns the number of RRSIG records associated with the RRset.
virtual void addRdata(rdata::ConstRdataPtr rdata)
Add an RDATA to the RRset (pointer version).
virtual void addRRsig(const rdata::RdataPtr &)
Adds RRSIG RRset RRs to the associated RRSIG RRset.
virtual uint32_t getRdataCount() const
Returns the number of Rdata objects contained in the RRset.
virtual ~BasicRRset()
The destructor.
virtual void addRRsig(const RRsetPtr &)
Adds RRSIG RRset RRs to the associated RRSIG RRset.
virtual void setTTL(const RRTTL &ttl)
Updates the TTL of the RRset.
virtual const RRType & getType() const
Returns the RR Type of the RRset.
virtual uint16_t getLength() const
Get the wire format length of the BasicRRset.
virtual const RRClass & getClass() const
Returns the RR Class of the RRset.
virtual RRsetPtr getRRsig() const
Return pointer to this RRset's RRSIG RRset.
virtual const Name & getName() const
Returns the owner name of the RRset.
virtual uint32_t toWire(AbstractMessageRenderer &renderer) const
Render the RRset in the wire format with name compression and truncation handling.
virtual std::string toText() const
Convert the RRset to a string.
A standard DNS module exception that is thrown if an RRset object does not contain any RDATA where re...
EmptyRRset(const char *file, size_t line, const char *what)
The Name class encapsulates DNS names.
The RRClass class encapsulates DNS resource record classes.
The RRTTL class encapsulates TTLs used in DNS resource records.
The RRType class encapsulates DNS resource record types.
static const RRType & RRSIG()
The RRset class is a concrete derived class of BasicRRset which contains a pointer to an additional R...
virtual uint16_t getLength() const
Get the wire format length of the RRset.
virtual void addRRsig(const rdata::ConstRdataPtr &rdata)
Adds an RRSIG RR to this RRset's signatures.
virtual void setTTL(const RRTTL &ttl)
Updates the owner name of the RRset, including RRSIGs if any.
virtual RRsetPtr getRRsig() const
Return a pointer to this RRset's RRSIG RRset.
RRset(const Name &name, const RRClass &rrclass, const RRType &rrtype, const RRTTL &ttl)
virtual void addRRsig(const ConstRRsetPtr &sigs)
Adds RRSIG RRset RRs to the associated RRSIG RRset.
virtual uint32_t toWire(AbstractMessageRenderer &renderer) const
Render the RRset in the wire format with name compression and truncation handling.
virtual void addRRsig(const RRsetPtr &sigs)
Adds RRSIG RRset RRs to the associated RRSIG RRset.
virtual void removeRRsig()
Clear the RRSIGs for this RRset.
virtual void addRRsig(const rdata::RdataPtr &rdata)
Adds RRSIG RRset RRs to the associated RRSIG RRset.
virtual void addRRsig(const AbstractRRset &sigs)
Adds an RRSIG RRset to this RRset.
virtual uint32_t getRRsigDataCount() const
Returns the number of RRSIG records associated with the RRset.
The RdataIterator class is an abstract base class that provides an interface for accessing RDATA obje...
virtual const rdata::Rdata & getCurrent() const =0
Return the current Rdata corresponding to the rdata cursor.
virtual bool isLast() const =0
Return true iff the rdata cursor has reached the end of the rdata list.
virtual ~RdataIterator()
Destructor.
RdataIterator()
The default constructor.
virtual void first()=0
Move the rdata cursor to the first RDATA in the rdata list (if any).
virtual void next()=0
Move the rdata cursor to the next RDATA in the rdata list (if any).
The Rdata class is an abstract base class that provides a set of common interfaces to manipulate conc...
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< const Rdata > ConstRdataPtr
boost::shared_ptr< Rdata > RdataPtr
The RdataPtr type is a pointer-like type, pointing to an object of some concrete derived class of Rda...
boost::shared_ptr< AbstractRRset > RRsetPtr
A pointer-like type pointing to an RRset object.
ostream & operator<<(std::ostream &os, const EDNS &edns)
Insert the EDNS as a string into stream.
boost::shared_ptr< RdataIterator > RdataIteratorPtr
A pointer-like type point to an RdataIterator object.
boost::shared_ptr< const AbstractRRset > ConstRRsetPtr
A pointer-like type pointing to an (immutable) RRset object.
Defines the logger used by the top-level component of kea-lfc.