unbound 0.1
pythonmod.h File Reference

Python module for unbound. More...

Functions

struct module_func_block * pythonmod_get_funcblock (void)
 Get the module function block.
int pythonmod_init (struct module_env *env, int id)
 python module init
void pythonmod_deinit (struct module_env *env, int id)
 python module deinit
void pythonmod_operate (struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
 python module operate on a query
void pythonmod_inform_super (struct module_qstate *qstate, int id, struct module_qstate *super)
 python module
void pythonmod_clear (struct module_qstate *qstate, int id)
 python module cleanup query state
size_t pythonmod_get_mem (struct module_env *env, int id)
 python module alloc size routine
int python_inplace_cb_reply_generic (struct query_info *qinfo, struct module_qstate *qstate, struct reply_info *rep, int rcode, struct edns_data *edns, struct edns_option **opt_list_out, struct comm_reply *repinfo, struct regional *region, struct timeval *start_time, int id, void *python_callback)
 Declared here for fptr_wlist access.
int python_inplace_cb_query_generic (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 *python_callback)
 Declared here for fptr_wlist access.
int python_inplace_cb_query_response (struct module_qstate *qstate, struct dns_msg *response, int id, void *python_callback)
 Declared here for fptr_wlist access.
int python_inplace_cb_edns_back_parsed_call (struct module_qstate *qstate, int id, void *python_callback)
 Declared here for fptr_wlist access.

Detailed Description

Python module for unbound.

Calls python script.

Function Documentation

◆ pythonmod_get_funcblock()

struct module_func_block * pythonmod_get_funcblock ( void )

Get the module function block.

Returns
: function block with function pointers to module methods.

References pythonmod_block, and pythonmod_get_funcblock().

Referenced by checkconf(), module_funcs_avail(), and pythonmod_get_funcblock().

◆ pythonmod_init()

◆ pythonmod_deinit()

◆ pythonmod_operate()

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

python module operate on a query

References pythonmod_clear(), pythonmod_get_mem(), and pythonmod_inform_super().

◆ pythonmod_inform_super()

◆ pythonmod_clear()

void pythonmod_clear ( struct module_qstate * qstate,
int id )

◆ pythonmod_get_mem()

size_t pythonmod_get_mem ( struct module_env * env,
int id )

◆ python_inplace_cb_reply_generic()

int python_inplace_cb_reply_generic ( struct query_info * qinfo,
struct module_qstate * qstate,
struct reply_info * rep,
int rcode,
struct edns_data * edns,
struct edns_option ** opt_list_out,
struct comm_reply * repinfo,
struct regional * region,
struct timeval * start_time,
int id,
void * python_callback )

Declared here for fptr_wlist access.

The definition is in interface.i.

References python_inplace_cb_reply_generic().

Referenced by fptr_whitelist_inplace_cb_reply_generic(), and python_inplace_cb_reply_generic().

◆ python_inplace_cb_query_generic()

int python_inplace_cb_query_generic ( 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 * python_callback )

Declared here for fptr_wlist access.

The definition is in interface.i.

References python_inplace_cb_query_generic().

Referenced by fptr_whitelist_inplace_cb_query(), and python_inplace_cb_query_generic().

◆ python_inplace_cb_query_response()

int python_inplace_cb_query_response ( struct module_qstate * qstate,
struct dns_msg * response,
int id,
void * python_callback )

Declared here for fptr_wlist access.

The definition is in interface.i.

References python_inplace_cb_query_response().

Referenced by fptr_whitelist_inplace_cb_query_response(), and python_inplace_cb_query_response().

◆ python_inplace_cb_edns_back_parsed_call()

int python_inplace_cb_edns_back_parsed_call ( struct module_qstate * qstate,
int id,
void * python_callback )

Declared here for fptr_wlist access.

The definition is in interface.i.

References python_inplace_cb_edns_back_parsed_call().

Referenced by fptr_whitelist_inplace_cb_edns_back_parsed(), and python_inplace_cb_edns_back_parsed_call().