update to 9.7.1-P2
[tridge/bind9.git] / lib / dns / include / dns / rbt.h
index 6eea787af888cd8609cd14b57f6844e9f46d048f..3e9dc886576fa89bfe6d79d59ff1fadba91d7b5a 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rbt.h,v 1.71.48.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id: rbt.h,v 1.77 2009/11/04 01:18:19 marka Exp $ */
 
 #ifndef DNS_RBT_H
 #define DNS_RBT_H 1
@@ -70,6 +70,12 @@ ISC_LANG_BEGINDECLS
  * multiple dns_rbtnode structures will not work.
  */
 typedef struct dns_rbtnode dns_rbtnode_t;
+enum {
+       DNS_RBT_NSEC_NORMAL=0,      /* in main tree */
+       DNS_RBT_NSEC_HAS_NSEC=1,    /* also has node in nsec tree */
+       DNS_RBT_NSEC_NSEC=2,        /* in nsec tree */
+       DNS_RBT_NSEC_NSEC3=3        /* in nsec3 tree */
+};
 struct dns_rbtnode {
 #if DNS_RBT_USEMAGIC
        unsigned int magic;
@@ -94,10 +100,7 @@ struct dns_rbtnode {
         * The following bitfields add up to a total bitwidth of 32.
         * The range of values necessary for each item is indicated,
         * but in the case of "attributes" the field is wider to accommodate
-        * possible future expansion.  "offsetlen" could be one bit
-        * narrower by always adjusting its value by 1 to find the real
-        * offsetlen, but doing so does not gain anything (except perhaps
-        * another bit for "attributes", which doesn't yet need any more).
+        * possible future expansion.
         *
         * In each case below the "range" indicated is what's _necessary_ for
         * the bitfield to hold, not what it actually _can_ hold.
@@ -106,10 +109,10 @@ struct dns_rbtnode {
        unsigned int color : 1;         /*%< range is 0..1 */
        unsigned int find_callback : 1; /*%< range is 0..1 */
        unsigned int attributes : 3;    /*%< range is 0..2 */
-       unsigned int nsec3 : 1;         /*%< range is 0..1 */
+       unsigned int nsec : 2;          /*%< range is 0..3 */
        unsigned int namelen : 8;       /*%< range is 1..255 */
        unsigned int offsetlen : 8;     /*%< range is 1..128 */
-       unsigned int padbytes : 9;      /*%< range is 0..380 */
+       unsigned int oldnamelen : 8;    /*%< range is 1..255 */
        /*@}*/
 
 #ifdef DNS_RBT_USEHASH
@@ -909,7 +912,7 @@ dns_rbtnodechain_nextflat(dns_rbtnodechain_t *chain, dns_name_t *name);
        } while (0)
 #else  /* DNS_RBT_USEISCREFCOUNT */
 #define dns_rbtnode_refinit(node, n)    ((node)->references = (n))
-#define dns_rbtnode_refdestroy(node)    (REQUIRE((node)->references == 0))
+#define dns_rbtnode_refdestroy(node)    REQUIRE((node)->references == 0)
 #define dns_rbtnode_refcurrent(node)    ((node)->references)
 #define dns_rbtnode_refincrement0(node, refs)                   \
        do {                                                    \