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