From: Nick Porter Date: Mon, 27 Feb 2023 15:52:25 +0000 (+0000) Subject: Define module_env_parsed_t to hold parsed module_env_t X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b19f4401a882b2ebd24b732f2b3eea1b9b8f215;p=thirdparty%2Ffreeradius-server.git Define module_env_parsed_t to hold parsed module_env_t --- diff --git a/src/lib/server/module.h b/src/lib/server/module.h index 9292a0761ee..b4bdfc6e14a 100644 --- a/src/lib/server/module.h +++ b/src/lib/server/module.h @@ -42,6 +42,7 @@ typedef struct module_method_name_s module_method_name_t; typedef struct module_instance_s module_instance_t; typedef struct module_thread_instance_s module_thread_instance_t; typedef struct module_env_s module_env_t; +typedef struct module_env_parsed_s module_env_parsed_t; typedef struct module_list_t module_list_t; #define MODULE_TYPE_THREAD_SAFE (0 << 0) //!< Module is threadsafe. @@ -118,6 +119,9 @@ typedef int (*module_thread_detach_t)(module_thread_inst_ctx_t const *mctx); extern "C" { #endif +FR_DLIST_TYPES(mod_env_parsed) +FR_DLIST_TYPEDEFS(mod_env_parsed, mod_env_parsed_head_t, mod_env_parsed_entry_t) + /** Named methods exported by a module * */ @@ -266,6 +270,16 @@ struct module_env_s { #define MODULE_ENV_TERMINATOR { NULL } +struct module_env_parsed_s { + mod_env_parsed_entry_t entry; //!< Entry in list of parsed module_env. + tmpl_t *tmpl; //!< Tmpl produced from parsing conf pair. + size_t opt_count; //!< Number of instances found of this option. + size_t multi_index; //!< Array index for this instance. + module_env_t const *rule; //!< Used to produce this. +}; + +FR_DLIST_FUNCS(mod_env_parsed, module_env_parsed_t, entry) + /** A list of modules * * This allows modules to be instantiated and freed in phases,