BIND 10 trac2384, updated. 8f2d93292adc4282298bd82b7d4cb83f362d502e [2384] Document the use of units in TTL
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Nov 7 09:45:50 UTC 2012
The branch, trac2384 has been updated
via 8f2d93292adc4282298bd82b7d4cb83f362d502e (commit)
from 0acf96a8951dc132f064c28b12971f4060531f2f (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 8f2d93292adc4282298bd82b7d4cb83f362d502e
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Wed Nov 7 10:45:32 2012 +0100
[2384] Document the use of units in TTL
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/rrttl.h | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/rrttl.h b/src/lib/dns/rrttl.h
index 62bf886..3b2bf42 100644
--- a/src/lib/dns/rrttl.h
+++ b/src/lib/dns/rrttl.h
@@ -74,15 +74,18 @@ public:
explicit RRTTL(uint32_t ttlval) : ttlval_(ttlval) {}
/// Constructor from a string.
///
- /// This version of the implementation only accepts decimal TTL values in
- /// seconds.
- /// In a near future version, we'll extend it so that we can accept more
- /// convenient ones such as "2H" or "1D".
- ///
- /// If the given string is not recognized as a valid representation of
- /// an RR TTL, an exception of class \c InvalidRRTTL will be thrown.
- ///
- /// \param ttlstr A string representation of the \c RRTTL
+ /// It accepts either a decimal number, specifying number of seconds. Or,
+ /// it can be given a sequence of numbers and units, like "2H" (meaning
+ /// two hours), "1W3D" (one week and 3 days). The allowed units are W, D,
+ /// H, M and S. They can be also specified in lower-case. No further
+ /// restrictions are checked (so they can be specified in arbitrary order
+ /// and even things like "1D1D" can be used to specify two days). The
+ /// unit at the last number can be omitted in case it is seconds.
+ ///
+ /// \param ttlstr A string representation of the \c RRTTL.
+ ///
+ /// \throw InvalidRRTTL in case the string is not recognized as valid
+ /// TTL representation.
explicit RRTTL(const std::string& ttlstr);
/// Constructor from wire-format data.
///
More information about the bind10-changes
mailing list