Commit f34eec70 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2905] preserved existing ZoneNode flag values for ZoneData.

added a note on the numbering.
and made one piggyback cleanup: define public static const explicitly.
parent ccf45161
...@@ -38,6 +38,10 @@ namespace isc { ...@@ -38,6 +38,10 @@ namespace isc {
namespace datasrc { namespace datasrc {
namespace memory { namespace memory {
// Definition of a class static constant. It's public and its address
// could be needed by applications, so we need an explicit definition.
const ZoneNode::Flags ZoneData::DNSSEC_SIGNED;
namespace { namespace {
void void
rdataSetDeleter(RRClass rrclass, util::MemorySegment* mem_sgmt, rdataSetDeleter(RRClass rrclass, util::MemorySegment* mem_sgmt,
......
...@@ -378,22 +378,27 @@ private: ...@@ -378,22 +378,27 @@ private:
/// It never throws an exception. /// It never throws an exception.
ZoneData(ZoneTree* zone_tree, ZoneNode* origin_node); ZoneData(ZoneTree* zone_tree, ZoneNode* origin_node);
// Zone node flags. // Zone node flags. When adding a new flag, it's generally advisable to
// keep existing values so the binary image of the data is as much
// backward compatible as possible. And it can be helpful in practice
// for file-mapped data.
private: private:
// Set in the origin node (which always exists at the same address) // Set in the origin node (which always exists at the same address)
// to indicate whether the zone is signed or not. Internal use, // to indicate whether the zone is signed or not. Internal use,
// so defined as private. // so defined as private.
static const ZoneNode::Flags DNSSEC_SIGNED = ZoneNode::FLAG_USER1; 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: public:
/// \brief Node flag indicating it is at a "wildcard level" /// \brief Node flag indicating it is at a "wildcard level"
/// ///
/// This means one of the node's immediate children is a wildcard. /// This means one of the node's immediate children is a wildcard.
static const ZoneNode::Flags WILDCARD_NODE = ZoneNode::FLAG_USER3; static const ZoneNode::Flags WILDCARD_NODE = ZoneNode::FLAG_USER2;
private:
// 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_USER3;
public: public:
/// \brief Allocate and construct \c ZoneData. /// \brief Allocate and construct \c ZoneData.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment