Kea  2.3.5-git
isc::dns::RRset Class Reference

The RRset class is a concrete derived class of BasicRRset which contains a pointer to an additional RRset containing associated RRSIG records. More...

#include <rrset.h>

+ Inheritance diagram for isc::dns::RRset:

Public Member Functions

 RRset (const Name &name, const RRClass &rrclass, const RRType &rrtype, const RRTTL &ttl)
 
virtual ~RRset ()
 
virtual void addRRsig (const rdata::ConstRdataPtr &rdata)
 Adds an RRSIG RR to this RRset's signatures. More...
 
virtual void addRRsig (const rdata::RdataPtr &rdata)
 Adds RRSIG RRset RRs to the associated RRSIG RRset. More...
 
virtual void addRRsig (const AbstractRRset &sigs)
 Adds an RRSIG RRset to this RRset. More...
 
virtual void addRRsig (const ConstRRsetPtr &sigs)
 Adds RRSIG RRset RRs to the associated RRSIG RRset. More...
 
virtual void addRRsig (const RRsetPtr &sigs)
 Adds RRSIG RRset RRs to the associated RRSIG RRset. More...
 
virtual uint16_t getLength () const
 Get the wire format length of the RRset. More...
 
virtual RRsetPtr getRRsig () const
 Return a pointer to this RRset's RRSIG RRset. More...
 
virtual unsigned int getRRsigDataCount () const
 Returns the number of RRSIG records associated with the RRset. More...
 
virtual void removeRRsig ()
 Clear the RRSIGs for this RRset. More...
 
virtual void setTTL (const RRTTL &ttl)
 Updates the owner name of the RRset, including RRSIGs if any. More...
 
virtual unsigned int toWire (AbstractMessageRenderer &renderer) const
 Render the RRset in the wire format with name compression and truncation handling. More...
 
virtual unsigned int toWire (isc::util::OutputBuffer &buffer) const
 Render the RRset in the wire format without any compression. More...
 
- Public Member Functions inherited from isc::dns::BasicRRset
virtual unsigned int getRdataCount () const
 Returns the number of Rdata objects contained in the RRset. More...
 
virtual const NamegetName () const
 Returns the owner name of the RRset. More...
 
virtual const RRClassgetClass () const
 Returns the RR Class of the RRset. More...
 
virtual const RRTypegetType () const
 Returns the RR Type of the RRset. More...
 
virtual const RRTTLgetTTL () const
 Returns the TTL of the RRset. More...
 
virtual std::string toText () const
 Convert the RRset to a string. More...
 
virtual void addRdata (rdata::ConstRdataPtr rdata)
 Add an RDATA to the RRset (pointer version). More...
 
virtual void addRdata (const rdata::Rdata &rdata)
 Add an RDATA to the RRset (reference version). More...
 
virtual void addRdata (const std::string &rdata_str)
 Add an RDATA to the RRset (string version). More...
 
virtual RdataIteratorPtr getRdataIterator () const
 Return an iterator to go through all RDATA stored in the BasicRRset. More...
 
 BasicRRset (const Name &name, const RRClass &rrclass, const RRType &rrtype, const RRTTL &ttl)
 Constructor from (mostly) fixed parameters of the RRset. More...
 
virtual ~BasicRRset ()
 The destructor. More...
 
- Public Member Functions inherited from isc::dns::AbstractRRset
virtual bool isSameKind (const AbstractRRset &other) const
 Check whether two RRsets are of the same kind. More...
 
virtual ~AbstractRRset ()
 The destructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from isc::dns::AbstractRRset
 AbstractRRset ()
 The default constructor. More...
 

Detailed Description

The RRset class is a concrete derived class of BasicRRset which contains a pointer to an additional RRset containing associated RRSIG records.

This allows DNSSEC aware applications to treat data associated with a particular QNAME/QTYPE/QCLASS as a single object.

Definition at line 847 of file rrset.h.

Constructor & Destructor Documentation

◆ RRset()

isc::dns::RRset::RRset ( const Name name,
const RRClass rrclass,
const RRType rrtype,
const RRTTL ttl 
)

Definition at line 350 of file rrset.cc.

◆ ~RRset()

isc::dns::RRset::~RRset ( )
virtual

Definition at line 357 of file rrset.cc.

Member Function Documentation

◆ addRRsig() [1/5]

virtual void isc::dns::RRset::addRRsig ( const rdata::ConstRdataPtr rdata)
inlinevirtual

Adds an RRSIG RR to this RRset's signatures.

Reimplemented from isc::dns::BasicRRset.

Definition at line 881 of file rrset.h.

◆ addRRsig() [2/5]

virtual void isc::dns::RRset::addRRsig ( const rdata::RdataPtr rdata)
inlinevirtual

Adds RRSIG RRset RRs to the associated RRSIG RRset.

