unbound 0.1
val_neg_data Struct Reference

Data element for aggressive negative caching. More...

#include <val_neg.h>

Data Fields

rbnode_type node
 rbtree node element, key is this struct: the name
uint8_t * name
 name; the key
size_t len
 length of name
int labs
 labels in name
struct val_neg_data * parent
 pointer to parent node in the negative cache
int count
 the number of elements, including this one and the ones whose parents (-parents) include this one, that are in use No elements have a count of zero, those are removed.
struct val_neg_zone * zone
 the zone that this denial is part of
struct val_neg_data * prev
 previous in LRU
struct val_neg_data * next
 next in LRU (next element was less recently used)
uint8_t in_use
 if this element is in use, boolean

Detailed Description

Data element for aggressive negative caching.

The tree of these elements acts as an index onto the rrset cache. It shows the NSEC records that (may) exist and are (possibly) secure. The rbtree allows for logN search for a covering NSEC record. To make tree insertion and deletion logN too, all the parent (one label less than the name) data elements are also in the rbtree, with a usage count for every data element. There is no actual data stored in this data element, if it is in_use, then the data can (possibly) be found in the rrset cache.

Field Documentation

◆ node

rbnode_type val_neg_data::node

rbtree node element, key is this struct: the name

Referenced by neg_closest_data(), neg_closest_data_parent(), neg_delete_data(), neg_find_data(), neg_insert_data(), neg_setup_data_node(), and wipeout().

◆ name

◆ len

◆ labs

◆ parent

struct val_neg_data* val_neg_data::parent

pointer to parent node in the negative cache

Referenced by check_data(), neg_closest_data_parent(), neg_data_chain(), neg_delete_data(), neg_insert_data(), and neg_nsec3_getnc().

◆ count

int val_neg_data::count

the number of elements, including this one and the ones whose parents (-parents) include this one, that are in use No elements have a count of zero, those are removed.

Referenced by check_data(), neg_delete_data(), neg_insert_data(), print_neg_cache(), remove_item(), and sumtrees_inuse().

◆ zone

◆ prev

struct val_neg_data* val_neg_data::prev

previous in LRU

Referenced by check_lru(), neg_data_chain(), neg_lru_front(), and neg_lru_remove().

◆ next

struct val_neg_data* val_neg_data::next

next in LRU (next element was less recently used)

Referenced by check_lru(), neg_lru_front(), neg_lru_remove(), and wipeout().

◆ in_use


The documentation for this struct was generated from the following file: