This file contains functions to assist the iterator module. More...
#include "util/rbtree.h"| Data Structures | |
| struct | iter_priv | 
| Iterator priv structure.  More... | |
| Functions | |
| struct iter_priv * | priv_create (void) | 
| Create priv structure. | |
| void | priv_delete (struct iter_priv *priv) | 
| Delete priv structure. | |
| int | priv_apply_cfg (struct iter_priv *priv, struct config_file *cfg) | 
| Process priv config. | |
| int | priv_rrset_bad (struct iter_priv *priv, struct sldns_buffer *pkt, struct rrset_parse *rrset) | 
| See if rrset is bad. | |
| size_t | priv_get_mem (struct iter_priv *priv) | 
| Get memory used by priv structure. | |
This file contains functions to assist the iterator module.
Keep track of the private addresses and lookup fast.
| struct iter_priv * priv_create | ( | void | ) | 
Create priv structure.
References iter_priv::a, addr_tree_init(), iter_priv::n, name_tree_init(), priv_delete(), iter_priv::region, and regional_create().
Referenced by fr_construct_from_config(), and iter_apply_cfg().
| void priv_delete | ( | struct iter_priv * | priv | ) | 
Delete priv structure.
| priv | to delete. | 
References iter_priv::region, and regional_destroy().
Referenced by fr_construct_clear(), iter_deinit(), and priv_create().
| int priv_apply_cfg | ( | struct iter_priv * | priv, | 
| struct config_file * | cfg | ||
| ) | 
Process priv config.
| priv | where to store. | 
| cfg | config options. | 
References iter_priv::a, addr_tree_init(), addr_tree_init_parents(), iter_priv::n, name_tree_init(), name_tree_init_parents(), read_addrs(), read_names(), iter_priv::region, and regional_free_all().
Referenced by fr_construct_from_config(), and iter_apply_cfg().
| int priv_rrset_bad | ( | struct iter_priv * | priv, | 
| struct sldns_buffer * | pkt, | ||
| struct rrset_parse * | rrset | ||
| ) | 
See if rrset is bad.
Will remove individual RRs that are bad (if possible) to sanitize the RRset without removing it completely.
| priv | structure for private address storage. | 
| pkt | packet to decompress rrset name in. | 
| rrset | the rrset to examine, A or AAAA. | 
References iter_priv::a, rbtree_type::count, rrset_parse::dname, rrset_parse::dname_len, INET6_SIZE, INET_SIZE, LDNS_RR_TYPE_A, LDNS_RR_TYPE_AAAA, name_tree_node::len, msgparse_rrset_remove_rr(), rr_parse::next, priv_lookup_addr(), priv_lookup_name(), rrset_parse::rr_first, rrset_parse::rrset_class, rr_parse::ttl_data, and rrset_parse::type.
Referenced by scrub_sanitize().
| size_t priv_get_mem | ( | struct iter_priv * | priv | ) | 
Get memory used by priv structure.
| priv | structure for address storage. | 
References iter_priv::region, and regional_get_mem().
Referenced by iter_get_mem().