]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Define module_env_parsed_t to hold parsed module_env_t
authorNick Porter <nick@portercomputing.co.uk>
Mon, 27 Feb 2023 15:52:25 +0000 (15:52 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 10 Mar 2023 17:18:34 +0000 (17:18 +0000)
src/lib/server/module.h

index 9292a0761eef875026b6f69b1ecd284f1c050b1e..b4bdfc6e14a5222f72682e06416a47ac578ecd45 100644 (file)
@@ -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,