|
@@ -384,11 +384,16 @@ private:
|
|
|
// to indicate whether the zone is signed or not. Internal use,
|
|
|
// so defined as private.
|
|
|
static const ZoneNode::Flags DNSSEC_SIGNED = ZoneNode::FLAG_USER1;
|
|
|
+
|
|
|
+ // Also set in the origin node, indicating this is a special "empty zone",
|
|
|
+ // that could be created only by the corresponding create() method to be
|
|
|
+ // used for some kind of sentinel data.
|
|
|
+ static const ZoneNode::Flags EMPTY_ZONE = ZoneNode::FLAG_USER2;
|
|
|
public:
|
|
|
/// \brief Node flag indicating it is at a "wildcard level"
|
|
|
///
|
|
|
/// This means one of the node's immediate children is a wildcard.
|
|
|
- static const ZoneNode::Flags WILDCARD_NODE = ZoneNode::FLAG_USER2;
|
|
|
+ static const ZoneNode::Flags WILDCARD_NODE = ZoneNode::FLAG_USER3;
|
|
|
|
|
|
public:
|
|
|
/// \brief Allocate and construct \c ZoneData.
|
|
@@ -410,6 +415,23 @@ public:
|
|
|
static ZoneData* create(util::MemorySegment& mem_sgmt,
|
|
|
const dns::Name& zone_origin);
|
|
|
|
|
|
+ /// \brief Allocate and construct a special "empty" \c ZoneData.
|
|
|
+ ///
|
|
|
+ /// A ZoneData object created this way holds all internal integrity
|
|
|
+ /// that those created by the other \c create() method have, but is not
|
|
|
+ /// publicly associated with any actual zone data. It's intended to be
|
|
|
+ /// used as a kind of sentinel data to representing the concept such as
|
|
|
+ /// "broken zone".
|
|
|
+ ///
|
|
|
+ /// Methods calls on empty \c ZoneData object except \c destroy() and
|
|
|
+ /// \c isEmpty() are meaningless, while they shouldn't cause disruption.
|
|
|
+ /// It's caller's responsibility to use empty zone data objects in the
|
|
|
+ /// intended way.
|
|
|
+ ///
|
|
|
+ /// \param mem_sgmt A \c MemorySegment from which memory for the new
|
|
|
+ /// \c ZoneData is allocated.
|
|
|
+ static ZoneData* create(util::MemorySegment& mem_sgmt);
|
|
|
+
|
|
|
/// \brief Destruct and deallocate \c ZoneData.
|
|
|
///
|
|
|
/// It releases all resource allocated in the internal storage NSEC3 for
|
|
@@ -482,6 +504,13 @@ public:
|
|
|
/// \throw none
|
|
|
bool isNSEC3Signed() const { return (nsec3_data_); }
|
|
|
|
|
|
+ /// \brief Return whether or not the zone data is "empty".
|
|
|
+ ///
|
|
|
+ /// See the description of \c create() for the concept of empty zone data.
|
|
|
+ ///
|
|
|
+ /// \throw None
|
|
|
+ bool isEmpty() const { return (origin_node_->getFlag(EMPTY_ZONE)); }
|
|
|
+
|
|
|
/// \brief Return NSEC3Data of the zone.
|
|
|
///
|
|
|
/// This method returns non-NULL valid pointer to \c NSEC3Data object
|