summaryrefslogtreecommitdiffstats
path: root/src/lib/dns/rdata
diff options
context:
space:
mode:
authorPaul Selkirk <pselkirk@isc.org>2013-05-06 16:28:55 +0200
committerPaul Selkirk <pselkirk@isc.org>2013-05-16 05:33:30 +0200
commit2b5052e66a62634e8da2495a0d97018a144b7919 (patch)
tree69172b3d78f68c80ff89ec301f3ea840fccd8ef7 /src/lib/dns/rdata
parent[2522] add MasterLexer constructor for RP (diff)
downloadkea-2b5052e66a62634e8da2495a0d97018a144b7919.tar.xz
kea-2b5052e66a62634e8da2495a0d97018a144b7919.zip
[2522] normalize some RP documentation comments
Diffstat (limited to 'src/lib/dns/rdata')
-rw-r--r--src/lib/dns/rdata/generic/rp_17.cc22
-rw-r--r--src/lib/dns/rdata/generic/rp_17.h10
2 files changed, 23 insertions, 9 deletions
diff --git a/src/lib/dns/rdata/generic/rp_17.cc b/src/lib/dns/rdata/generic/rp_17.cc
index b6b47cc636..82cbd998f8 100644
--- a/src/lib/dns/rdata/generic/rp_17.cc
+++ b/src/lib/dns/rdata/generic/rp_17.cc
@@ -46,9 +46,9 @@ void RP::constructFromLexer(MasterLexer& lexer, const Name* origin) {
///
/// \throw InvalidRdataText The number of RDATA fields (must be 2) is
/// incorrect.
+/// \throw std::bad_alloc Memory allocation for names fails.
/// \throw Other The constructor of the \c Name class will throw if the
/// given name is invalid.
-/// \throw std::bad_alloc Memory allocation for names fails.
RP::RP(const std::string& rp_str) :
// We cannot construct both names in the initialization list due to the
// necessary text processing, so we have to initialize them with a dummy
@@ -126,20 +126,36 @@ RP::toText() const {
return (mailbox_.toText() + " " + text_.toText());
}
+/// \brief Render the \c RP in the wire format without name compression.
+///
+/// \throw std::bad_alloc Internal resource allocation fails.
+///
+/// \param buffer An output buffer to store the wire data.
void
RP::toWire(OutputBuffer& buffer) const {
mailbox_.toWire(buffer);
text_.toWire(buffer);
}
+/// \brief Render the \c RP in the wire format with taking into account
+/// compression.
+///
+// Type RP is not "well-known", and name compression must be disabled
+// per RFC3597.
+///
+/// \throw std::bad_alloc Internal resource allocation fails.
+///
+/// \param renderer DNS message rendering context that encapsulates the
+/// output buffer and name compression information.
void
RP::toWire(AbstractMessageRenderer& renderer) const {
- // Type RP is not "well-known", and name compression must be disabled
- // per RFC3597.
renderer.writeName(mailbox_, false);
renderer.writeName(text_, false);
}
+/// \brief Compare two instances of \c RP RDATA.
+///
+/// See documentation in \c Rdata.
int
RP::compare(const Rdata& other) const {
const RP& other_rp = dynamic_cast<const RP&>(other);
diff --git a/src/lib/dns/rdata/generic/rp_17.h b/src/lib/dns/rdata/generic/rp_17.h
index 26478d856b..52157d3643 100644
--- a/src/lib/dns/rdata/generic/rp_17.h
+++ b/src/lib/dns/rdata/generic/rp_17.h
@@ -49,9 +49,8 @@ public:
/// \brief Return the value of the mailbox field.
///
- /// This method normally does not throw an exception, but if resource
- /// allocation for the returned \c Name object fails, a corresponding
- /// standard exception will be thrown.
+ /// \throw std::bad_alloc If resource allocation for the returned
+ /// \c Name fails.
///
/// \note
/// Unlike the case of some other RDATA classes (such as
@@ -69,9 +68,8 @@ public:
/// \brief Return the value of the text field.
///
- /// This method normally does not throw an exception, but if resource
- /// allocation for the returned \c Name object fails, a corresponding
- /// standard exception will be thrown.
+ /// \throw std::bad_alloc If resource allocation for the returned
+ /// \c Name fails.
Name getText() const { return (text_); }
private: