BIND 10 trac2656_2, updated. d8c50d0baef0ad3a1339b1c03bd0d37a32719d86 [2656] Add/update API doc for SRV constructors
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Jan 29 07:58:40 UTC 2013
The branch, trac2656_2 has been updated
via d8c50d0baef0ad3a1339b1c03bd0d37a32719d86 (commit)
from 7e110b499a751ca43a473a94eb4448bdbe78a32a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d8c50d0baef0ad3a1339b1c03bd0d37a32719d86
Author: Mukund Sivaraman <muks at isc.org>
Date: Tue Jan 29 13:28:23 2013 +0530
[2656] Add/update API doc for SRV constructors
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/rdata/in_1/srv_33.cc | 45 ++++++++++++++++++++++++--------------
1 file changed, 29 insertions(+), 16 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/rdata/in_1/srv_33.cc b/src/lib/dns/rdata/in_1/srv_33.cc
index 17e6703..b7962d3 100644
--- a/src/lib/dns/rdata/in_1/srv_33.cc
+++ b/src/lib/dns/rdata/in_1/srv_33.cc
@@ -51,25 +51,20 @@ struct SRVImpl {
/// \brief Constructor from string.
///
-/// \c srv_str must be formatted as follows:
-/// \code <Priority> <Weight> <Port> <Target>
-/// \endcode
-/// where
-/// - <Priority>, <Weight>, and <Port> are an unsigned
-/// 16-bit decimal integer.
-/// - <Target> is a valid textual representation of domain name.
+/// The given string must represent a valid SRV RDATA. There can be extra
+/// space characters at the beginning or end of the text (which are simply
+/// ignored), but other extra text, including a new line, will make the
+/// construction fail with an exception.
///
-/// An example of valid string is:
-/// \code "1 5 1500 example.com." \endcode
+/// The TARGET name must be absolute since there's no parameter that
+/// specifies the origin name; if it is not absolute, \c MissingNameOrigin
+/// exception will be thrown. It must not be represented as a quoted
+/// string.
///
-/// <b>Exceptions</b>
+/// See the construction that takes \c MasterLexer for other fields.
///
-/// If <Target> is not a valid domain name, a corresponding exception
-/// from the \c Name class will be thrown;
-/// if %any of the other bullet points above is not met, an exception of
-/// class \c InvalidRdataText will be thrown.
-/// This constructor internally involves resource allocation, and if it fails
-/// a corresponding standard exception will be thrown.
+/// \throw Others Exception from the Name and RRTTL constructors.
+/// \throw InvalidRdataText Other general syntax errors.
SRV::SRV(const std::string& srv_str) :
impl_(NULL)
{
@@ -140,6 +135,24 @@ SRV::SRV(InputBuffer& buffer, size_t rdata_len) {
impl_ = new SRVImpl(priority, weight, port, targetname);
}
+/// \brief Constructor with a context of MasterLexer.
+///
+/// The \c lexer should point to the beginning of valid textual representation
+/// of an SRV RDATA. The TARGET field can be non-absolute if \c origin
+/// is non-NULL, in which case \c origin is used to make it absolute.
+/// It must not be represented as a quoted string.
+///
+/// The PRIORITY, WEIGHT and PORT fields must each be a valid decimal
+/// representation of an unsigned 16-bit integers respectively.
+///
+/// \throw MasterLexer::LexerError General parsing error such as missing field.
+/// \throw Other Exceptions from the Name and RRTTL constructors if
+/// construction of textual fields as these objects fail.
+///
+/// \param lexer A \c MasterLexer object parsing a master file for the
+/// RDATA to be created
+/// \param origin If non NULL, specifies the origin of TARGET when it
+/// is non-absolute.
SRV::SRV(MasterLexer& lexer, const Name* origin,
MasterLoader::Options, MasterLoaderCallbacks&)
{
More information about the bind10-changes
mailing list