Maintained by: NLnet Labs
Data Structures | Functions
iter_priv.h File Reference

This file contains functions to assist the iterator module. More...

#include "util/rbtree.h"

Data Structures

struct  iter_priv
 Iterator priv structure. More...


struct iter_privpriv_create (void)
 Create priv structure. More...
void priv_delete (struct iter_priv *priv)
 Delete priv structure. More...
int priv_apply_cfg (struct iter_priv *priv, struct config_file *cfg)
 Process priv config. More...
int priv_rrset_bad (struct iter_priv *priv, struct sldns_buffer *pkt, struct rrset_parse *rrset)
 See if rrset is bad. More...
size_t priv_get_mem (struct iter_priv *priv)
 Get memory used by priv structure. More...

Detailed Description

This file contains functions to assist the iterator module.

Keep track of the private addresses and lookup fast.

Function Documentation

§ priv_create()

struct iter_priv* priv_create ( void  )

Create priv structure.

new structure or NULL on error.

References iter_priv::a, addr_tree_init(), iter_priv::n, name_tree_init(), priv_delete(), iter_priv::region, and regional_create().

Referenced by iter_apply_cfg().

§ priv_delete()

void priv_delete ( struct iter_priv priv)

Delete priv structure.

privto delete.

References iter_priv::region, and regional_destroy().

Referenced by iter_deinit(), and priv_create().

§ priv_apply_cfg()

int priv_apply_cfg ( struct iter_priv priv,
struct config_file cfg 

Process priv config.

privwhere to store.
cfgconfig options.
0 on error.

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 iter_apply_cfg().

§ priv_rrset_bad()

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.

privstructure for private address storage.
pktpacket to decompress rrset name in.
rrsetthe rrset to examine, A or AAAA.
true if the rrset is bad and should be removed.

References iter_priv::a, rbtree_t::count, rrset_parse::dname, rrset_parse::dname_len, LDNS_RR_TYPE_A, name_tree_node::len, rr_parse::next, priv_lookup_name(), rrset_parse::rr_first, rrset_parse::rrset_class, and rrset_parse::type.

§ priv_get_mem()

size_t priv_get_mem ( struct iter_priv priv)

Get memory used by priv structure.

privstructure for address storage.
bytes in use.

References iter_priv::region, and regional_get_mem().

Referenced by iter_get_mem().