Electroneum
val_neg_data Struct Reference

#include <val_neg.h>

Collaboration diagram for val_neg_data:

Public Attributes

rbnode_type node
 
uint8_tname
 
size_t len
 
int labs
 
struct val_neg_dataparent
 
int count
 
struct val_neg_zonezone
 
struct val_neg_dataprev
 
struct val_neg_datanext
 
uint8_t in_use
 

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.

Definition at line 142 of file val_neg.h.

Member Data Documentation

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

Definition at line 158 of file val_neg.h.

◆ in_use

uint8_t val_neg_data::in_use

if this element is in use, boolean

Definition at line 169 of file val_neg.h.

◆ labs

int val_neg_data::labs

labels in name

Definition at line 150 of file val_neg.h.

◆ len

size_t val_neg_data::len

length of name

Definition at line 148 of file val_neg.h.

◆ name

uint8_t* val_neg_data::name

name; the key

Definition at line 146 of file val_neg.h.

◆ next

struct val_neg_data* val_neg_data::next

next in LRU (next element was less recently used)

Definition at line 166 of file val_neg.h.

◆ node

rbnode_type val_neg_data::node

rbtree node element, key is this struct: the name

Definition at line 144 of file val_neg.h.

◆ parent

struct val_neg_data* val_neg_data::parent

pointer to parent node in the negative cache

Definition at line 153 of file val_neg.h.

◆ prev

struct val_neg_data* val_neg_data::prev

previous in LRU

Definition at line 164 of file val_neg.h.

◆ zone

struct val_neg_zone* val_neg_data::zone

the zone that this denial is part of

Definition at line 161 of file val_neg.h.


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