|
Electroneum
|
#include "util/rbtree.h"
Go to the source code of this file.
Classes | |
| struct | iter_forwards |
| struct | iter_forward_zone |
Functions | |
| struct iter_forwards * | forwards_create (void) |
| void | forwards_delete (struct iter_forwards *fwd) |
| int | forwards_apply_cfg (struct iter_forwards *fwd, struct config_file *cfg) |
| struct delegpt * | forwards_find (struct iter_forwards *fwd, uint8_t *qname, uint16_t qclass) |
| struct delegpt * | forwards_lookup (struct iter_forwards *fwd, uint8_t *qname, uint16_t qclass) |
| struct delegpt * | forwards_lookup_root (struct iter_forwards *fwd, uint16_t qclass) |
| int | forwards_next_root (struct iter_forwards *fwd, uint16_t *qclass) |
| size_t | forwards_get_mem (struct iter_forwards *fwd) |
| int | fwd_cmp (const void *k1, const void *k2) |
| int | forwards_add_zone (struct iter_forwards *fwd, uint16_t c, struct delegpt *dp) |
| void | forwards_delete_zone (struct iter_forwards *fwd, uint16_t c, uint8_t *nm) |
| int | forwards_add_stub_hole (struct iter_forwards *fwd, uint16_t c, uint8_t *nm) |
| void | forwards_delete_stub_hole (struct iter_forwards *fwd, uint16_t c, uint8_t *nm) |
This file contains functions to assist the iterator module. Keep track of forward zones, and read those from config.
Definition in file iter_fwd.h.
| int forwards_add_stub_hole | ( | struct iter_forwards * | fwd, |
| uint16_t | c, | ||
| uint8_t * | nm | ||
| ) |
Add stub hole (empty entry in forward table, that makes resolution skip a forward-zone because the stub zone should override the forward zone). Does not add one if not necessary.
| fwd | the forward data structure |
| c | class of zone |
| nm | name of zone (in uncompressed wireformat). |
| int forwards_add_zone | ( | struct iter_forwards * | fwd, |
| uint16_t | c, | ||
| struct delegpt * | dp | ||
| ) |
Add zone to forward structure. For external use since it recalcs the tree parents.
| fwd | the forward data structure |
| c | class of zone |
| dp | delegation point with name and target nameservers for new forward zone. malloced. |
| int forwards_apply_cfg | ( | struct iter_forwards * | fwd, |
| struct config_file * | cfg | ||
| ) |
Process forwards config.
| fwd | where to store. |
| cfg | config options. |
| struct iter_forwards* forwards_create | ( | void | ) |
Create forwards
| void forwards_delete | ( | struct iter_forwards * | fwd | ) |
Delete forwards.
| fwd | to delete. |
| void forwards_delete_stub_hole | ( | struct iter_forwards * | fwd, |
| uint16_t | c, | ||
| uint8_t * | nm | ||
| ) |
Remove stub hole, if one exists.
| fwd | the forward data structure |
| c | class of zone |
| nm | name of zone (in uncompressed wireformat). |
| void forwards_delete_zone | ( | struct iter_forwards * | fwd, |
| uint16_t | c, | ||
| uint8_t * | nm | ||
| ) |
Remove zone from forward structure. For external use since it recalcs the tree parents.
| fwd | the forward data structure |
| c | class of zone |
| nm | name of zone (in uncompressed wireformat). |
| struct delegpt* forwards_find | ( | struct iter_forwards * | fwd, |
| uint8_t * | qname, | ||
| uint16_t | qclass | ||
| ) |
Find forward zone exactly by name
| fwd | forward storage. |
| qname | The qname of the query. |
| qclass | The qclass of the query. |
| size_t forwards_get_mem | ( | struct iter_forwards * | fwd | ) |
Get memory in use by forward storage
| fwd | forward storage. |
| struct delegpt* forwards_lookup | ( | struct iter_forwards * | fwd, |
| uint8_t * | qname, | ||
| uint16_t | qclass | ||
| ) |
Find forward zone information For this qname/qclass find forward zone information, returns delegation point with server names and addresses, or NULL if no forwarding is needed.
| fwd | forward storage. |
| qname | The qname of the query. |
| qclass | The qclass of the query. |
| struct delegpt* forwards_lookup_root | ( | struct iter_forwards * | fwd, |
| uint16_t | qclass | ||
| ) |
Same as forwards_lookup, but for the root only
| fwd | forward storage. |
| qclass | The qclass of the query. |
| int forwards_next_root | ( | struct iter_forwards * | fwd, |
| uint16_t * | qclass | ||
| ) |
Find next root item in forwards lookup tree.
| fwd | the forward storage |
| qclass | class to look at next, or higher. |
| int fwd_cmp | ( | const void * | k1, |
| const void * | k2 | ||
| ) |
compare two fwd entries