diff --git a/include/re_mod.h b/include/re_mod.h index 4c85594..4b132c4 100644 --- a/include/re_mod.h +++ b/include/re_mod.h @@ -71,4 +71,5 @@ int mod_load(struct mod **mp, const char *name); int mod_add(struct mod **mp, const struct mod_export *me); struct mod *mod_find(const char *name); const struct mod_export *mod_export(const struct mod *m); +struct list *mod_list(void); int mod_debug(struct re_printf *pf, void *unused); diff --git a/src/mod/mod.c b/src/mod/mod.c index bf2291c..6fc0aa1 100644 --- a/src/mod/mod.c +++ b/src/mod/mod.c @@ -203,6 +203,17 @@ const struct mod_export *mod_export(const struct mod *m) } +/** + * Get the list of loaded modules + * + * @return Module list + */ +struct list *mod_list(void) +{ + return &modl; +} + + /** * Debug loadable modules *