Kea
1.9.9-git
|
rdata::generic::RP
class represents the RP RDATA as defined in RFC1183.
More...
#include <rdataclass.h>
Public Member Functions | |
RP (const std::string &type_str) | |
RP (isc::util::InputBuffer &buffer, size_t rdata_len) | |
RP (const RP &other) | |
RP (MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks) | |
RP (const Name &mailbox, const Name &text) | |
We use the default copy constructor and assignment operator. More... | |
virtual int | compare (const Rdata &other) const |
Compare two instances of Rdata . More... | |
Name | getMailbox () const |
Return the value of the mailbox field. More... | |
Name | getText () const |
Return the value of the text field. More... | |
virtual std::string | toText () const |
Convert an Rdata to a string. More... | |
virtual void | toWire (isc::util::OutputBuffer &buffer) const |
Render the Rdata in the wire format into a buffer. More... | |
virtual void | toWire (AbstractMessageRenderer &renderer) const |
Render the Rdata in the wire format into a MessageRenderer object. More... | |
Public Member Functions inherited from isc::dns::rdata::Rdata | |
virtual uint16_t | getLength () const |
Get the wire format length of an Rdata. More... | |
virtual | ~Rdata () |
The destructor. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from isc::dns::rdata::Rdata | |
Rdata () | |
The default constructor. More... | |
rdata::generic::RP
class represents the RP RDATA as defined in RFC1183.
This class implements the basic interfaces inherited from the abstract rdata::Rdata
class, and provides trivial accessors specific to the RP RDATA.
Definition at line 1678 of file rdataclass.h.
|
explicit |
isc::dns::rdata::generic::RP::RP | ( | isc::util::InputBuffer & | buffer, |
size_t | rdata_len | ||
) |
isc::dns::rdata::generic::RP::RP | ( | const RP & | other | ) |
isc::dns::rdata::generic::RP::RP | ( | MasterLexer & | lexer, |
const Name * | name, | ||
MasterLoader::Options | options, | ||
MasterLoaderCallbacks & | callbacks | ||
) |
We use the default copy constructor and assignment operator.
Constructor from RDATA field parameters.
The parameters are a straightforward mapping of RP RDATA fields as defined in RFC1183.
Definition at line 1701 of file rdataclass.h.
|
virtual |
Compare two instances of Rdata
.
This method compares this
and the other
Rdata objects in terms of the DNSSEC sorting order as defined in RFC4034, and returns the result as an integer.
This is a pure virtual method without the definition; the actual comparison logic is specific to each derived concrete class and should be explicitly defined in the derived class.
Specific implementations of this method must confirm that this
and the other
are objects of the same concrete derived class of Rdata
. This is normally done by dynamic_cast
in the implementation. It also means if the assumption isn't met an exception of class std::bad_cast
will be thrown.
Here is an implementation choice: instead of relying on dynamic_cast
, we could first convert the data into wire-format and compare the pair as opaque data. This would be more polymorphic, but might involve significant overhead, especially for a large size of RDATA.
other | the right-hand operand to compare against. |
this
would be sorted before other
. this
is identical to other
in terms of sorting order. this
would be sorted after other
. Implements isc::dns::rdata::Rdata.
|
inline |
Return the value of the mailbox field.
std::bad_alloc | If resource allocation for the returned Name fails. |
NS::getNSName()
), this method constructs a new Name
object and returns it, instead of returning a reference to a Name
object internally maintained in the class (which is a private member). This is based on the observation that this method will be rarely used and even when it's used it will not be in a performance context (for example, a recursive resolver won't need this field in its resolution process). By returning a new object we have flexibility of changing the internal representation without the risk of changing the interface or method property. The same note applies to the getText()
method. Definition at line 1722 of file rdataclass.h.
|
inline |
Return the value of the text field.
std::bad_alloc | If resource allocation for the returned Name fails. |
Definition at line 1728 of file rdataclass.h.
|
virtual |
Convert an Rdata
to a string.
This method returns a std::string
object representing the Rdata
.
This is a pure virtual method without the definition; the actual representation is specific to each derived concrete class and should be explicitly defined in the derived class.
Rdata
. Implements isc::dns::rdata::Rdata.
|
virtual |
Render the Rdata
in the wire format into a buffer.
This is a pure virtual method without the definition; the actual conversion is specific to each derived concrete class and should be explicitly defined in the derived class.
buffer | An output buffer to store the wire data. |
Implements isc::dns::rdata::Rdata.
|
virtual |
Render the Rdata
in the wire format into a MessageRenderer
object.
This is a pure virtual method without the definition; the actual conversion is specific to each derived concrete class and should be explicitly defined in the derived class.
renderer | DNS message rendering context that encapsulates the output buffer in which the Rdata is to be stored. |
Implements isc::dns::rdata::Rdata.