Adds the (assumed) RRSIG rdata the RRSIG RRset associated with this RRset. If one does not exist, it is created using the data given.

(This overload is for an older version of boost that doesn't support conversion from shared_ptr<X> to shared_ptr<const X>.)

Parameters
rdataPointer to RRSIG rdata to be added.

Reimplemented from isc::dns::BasicRRset.

Definition at line 893 of file rrset.h.

◆ addRRsig() [3/5]

virtual void isc::dns::RRset::addRRsig ( const AbstractRRset sigs)
inlinevirtual

Adds an RRSIG RRset to this RRset.

Reimplemented from isc::dns::BasicRRset.

Definition at line 899 of file rrset.h.

References isc::dns::AbstractRRset::getRdataIterator().

+ Here is the call graph for this function:

◆ addRRsig() [4/5]

virtual void isc::dns::RRset::addRRsig ( const ConstRRsetPtr sigs)
inlinevirtual

Adds RRSIG RRset RRs to the associated RRSIG RRset.

Adds the signatures in the given (assumed) RRSIG RRset to the RRSIG RRset associated with this RRset. If one does not exist, it is created using the data given.

Parameters
sigsPointer to a RRSIG RRset containing signatures to be added to the RRSIG RRset associated with this class.

Reimplemented from isc::dns::BasicRRset.

Definition at line 912 of file rrset.h.

References addRRsig().

Referenced by addRRsig().

+ Here is the call graph for this function:

◆ addRRsig() [5/5]

virtual void isc::dns::RRset::addRRsig ( const RRsetPtr sigs)
inlinevirtual

Adds RRSIG RRset RRs to the associated RRSIG RRset.

Adds the signatures in the given (assumed) RRSIG RRset to the RRSIG RRset associated with this RRset. If one does not exist, it is created using the data given.

(This overload is for an older version of boost that doesn't support conversion from shared_ptr<X> to shared_ptr<const X>.)

Parameters
sigsPointer to a RRSIG RRset containing signatures to be added to the RRSIG RRset associated with this class.

Reimplemented from isc::dns::BasicRRset.

Definition at line 915 of file rrset.h.

References addRRsig().

Referenced by addRRsig().

+ Here is the call graph for this function:

◆ getLength()

uint16_t isc::dns::RRset::getLength ( ) const
virtual

Get the wire format length of the RRset.

Returns
The length of the wire format representation of the RRset.
Exceptions
EmptyRRsetif the RRset is empty.

Reimplemented from isc::dns::BasicRRset.

Definition at line 369 of file rrset.cc.

References isc::dns::BasicRRset::getLength().

+ Here is the call graph for this function:

◆ getRRsig()

virtual RRsetPtr isc::dns::RRset::getRRsig ( ) const
inlinevirtual

Return a pointer to this RRset's RRSIG RRset.

Reimplemented from isc::dns::BasicRRset.

Definition at line 921 of file rrset.h.

References isc::util::operator<<().

+ Here is the call graph for this function:

◆ getRRsigDataCount()

unsigned int isc::dns::RRset::getRRsigDataCount ( ) const
virtual

Returns the number of RRSIG records associated with the RRset.

Note that an RRset with no RRSIG records may exist, so this method may return 0.

Returns
The number of RRSIG records associated.

Reimplemented from isc::dns::BasicRRset.

Definition at line 360 of file rrset.cc.

Referenced by toWire().

◆ removeRRsig()

virtual void isc::dns::RRset::removeRRsig ( )
inlinevirtual

Clear the RRSIGs for this RRset.

Reimplemented from isc::dns::BasicRRset.

Definition at line 918 of file rrset.h.

◆ setTTL()

virtual void isc::dns::RRset::setTTL ( const RRTTL ttl)
inlinevirtual

Updates the owner name of the RRset, including RRSIGs if any.

Reimplemented from isc::dns::BasicRRset.

Definition at line 873 of file rrset.h.

◆ toWire() [1/2]

unsigned int isc::dns::RRset::toWire ( AbstractMessageRenderer renderer) const
virtual

Render the RRset in the wire format with name compression and truncation handling.

See AbstractRRset::toWire(MessageRenderer&)const.

Reimplemented from isc::dns::BasicRRset.

Definition at line 398 of file rrset.cc.

References isc::dns::BasicRRset::getRdataCount(), getRRsigDataCount(), isc::dns::AbstractMessageRenderer::setTruncated(), and isc::dns::BasicRRset::toWire().

+ Here is the call graph for this function:

◆ toWire() [2/2]

unsigned int isc::dns::RRset::toWire ( isc::util::OutputBuffer buffer) const
virtual

Render the RRset in the wire format without any compression.

See AbstractRRset::toWire(OutputBuffer&)const.

Reimplemented from isc::dns::BasicRRset.

Definition at line 384 of file rrset.cc.

References isc::dns::BasicRRset::getRdataCount(), and isc::dns::BasicRRset::toWire().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: