Maintained by: NLnet Labs
Functions
dns64.h File Reference

This file contains a module that performs DNS64 query processing. More...

#include "util/module.h"

Functions

struct module_func_blockdns64_get_funcblock (void)
 Get the dns64 function block. More...
 
int dns64_init (struct module_env *env, int id)
 dns64 init More...
 
void dns64_deinit (struct module_env *env, int id)
 dns64 deinit More...
 
void dns64_operate (struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
 dns64 operate on a query More...
 
void dns64_inform_super (struct module_qstate *qstate, int id, struct module_qstate *super)
 This function is called when a sub-query finishes to inform the parent query. More...
 
void dns64_clear (struct module_qstate *qstate, int id)
 dns64 cleanup query state More...
 
size_t dns64_get_mem (struct module_env *env, int id)
 dns64 alloc size routine More...
 

Detailed Description

This file contains a module that performs DNS64 query processing.

Function Documentation

◆ dns64_get_funcblock()

struct module_func_block* dns64_get_funcblock ( void  )

Get the dns64 function block.

Returns
: function block with function pointers to dns64 methods.

Get the dns64 function block.

References dns64_block.

Referenced by module_funcs_avail().

◆ dns64_init()

int dns64_init ( struct module_env env,
int  id 
)

dns64 init

dns64 init

Parameters
envGlobal state of all module instances.
idThis instance's ID number.

References module_env::cfg, dns64_apply_cfg(), log_err(), and module_env::modinfo.

Referenced by fptr_whitelist_mod_init().

◆ dns64_deinit()

void dns64_deinit ( struct module_env env,
int  id 
)

dns64 deinit

dns64 deinit

Parameters
envGlobal state of all module instances.
idThis instance's ID number.

References module_env::modinfo.

Referenced by fptr_whitelist_mod_deinit().

◆ dns64_operate()

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

dns64 operate on a query

dns64 operate on a query

It gets called each time a query receives an event which we may need to handle. We respond by updating the state of the query.

Parameters
qstateStructure containing the state of the query.
eventEvent that has just been received.
idThis module's instance ID.
outboundState of a DNS query on an authoritative server. We never do our own queries ourselves (other modules do it for us), so this is unused.

References DNS64_NEW_QUERY, module_qstate::ext_state, handle_event_moddone(), handle_event_pass(), log_query_info(), module_qstate::minfo, module_event_moddone, module_event_new, module_event_pass, module_finished, module_qstate::qinfo, strextstate(), strmodulevent(), VERB_QUERY, and verbose().

Referenced by fptr_whitelist_mod_operate().

◆ dns64_inform_super()

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

This function is called when a sub-query finishes to inform the parent query.

We issue two kinds of sub-queries: PTR and A.

Parameters
qstateState of the sub-query.
idThis module's instance ID.
superState of the super-query.

References DNS64_SUBQUERY_FINISHED, ub_packed_rrset_key::id, log_query_info(), module_qstate::minfo, module_qstate::qinfo, module_qstate::return_rcode, and VERB_ALGO.

Referenced by fptr_whitelist_mod_inform_super().

◆ dns64_clear()

void dns64_clear ( struct module_qstate qstate,
int  id 
)

dns64 cleanup query state

dns64 cleanup query state

Since we do not allocate memory, it's just a matter of setting a pointer to NULL.

Parameters
qstateQuery state.
idThis module's instance ID.

References ub_packed_rrset_key::id, and module_qstate::minfo.

Referenced by fptr_whitelist_mod_clear().

◆ dns64_get_mem()

size_t dns64_get_mem ( struct module_env env,
int  id 
)

dns64 alloc size routine

dns64 alloc size routine

Parameters
envModule environment.
idThis module's instance ID.

References module_env::modinfo.

Referenced by fptr_whitelist_mod_get_mem().