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 | |
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.