summaryrefslogtreecommitdiff
path: root/services/modstack.c
diff options
context:
space:
mode:
Diffstat (limited to 'services/modstack.c')
-rw-r--r--services/modstack.c39
1 files changed, 30 insertions, 9 deletions
diff --git a/services/modstack.c b/services/modstack.c
index 9bebd3a5634ca..136245a968386 100644
--- a/services/modstack.c
+++ b/services/modstack.c
@@ -54,6 +54,9 @@
#ifdef USE_CACHEDB
#include "cachedb/cachedb.h"
#endif
+#ifdef USE_IPSECMOD
+#include "ipsecmod/ipsecmod.h"
+#endif
#ifdef CLIENT_SUBNET
#include "edns-subnet/subnetmod.h"
#endif
@@ -126,17 +129,20 @@ module_list_avail(void)
static const char* names[] = {
"dns64",
#ifdef WITH_PYTHONMODULE
- "python",
+ "python",
#endif
#ifdef USE_CACHEDB
"cachedb",
#endif
+#ifdef USE_IPSECMOD
+ "ipsecmod",
+#endif
#ifdef CLIENT_SUBNET
- "subnetcache",
+ "subnetcache",
#endif
"respip",
- "validator",
- "iterator",
+ "validator",
+ "iterator",
NULL};
return names;
}
@@ -151,22 +157,25 @@ module_funcs_avail(void)
static struct module_func_block* (*fb[])(void) = {
&dns64_get_funcblock,
#ifdef WITH_PYTHONMODULE
- &pythonmod_get_funcblock,
+ &pythonmod_get_funcblock,
#endif
#ifdef USE_CACHEDB
&cachedb_get_funcblock,
#endif
+#ifdef USE_IPSECMOD
+ &ipsecmod_get_funcblock,
+#endif
#ifdef CLIENT_SUBNET
- &subnetmod_get_funcblock,
+ &subnetmod_get_funcblock,
#endif
&respip_get_funcblock,
- &val_get_funcblock,
- &iter_get_funcblock,
+ &val_get_funcblock,
+ &iter_get_funcblock,
NULL};
return fb;
}
-struct
+struct
module_func_block* module_factory(const char** str)
{
int i = 0;
@@ -234,3 +243,15 @@ modstack_find(struct module_stack* stack, const char* name)
}
return -1;
}
+
+size_t
+mod_get_mem(struct module_env* env, const char* name)
+{
+ int m = modstack_find(&env->mesh->mods, name);
+ if(m != -1) {
+ fptr_ok(fptr_whitelist_mod_get_mem(env->mesh->
+ mods.mod[m]->get_mem));
+ return (*env->mesh->mods.mod[m]->get_mem)(env, m);
+ }
+ return 0;
+}