Electroneum
subnetmod.h File Reference
Include dependency graph for subnetmod.h:

Go to the source code of this file.

Classes

struct  subnet_env
 
struct  subnet_msg_cache_data
 
struct  subnet_qstate
 

Functions

void subnet_data_delete (void *d, void *ATTR_UNUSED(arg))
 
size_t msg_cache_sizefunc (void *k, void *d)
 
struct module_func_blocksubnetmod_get_funcblock (void)
 
int subnetmod_init (struct module_env *env, int id)
 
void subnetmod_deinit (struct module_env *env, int id)
 
void subnetmod_operate (struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
 
void subnetmod_inform_super (struct module_qstate *qstate, int id, struct module_qstate *super)
 
void subnetmod_clear (struct module_qstate *qstate, int id)
 
size_t subnetmod_get_mem (struct module_env *env, int id)
 
size_t unittest_wrapper_subnetmod_sizefunc (void *elemptr)
 
int ecs_whitelist_check (struct query_info *qinfo, uint16_t flags, struct module_qstate *qstate, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, struct regional *region, int id, void *cbargs)
 
int ecs_edns_back_parsed (struct module_qstate *qstate, int id, void *cbargs)
 
int ecs_query_response (struct module_qstate *qstate, struct dns_msg *response, int id, void *cbargs)
 

Detailed Description

subnet module for unbound.

Definition in file subnetmod.h.

Function Documentation

◆ ecs_edns_back_parsed()

int ecs_edns_back_parsed ( struct module_qstate qstate,
int  id,
void *  cbargs 
)

Check whether response from server contains ECS record, if so, skip cache store. Called just after parsing EDNS data from server.

◆ ecs_query_response()

int ecs_query_response ( struct module_qstate qstate,
struct dns_msg response,
int  id,
void *  cbargs 
)

Remove ECS record from back_out when query resulted in REFUSED response.

◆ ecs_whitelist_check()

int ecs_whitelist_check ( struct query_info qinfo,
uint16_t  flags,
struct module_qstate qstate,
struct sockaddr_storage addr,
socklen_t  addrlen,
uint8_t zone,
size_t  zonelen,
struct regional region,
int  id,
void *  cbargs 
)

Whitelist check, called just before query is sent upstream.

◆ msg_cache_sizefunc()

size_t msg_cache_sizefunc ( void *  k,
void *  d 
)

◆ subnet_data_delete()

void subnet_data_delete ( void *  d,
void *  ATTR_UNUSEDarg 
)

◆ subnetmod_clear()

void subnetmod_clear ( struct module_qstate qstate,
int  id 
)

subnet module cleanup query state

◆ subnetmod_deinit()

void subnetmod_deinit ( struct module_env env,
int  id 
)

subnet module deinit

◆ subnetmod_get_funcblock()

struct module_func_block* subnetmod_get_funcblock ( void  )

Get the module function block.

Returns
: function block with function pointers to module methods.

◆ subnetmod_get_mem()

size_t subnetmod_get_mem ( struct module_env env,
int  id 
)

subnet module alloc size routine

◆ subnetmod_inform_super()

void subnetmod_inform_super ( struct module_qstate qstate,
int  id,
struct module_qstate super 
)

subnet module

◆ subnetmod_init()

int subnetmod_init ( struct module_env env,
int  id 
)

subnet module init

◆ subnetmod_operate()

void subnetmod_operate ( struct module_qstate qstate,
enum module_ev  event,
int  id,
struct outbound_entry outbound 
)

subnet module operate on a query

◆ unittest_wrapper_subnetmod_sizefunc()

size_t unittest_wrapper_subnetmod_sizefunc ( void *  elemptr)

Wrappers for static functions to unit test