unbound: val_neg_cache Struct Reference

unbound 0.1

Data Fields
val_neg_cache Struct Reference

The negative cache. More...

`#include <val_neg.h>`

## Data Fields
lock_basic_type | lock
| the big lock on the negative cache.
rbtree_type | tree
| The zone rbtree.
struct val_neg_data * | first
| the first in linked list of LRU of val_neg_data
struct val_neg_data * | last
| last in lru (least recently used element)
size_t | use
| current memory in use (bytes)
size_t | max
| max memory to use (bytes)
size_t | nsec3_max_iter
| max nsec3 iterations allowed
size_t | num_neg_cache_noerror
| number of times neg cache records were used to generate NOERROR responses.
size_t | num_neg_cache_nxdomain
| number of times neg cache records were used to generate NXDOMAIN responses.

## Detailed Description

The negative cache.

It is shared between the threads, so locked. Kept as validator-environ-state. It refers back to the rrset cache for data elements. It can be out of date and contain conflicting data from zone content changes.
It contains a tree of zones, every zone has a tree of data elements. The data elements are part of one big LRU list, with one memory counter.

## Field Documentation

## ◆ lock

lock_basic_type val_neg_cache::lock

the big lock on the negative cache.

Because we use a rbtree for the data (quick lookup), we need a big lock

Referenced by add_item(), check_neg_invariants(), fr_adjust_val_env(), neg_cache_delete(), neg_find_nsec(), remove_item(), set_neg_cache_stats(), val_neg_addreferral(), val_neg_addreply(), val_neg_adjust_size(), val_neg_create(), val_neg_get_mem(), and val_neg_getmsg().

## ◆ tree

rbtree_type val_neg_cache::tree

The zone rbtree.

contents sorted canonical, type val_neg_zone

Referenced by check_neg_invariants(), neg_cache_delete(), neg_closest_zone_parent(), neg_create_zone(), neg_delete_zone(), neg_find_zone(), print_neg_cache(), remove_item(), sum_zone_subtree_inuse(), sumtrees_all(), sumtrees_inuse(), and val_neg_create().

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

- validator/val_neg.h