 |
Kea
1.5.0
|
Go to the documentation of this file.
12 #include <boost/optional.hpp>
25 class AbstractMessageRenderer;
63 explicit RRTTL(uint32_t ttlval) : ttlval_(ttlval) {}
84 explicit RRTTL(
const std::string& ttlstr);
133 const std::string
toText()
const;
171 uint32_t
getValue()
const {
return (ttlval_); }
193 {
return (ttlval_ == other.ttlval_); }
196 {
return (ttlval_ == other.ttlval_); }
203 {
return (ttlval_ != other.ttlval_); }
206 {
return (ttlval_ != other.ttlval_); }
215 {
return (ttlval_ <= other.ttlval_); }
219 {
return (ttlval_ <= other.ttlval_); }
229 {
return (ttlval_ >= other.ttlval_); }
233 {
return (ttlval_ >= other.ttlval_); }
243 {
return (ttlval_ < other.ttlval_); }
247 {
return (ttlval_ < other.ttlval_); }
257 {
return (ttlval_ > other.ttlval_); }
261 {
return (ttlval_ > other.ttlval_); }
275 static const RRTTL max_ttl(0x7fffffff);
299 operator<<(std::ostream& os,
const RRTTL& rrttl);
InvalidRRTTL(const char *file, size_t line, const char *what)
bool lthan(const RRTTL &other) const
Less-than comparison for RRTTL against other.
bool gthan(const RRTTL &other) const
Greater-than comparison for RRTTL against other.
static RRTTL * createFromText(const std::string &ttlstr)
A separate factory of RRTTL from text.
A standard DNS module exception that is thrown if an RRTTL object is being constructed from an unreco...
The AbstractMessageRenderer class is an abstract base class that provides common interfaces for rende...
RRTTL(uint32_t ttlval)
Constructor from an integer TTL value.
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
ostream & operator<<(std::ostream &os, const EDNS &edns)
Insert the EDNS as a string into stream.
uint32_t getValue() const
Returns the TTL value as a 32-bit unsigned integer.
bool leq(const RRTTL &other) const
Less-than or equal comparison for RRTTL against other.
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
bool operator<(const RRTTL &other) const
Same as lthan()
Base class for all sorts of text parse errors.
The RRTTL class encapsulates TTLs used in DNS resource records.
bool nequals(const RRTTL &other) const
Return true iff two RRTTLs are not equal.
const std::string toText() const
Convert the RRTTL to a string.
bool operator<=(const RRTTL &other) const
Same as leq()
void toWire(AbstractMessageRenderer &renderer) const
Render the RRTTL in the wire format.
bool operator!=(const RRTTL &other) const
Same as nequals().
bool operator>=(const RRTTL &other) const
Same as geq()
A standard DNS module exception that is thrown if an RRTTL object is being constructed from a incompl...
bool geq(const RRTTL &other) const
Greater-than or equal comparison for RRTTL against other.
bool equals(const RRTTL &other) const
Return true iff two RRTTLs are equal.
bool operator>(const RRTTL &other) const
Same as gthan()
static const RRTTL & MAX_TTL()
The TTL of the max allowable value, per RFC2181 Section 8.
IncompleteRRTTL(const char *file, size_t line, const char *what)
bool operator==(const RRTTL &other) const
Same as equals().