Kea
1.9.9-git
|
The BasicRRset
class is a concrete derived class of AbstractRRset
that defines a straightforward RRset implementation.
More...
#include <rrset.h>
Public Member Functions | |
Getter and Setter Methods | |
virtual unsigned int | getRdataCount () const |
Returns the number of Rdata objects contained in the RRset . More... | |
virtual uint16_t | getLength () const |
Get the wire format length of the BasicRRset . More... | |
virtual const Name & | getName () const |
Returns the owner name of the RRset . More... | |
virtual const RRClass & | getClass () const |
Returns the RR Class of the RRset . More... | |
virtual const RRType & | getType () const |
Returns the RR Type of the RRset . More... | |
virtual const RRTTL & | getTTL () const |
Returns the TTL of the RRset . More... | |
virtual void | setTTL (const RRTTL &ttl) |
Updates the TTL of the RRset . More... | |
Converter Methods | |
virtual std::string | toText () const |
Convert the RRset to a string. 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... | |
RDATA manipulation methods | |
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... | |
Associated RRSIG methods | |
The associated RRSIG RRset is not supported in BasicRRset. For ease of use, getRRsig() returns a null pointer (indicating no RRset). The addRRsig()/removeRRsig() methods throw a "NotImplemented" exception - if you are using a BasicRRset, you should not be trying to modify signatures on it. | |
virtual RRsetPtr | getRRsig () const |
Return 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 | addRRsig (const rdata::ConstRdataPtr &) |
Adds RRSIG RRset RRs to the associated RRSIG RRset. More... | |
virtual void | addRRsig (const rdata::RdataPtr &) |
Adds RRSIG RRset RRs to the associated RRSIG RRset. More... | |
virtual void | addRRsig (const AbstractRRset &) |
Adds RRSIG RRset RRs to the associated RRSIG RRset. More... | |
virtual void | addRRsig (const ConstRRsetPtr &) |
Adds RRSIG RRset RRs to the associated RRSIG RRset. More... | |
virtual void | addRRsig (const RRsetPtr &) |
Adds RRSIG RRset RRs to the associated RRSIG RRset. More... | |
virtual void | removeRRsig () |
Clear the RRSIGs for this RRset. 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... | |
Constructors and Destructor | |
Note: The copy constructor and the assignment operator are intentionally defined as private. The intended use case wouldn't require copies of a | |
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... | |
Additional Inherited Members | |
Protected Member Functions inherited from isc::dns::AbstractRRset | |
AbstractRRset () | |
The default constructor. More... | |
The BasicRRset
class is a concrete derived class of AbstractRRset
that defines a straightforward RRset implementation.
This class is designed to be as portable as possible, and so it adopts the Pimpl idiom to hide as many details as possible. Performance is a secondary concern for this class.
This class is intended to be used by applications that only need moderate level of performance with full functionality provided by the AbstractRRset
interfaces. Highly performance-sensitive applications, such as a large scale authoritative or caching name servers will implement and use a customized version of derived AbstractRRset
class.
isc::dns::BasicRRset::BasicRRset | ( | const Name & | name, |
const RRClass & | rrclass, | ||
const RRType & | rrtype, | ||
const RRTTL & | ttl | ||
) |
Constructor from (mostly) fixed parameters of the RRset.
This constructor is normally expected to be exception free, but copying the name may involve resource allocation, and if it fails the corresponding standard exception will be thrown.
|
virtual |
|
virtual |
Add an RDATA to the RRset (pointer version).
This method is normally expected to be exception free, but it may involve resource allocation, and if it fails the corresponding standard exception will be thrown.
rdata | A pointer (like) type of rdata::RdataPtr to be added to the BasicRRset . |
Implements isc::dns::AbstractRRset.
|
virtual |
Add an RDATA to the RRset (reference version).
This method simply uses the default implementation. See AbstractRRset::addRdata(const rdata::Rdata&)
.
Implements isc::dns::AbstractRRset.
|
virtual |
Add an RDATA to the RRset (string version).
rdata_str | RDATA string in presentation format. |
InvalidRdataText | if the rdata_str is invalid for this RRset . |
Implements isc::dns::AbstractRRset.
Definition at line 252 of file rrset.cc.
References isc::dns::rdata::createRdata().
|
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.
rdata | Pointer to RRSIG rdata to be added. |
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
Definition at line 808 of file rrset.h.
References isc_throw.
|
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>.)
rdata | Pointer to RRSIG rdata to be added. |
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
Definition at line 813 of file rrset.h.
References isc_throw.
|
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.
sigs | RRSIG RRset containing signatures to be added to the RRSIG RRset associated with this class. |
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
Definition at line 818 of file rrset.h.
References isc_throw.
|
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.
sigs | Pointer to a RRSIG RRset containing signatures to be added to the RRSIG RRset associated with this class. |
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
Definition at line 823 of file rrset.h.
References isc_throw.
|
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>.)
sigs | Pointer to a RRSIG RRset containing signatures to be added to the RRSIG RRset associated with this class. |
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
Definition at line 828 of file rrset.h.
References isc_throw.
|
virtual |
Returns the RR Class of the RRset
.
This method never throws an exception.
Implements isc::dns::AbstractRRset.
Definition at line 267 of file rrset.cc.
Referenced by isc::dns::RRset::addRRsig().
|
virtual |
Get the wire format length of the BasicRRset
.
BasicRRset
. EmptyRRset | if the BasicRRset is empty. |
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
Definition at line 292 of file rrset.cc.
References isc_throw, and isc::log::NONE.
Referenced by isc::dns::RRset::getLength().
|
virtual |
Returns the owner name of the RRset
.
This method never throws an exception.
Implements isc::dns::AbstractRRset.
Definition at line 262 of file rrset.cc.
Referenced by isc::dns::RRset::addRRsig().
|
virtual |
Returns the number of Rdata
objects contained in the RRset
.
This method never throws an exception.
Rdata
objects contained. Implements isc::dns::AbstractRRset.
Definition at line 257 of file rrset.cc.
Referenced by isc::dns::RRset::toWire().
|
virtual |
Return an iterator to go through all RDATA stored in the BasicRRset
.
This is a concrete derived implementation of AbstractRRset::getRdataIterator()
.
This method dynamically allocates resources. If it fails it will throw the corresponding standard exception. The iterator methods for the BasicRRset
class are exception free.
RdataIterator
object for the BasicRRset
class. Implements isc::dns::AbstractRRset.
Definition at line 461 of file rrset.cc.
References isc::dns::BasicRRsetImpl::rdatalist_.
|
inlinevirtual |
Return pointer to this RRset's RRSIG RRset.
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
|
inlinevirtual |
Returns the number of RRSIG
records associated with the RRset
.
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
|
virtual |
Returns the TTL of the RRset
.
This method never throws an exception.
Implements isc::dns::AbstractRRset.
Definition at line 277 of file rrset.cc.
Referenced by isc::dns::RRset::addRRsig().
|
virtual |
|
inlinevirtual |
Clear the RRSIGs for this RRset.
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
Definition at line 833 of file rrset.h.
References isc_throw.
|
virtual |
Updates the TTL of the RRset
.
This method never throws an exception.
ttl | A reference to a RRTTL class object to be copied as the new TTL. |
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
Definition at line 282 of file rrset.cc.
Referenced by isc::dns::RRset::setTTL().
|
virtual |
Convert the RRset to a string.
This method simply uses the default implementation. See AbstractRRset::toText()
.
Implements isc::dns::AbstractRRset.
|
virtual |
Render the RRset in the wire format with name compression and truncation handling.
This method simply uses the default implementation. See AbstractRRset::toWire(MessageRenderer&)const
.
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
Definition at line 341 of file rrset.cc.
References isc::dns::AbstractMessageRenderer::getLengthLimit(), and isc::dns::AbstractMessageRenderer::setTruncated().
Referenced by isc::dns::RRset::toWire().
|
virtual |
Render the RRset in the wire format without any compression.
This method simply uses the default implementation. See AbstractRRset::toWire(OutputBuffer&)const
.
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.