Commit Graph

7 Commits

Author SHA1 Message Date
W.C.A. Wijngaards
3e03e2c26d - For #391: use struct timeval* start_time for callback information. 2021-01-08 09:47:46 +01:00
Frank Riley
e3abd772f7 Add start_time to reply callbacks so modules can compute the response time. 2021-01-01 15:44:21 -07:00
W.C.A. Wijngaards
01db6c365c - For PR #93: dynlibmod can handle reloads and deinit and inits again,
with dlclose and dlopen of the library again.  Also for multiple
  modules.  Fix memory leak by not closing dlopened content.  Fix
  to allow one dynlibmod instance by unbound-checkconf.
2020-05-18 10:11:16 +02:00
PMunch
8802509a61 Fix return code of init to mirror native modules
The return code of the init procedure was just set to be 1 in the
dynamic library loading module. This ha been rectified and it will now
return whatever is returned from the loaded module.
2019-11-20 15:13:57 +01:00
PMunch
d104d3be22 Add inplace callback to dynlibmod, improve example
This adds the possibility to properly register inplace callbacks in the
dynamic library module. It works by creating a wrapper procedure that
is available to the dynamic library and will call the given callback
through a whitelisted callback function.

The dynamic library example has already been improved to include
comments and some simple examples on allocating and deallocating memory
and registering callbacks.
2019-11-01 10:44:26 +01:00
PMunch
8eeb910e3d Improve dynlib module and add documentation
Dynamic library module is now only a thin wrapper that loads dynamic
libraries and forwards all function calls directly to the loaded module.
This meant adding get_mem and clear, and get_mem calls have been added
in the expected places.

Documentation has also been added to the example.conf and the
unbound.conf manpage.
2019-10-21 14:20:33 +02:00
PMunch
1762437121 Add dynamic library support 2019-10-21 09:34:51 +02:00