Kea 2.7.5
|
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 uint32_t | getRdataCount () const |
Returns the number of Rdata objects contained in the RRset . | |
virtual uint16_t | getLength () const |
Get the wire format length of the BasicRRset . | |
virtual const Name & | getName () const |
Returns the owner name of the RRset . | |
virtual const RRClass & | getClass () const |
Returns the RR Class of the RRset . | |
virtual const RRType & | getType () const |
Returns the RR Type of the RRset . | |
virtual const RRTTL & | getTTL () const |
Returns the TTL of the RRset . | |
virtual void | setTTL (const RRTTL &ttl) |
Updates the TTL of the RRset . | |
Converter Methods | |
virtual std::string | toText () const |
Convert the RRset to a string. | |
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. | |
RDATA manipulation methods | |
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 . | |
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. | |
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. | |
virtual uint32_t | getRRsigDataCount () const |
Returns the number of RRSIG records associated with the RRset . | |
virtual void | addRRsig (const rdata::ConstRdataPtr &) |
Adds RRSIG RRset RRs to the associated RRSIG RRset. | |
virtual void | addRRsig (const rdata::RdataPtr &) |
Adds RRSIG RRset RRs to the associated RRSIG RRset. | |
virtual void | addRRsig (const AbstractRRset &) |
Adds RRSIG RRset RRs to the associated RRSIG RRset. | |
virtual void | addRRsig (const ConstRRsetPtr &) |
Adds RRSIG RRset RRs to the associated RRSIG RRset. | |
virtual void | addRRsig (const RRsetPtr &) |
Adds RRSIG RRset RRs to the associated RRSIG RRset. | |
virtual void | removeRRsig () |
Clear the RRSIGs for this RRset. | |
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. | |
virtual | ~BasicRRset () |
The destructor. | |
Additional Inherited Members | |
Protected Member Functions inherited from isc::dns::AbstractRRset | |
AbstractRRset () | |
The default constructor. | |
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 (reference version).
This method simply uses the default implementation. See AbstractRRset::addRdata(const rdata::Rdata&)
.
Implements isc::dns::AbstractRRset.
Definition at line 245 of file rrset.cc.
References isc::dns::AbstractRRset::addRdata().
|
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 250 of file rrset.cc.
References addRdata(), isc::dns::rdata::createRdata(), getClass(), and getType().
|
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.
Definition at line 240 of file rrset.cc.
Referenced by addRdata().
|
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 815 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 820 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.
rdata | Pointer to RRSIG rdata to be added. |
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
Definition at line 805 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 810 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 825 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 265 of file rrset.cc.
Referenced by addRdata(), isc::dns::RRset::addRRsig(), isc::dns::RRset::addRRsig(), and getLength().
|
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 290 of file rrset.cc.
References isc::dns::RRClass::ANY(), getClass(), getName(), getRdataIterator(), isc_throw, isc_throw_assert, and isc::dns::RRClass::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 260 of file rrset.cc.
Referenced by isc::dns::RRset::addRRsig(), isc::dns::RRset::addRRsig(), and getLength().
|
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 255 of file rrset.cc.
Referenced by isc::dns::RRset::toWire(), and 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 460 of file rrset.cc.
Referenced by getLength().
|
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 275 of file rrset.cc.
Referenced by isc::dns::RRset::addRRsig(), and isc::dns::RRset::addRRsig().
|
virtual |
Returns the RR Type of the RRset
.
This method never throws an exception.
Implements isc::dns::AbstractRRset.
Definition at line 270 of file rrset.cc.
Referenced by addRdata().
|
inlinevirtual |
Clear the RRSIGs for this RRset.
Implements isc::dns::AbstractRRset.
Reimplemented in isc::dns::RRset.
Definition at line 830 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 280 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.
Definition at line 285 of file rrset.cc.
References isc::dns::AbstractRRset::toText().
|
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 339 of file rrset.cc.
Referenced by isc::dns::RRset::toWire(), and 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.
Definition at line 334 of file rrset.cc.
References isc::dns::AbstractRRset::toWire().