From: Nick Porter Date: Mon, 27 Feb 2023 15:59:20 +0000 (+0000) Subject: Define module_method_env_t and add to module_method_name_t X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfe1ef415855e2d362c34b7013977a2b1aabc90b;p=thirdparty%2Ffreeradius-server.git Define module_method_env_t and add to module_method_name_t Links lists of module_env_t with module methods and the data structures which the evaluated tmpls will populate. --- diff --git a/src/lib/server/module.h b/src/lib/server/module.h index b4bdfc6e14a..48e8c977eb1 100644 --- a/src/lib/server/module.h +++ b/src/lib/server/module.h @@ -43,6 +43,7 @@ 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_method_env_s module_method_env_t; typedef struct module_list_t module_list_t; #define MODULE_TYPE_THREAD_SAFE (0 << 0) //!< Module is threadsafe. @@ -122,14 +123,21 @@ extern "C" { FR_DLIST_TYPES(mod_env_parsed) FR_DLIST_TYPEDEFS(mod_env_parsed, mod_env_parsed_head_t, mod_env_parsed_entry_t) +struct module_method_env_s { + size_t inst_size; //!< Size of per call module env. + char const *inst_type; //!< Type of per call module env. + module_env_t const *env; //!< Parsing rules for module method env. +}; + /** Named methods exported by a module * */ struct module_method_name_s { - char const *name1; //!< i.e. "recv", "send", "process" - char const *name2; //!< The packet type i.e Access-Request, Access-Reject. + char const *name1; //!< i.e. "recv", "send", "process" + char const *name2; //!< The packet type i.e Access-Request, Access-Reject. - module_method_t method; //!< Module method to call + module_method_t method; //!< Module method to call + module_method_env_t const *method_env; //!< Call specific conf parsing. }; #define MODULE_NAME_TERMINATOR { NULL }