Electroneum
iter_priv.h File Reference
#include "util/rbtree.h"
Include dependency graph for iter_priv.h:

Go to the source code of this file.

Classes

struct  iter_priv
 

Functions

struct iter_privpriv_create (void)
 
void priv_delete (struct iter_priv *priv)
 
int priv_apply_cfg (struct iter_priv *priv, struct config_file *cfg)
 
int priv_rrset_bad (struct iter_priv *priv, struct sldns_buffer *pkt, struct rrset_parse *rrset)
 
size_t priv_get_mem (struct iter_priv *priv)
 

Detailed Description

This file contains functions to assist the iterator module. Keep track of the private addresses and lookup fast.

Definition in file iter_priv.h.

Function Documentation

◆ priv_apply_cfg()

int priv_apply_cfg ( struct iter_priv priv,
struct config_file cfg 
)

Process priv config.

Parameters
privwhere to store.
cfgconfig options.
Returns
0 on error.

◆ priv_create()

struct iter_priv* priv_create ( void  )

Create priv structure

Returns
new structure or NULL on error.

◆ priv_delete()

void priv_delete ( struct iter_priv priv)

Delete priv structure.

Parameters
privto delete.

◆ priv_get_mem()

size_t priv_get_mem ( struct iter_priv priv)

Get memory used by priv structure.

Parameters
privstructure for address storage.
Returns
bytes in use.

◆ 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.

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