|
Electroneum
|
#include "util/storage/dnstree.h"
Go to the source code of this file.
Classes | |
| struct | iter_hints |
| struct | iter_hints_stub |
Functions | |
| struct iter_hints * | hints_create (void) |
| void | hints_delete (struct iter_hints *hints) |
| int | hints_apply_cfg (struct iter_hints *hints, struct config_file *cfg) |
| struct delegpt * | hints_lookup_root (struct iter_hints *hints, uint16_t qclass) |
| int | hints_next_root (struct iter_hints *hints, uint16_t *qclass) |
| struct iter_hints_stub * | hints_lookup_stub (struct iter_hints *hints, uint8_t *qname, uint16_t qclass, struct delegpt *dp) |
| size_t | hints_get_mem (struct iter_hints *hints) |
| int | hints_add_stub (struct iter_hints *hints, uint16_t c, struct delegpt *dp, int noprime) |
| void | hints_delete_stub (struct iter_hints *hints, uint16_t c, uint8_t *nm) |
This file contains functions to assist the iterator module. Keep track of stub and root hints, and read those from config.
Definition in file iter_hints.h.
| int hints_add_stub | ( | struct iter_hints * | hints, |
| uint16_t | c, | ||
| struct delegpt * | dp, | ||
| int | noprime | ||
| ) |
Add stub to hints structure. For external use since it recalcs the tree parents.
| hints | the hints data structure |
| c | class of zone |
| dp | delegation point with name and target nameservers for new hints stub. malloced. |
| noprime | set noprime option to true or false on new hint stub. |
| int hints_apply_cfg | ( | struct iter_hints * | hints, |
| struct config_file * | cfg | ||
| ) |
Process hints config. Sets default values for root hints if no config.
| hints | where to store. |
| cfg | config options. |
| struct iter_hints* hints_create | ( | void | ) |
Create hints
| void hints_delete | ( | struct iter_hints * | hints | ) |
Delete hints.
| hints | to delete. |
| void hints_delete_stub | ( | struct iter_hints * | hints, |
| uint16_t | c, | ||
| uint8_t * | nm | ||
| ) |
Remove stub from hints structure. For external use since it recalcs the tree parents.
| hints | the hints data structure |
| c | class of stub zone |
| nm | name of stub zone (in uncompressed wireformat). |
| size_t hints_get_mem | ( | struct iter_hints * | hints | ) |
Get memory in use by hints
| hints | hint storage. |
| struct delegpt* hints_lookup_root | ( | struct iter_hints * | hints, |
| uint16_t | qclass | ||
| ) |
Find root hints for the given class.
| hints | hint storage. |
| qclass | class for which root hints are requested. host order. |
| struct iter_hints_stub* hints_lookup_stub | ( | struct iter_hints * | hints, |
| uint8_t * | qname, | ||
| uint16_t | qclass, | ||
| struct delegpt * | dp | ||
| ) |
Given a qname/qclass combination, and the delegation point from the cache for this qname/qclass, determine if this combination indicates that a stub hint exists and must be primed.
| hints | hint storage. |
| qname | The qname that generated the delegation point. |
| qclass | The qclass that generated the delegation point. |
| dp | The cache generated delegation point. |
| int hints_next_root | ( | struct iter_hints * | hints, |
| uint16_t * | qclass | ||
| ) |
Find next root hints (to cycle through all root hints).
| hints | hint storage |
| qclass | class for which root hints are sought. 0 means give the first available root hints class. x means, give class x or a higher class if any. returns the found class in this variable. |