diff options
Diffstat (limited to 'src/libknot/zone/node.h')
-rw-r--r-- | src/libknot/zone/node.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/libknot/zone/node.h b/src/libknot/zone/node.h index 2e1dd25..6ea06a2 100644 --- a/src/libknot/zone/node.h +++ b/src/libknot/zone/node.h @@ -93,14 +93,16 @@ typedef struct knot_node knot_node_t; /*! \brief Flags used to mark nodes with some property. */ typedef enum { /*! \brief Node is a delegation point (i.e. marking a zone cut). */ - KNOT_NODE_FLAGS_DELEG = (uint8_t)0x01, + KNOT_NODE_FLAGS_DELEG = 1 << 0, /*! \brief Node is not authoritative (i.e. below a zone cut). */ - KNOT_NODE_FLAGS_NONAUTH = (uint8_t)0x02, + KNOT_NODE_FLAGS_NONAUTH = 1 << 1, + /*! \brief Node is an apex node. */ + KNOT_NODE_FLAGS_APEX = 1 << 2, /*! \brief Node is empty and will be deleted after update. * \todo Remove after dname refactoring, update description in node. */ - KNOT_NODE_FLAGS_EMPTY = (uint8_t)0x10, + KNOT_NODE_FLAGS_EMPTY = 1 << 3, /*! \brief NSEC in this node needs new RRSIGs. Used for signing. */ - KNOT_NODE_FLAGS_REPLACED_NSEC = (uint8_t)0x20 + KNOT_NODE_FLAGS_REPLACED_NSEC = 1 << 4, } knot_node_flags_t; /*----------------------------------------------------------------------------*/ @@ -377,6 +379,10 @@ void knot_node_set_replaced_nsec(knot_node_t *node); void knot_node_clear_replaced_nsec(knot_node_t *node); +void knot_node_set_apex(knot_node_t *node); + +int knot_node_is_apex(const knot_node_t *node); + //! \todo remove after dname refactoring int knot_node_is_empty(const knot_node_t *node); |