unbound: dynlibmod/dynlibmod.c File Reference

unbound 0.1

Macros | Functions | Variables
dynlibmod.c File Reference

This file contains the dynamic library module for Unbound. More...

`#include "config.h"`
`#include "dynlibmod/dynlibmod.h"`
`#include "util/module.h"`
`#include "util/config_file.h"`
`#include <dlfcn.h>`

## Macros
#define | __DYNMOD void*
#define | __DYNSYM void*
#define | __LOADSYM dlsym

## Functions
static void | log_dlerror ()
static void * | open_library (const char *fname)
static void | close_library (const char *fname, __DYNMOD handle)
int | dynlibmod_init (struct module_env *env, int id)
| dynlib module init
void | dynlibmod_deinit (struct module_env *env, int id)
| dynlib module deinit
void | dynlibmod_operate (struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
| dynlib module operate on a query
void | dynlibmod_inform_super (struct module_qstate *qstate, int id, struct module_qstate *super)
| dynlib module
void | dynlibmod_clear (struct module_qstate *qstate, int id)
| dynlib module cleanup query state
size_t | dynlibmod_get_mem (struct module_env *env, int id)
| dynlib module alloc size routine
int | dynlib_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 *callback)
int | dynlib_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 *callback)
int | dynlib_inplace_cb_edns_back_parsed (struct module_qstate *qstate, int id, void *cb_args)
int | dynlib_inplace_cb_query_response (struct module_qstate *qstate, struct dns_msg *response, int id, void *cb_args)
int | inplace_cb_register_wrapped (void *cb, enum inplace_cb_list_type type, void *cbarg, struct module_env *env, int id)
void | inplace_cb_delete_wrapped (struct module_env *env, enum inplace_cb_list_type type, int id)
struct module_func_block * | dynlibmod_get_funcblock (void)
| Get the module function block.

## Variables
static int | dynlib_mod_count = 0
| module counter for multiple dynlib modules
static struct module_func_block | dynlibmod_block
| The module function block.

## Detailed Description

This file contains the dynamic library module for Unbound.

This loads a dynamic library (.dll, .so) and calls that for the module actions.

## Function Documentation

## ◆ dynlibmod_get_funcblock()

struct module_func_block * dynlibmod_get_funcblock | ( | void |  | ) |

Get the module function block.

Returns
  : function block with function pointers to module methods.

References dynlibmod_block.

Referenced by module_funcs_avail().

## Variable Documentation

## ◆ dynlibmod_block

struct module_func_block dynlibmod_block
| static

Initial value:
= {
"dynlib",
&dynlibmod_init, &dynlibmod_deinit, &dynlibmod_operate, &dynlibmod_inform_super,
&dynlibmod_clear, &dynlibmod_get_mem
}
dynlibmod_operate
void dynlibmod_operate(struct module_qstate *qstate, enum module_ev event, int id, struct outbound_entry *outbound)
dynlib module operate on a query
Definition: dynlibmod.c:178
dynlibmod_inform_super
void dynlibmod_inform_super(struct module_qstate *qstate, int id, struct module_qstate *super)
dynlib module
Definition: dynlibmod.c:186
dynlibmod_get_mem
size_t dynlibmod_get_mem(struct module_env *env, int id)
dynlib module alloc size routine
Definition: dynlibmod.c:201
dynlibmod_deinit
void dynlibmod_deinit(struct module_env *env, int id)
dynlib module deinit
Definition: dynlibmod.c:166
dynlibmod_init
int dynlibmod_init(struct module_env *env, int id)
dynlib module init
Definition: dynlibmod.c:73
dynlibmod_clear
void dynlibmod_clear(struct module_qstate *qstate, int id)
dynlib module cleanup query state
Definition: dynlibmod.c:194

The module function block.

Referenced by dynlibmod_get_funcblock().