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

Additional Inherited Members

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

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 844 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 348 of file rrset.cc.

Referenced by addRRsig(), and addRRsig().

◆ ~RRset()

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

Definition at line 353 of file rrset.cc.

Member Function Documentation

◆ addRRsig() [1/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 896 of file rrset.h.

References RRset(), isc::dns::BasicRRset::getClass(), isc::dns::BasicRRset::getName(), isc::dns::BasicRRset::getTTL(), and isc::dns::RRType::RRSIG().

+ Here is the call graph for this function:

◆ addRRsig() [2/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 909 of file rrset.h.

References addRRsig().

Referenced by addRRsig().

+ Here is the call graph for this function:

◆ addRRsig() [3/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 878 of file rrset.h.

References RRset(), isc::dns::BasicRRset::getClass(), isc::dns::BasicRRset::getName(), isc::dns::BasicRRset::getTTL(), and isc::dns::RRType::RRSIG().

Referenced by addRRsig().

+ Here is the call graph for this function:

◆ addRRsig() [4/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 890 of file rrset.h.

References 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 912 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 366 of file rrset.cc.

References isc::dns::BasicRRset::getLength(), and isc_throw_assert.

+ 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 918 of file rrset.h.

◆ getRRsigDataCount()

uint32_t 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 357 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 915 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 870 of file rrset.h.

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

+ Here is the call graph for this function:

◆ toWire() [1/2]

uint32_t 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 395 of file rrset.cc.

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

+ Here is the call graph for this function:

◆ toWire() [2/2]

uint32_t 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 381 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: