Call module init init again, and new function startup and destartup.

NULL can be used if the function is not used. Open shared ports during
reload. Deinit is called during reload.
This commit is contained in:
W.C.A. Wijngaards
2024-07-01 16:10:07 +02:00
parent fd11cd9182
commit ff653a7ef8
32 changed files with 209 additions and 187 deletions
+4 -4
View File
@@ -399,7 +399,7 @@ dns64_apply_cfg(struct dns64_env* dns64_env, struct config_file* cfg)
* \param id This instance's ID number.
*/
int
dns64_setup(struct module_env* env, int id)
dns64_init(struct module_env* env, int id)
{
struct dns64_env* dns64_env =
(struct dns64_env*)calloc(1, sizeof(struct dns64_env));
@@ -433,7 +433,7 @@ free_ignore_aaaa_node(rbnode_type* node, void* ATTR_UNUSED(arg))
* \param id This instance's ID number.
*/
void
dns64_desetup(struct module_env* env, int id)
dns64_deinit(struct module_env* env, int id)
{
struct dns64_env* dns64_env;
if (!env)
@@ -1044,8 +1044,8 @@ dns64_get_mem(struct module_env* env, int id)
*/
static struct module_func_block dns64_block = {
"dns64",
&module_dummy_init, &module_dummy_init, &dns64_setup, &dns64_desetup,
&dns64_operate, &dns64_inform_super, &dns64_clear, &dns64_get_mem
&dns64_init, &dns64_deinit, NULL, NULL, &dns64_operate,
&dns64_inform_super, &dns64_clear, &dns64_get_mem
};
/**
+2 -2
View File
@@ -50,10 +50,10 @@
struct module_func_block *dns64_get_funcblock(void);
/** dns64 init */
int dns64_setup(struct module_env* env, int id);
int dns64_init(struct module_env* env, int id);
/** dns64 deinit */
void dns64_desetup(struct module_env* env, int id);
void dns64_deinit(struct module_env* env, int id);
/** dns64 operate on a query */
void dns64_operate(struct module_qstate* qstate, enum module_ev event, int id,