diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:49:46 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:49:46 +0000 |
commit | 50b37d4a27d3295a29afca2286f1a5a086142cec (patch) | |
tree | 9212f763934ee090ef72d823f559f52ce387f268 /src/include/modcall.h | |
parent | Initial commit. (diff) | |
download | freeradius-upstream/3.2.1+dfsg.tar.xz freeradius-upstream/3.2.1+dfsg.zip |
Adding upstream version 3.2.1+dfsg.upstream/3.2.1+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/include/modcall.h')
-rw-r--r-- | src/include/modcall.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/include/modcall.h b/src/include/modcall.h new file mode 100644 index 0000000..7486ef1 --- /dev/null +++ b/src/include/modcall.h @@ -0,0 +1,55 @@ +#ifndef FR_MODCALL_H +#define FR_MODCALL_H + +/* modcall.h: the outside interface to the module-calling tree. Includes + * functions to build the tree from the config file, and to call it by + * feeding it REQUESTs. + * + * Version: $Id$ */ + +#include <freeradius-devel/conffile.h> /* Need CONF_* definitions */ +#include <freeradius-devel/modules.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * For each authorize/authtype/etc, we have an ordered + * tree of instances to call. This data structure keeps track + * of that order. + */ +typedef struct modcallable modcallable; + +int modcall_fixup_update(vp_map_t *map, void *ctx); + +int modcall(rlm_components_t component, modcallable *c, REQUEST *request); + +/* Parse a module-method's config section (e.g. authorize{}) into a tree that + * may be called with modcall() */ +modcallable *compile_modgroup(modcallable *parent, + rlm_components_t component, CONF_SECTION *cs); + +/* Create a single modcallable node that references a module instance. This + * may be a CONF_SECTION containing action specifiers like "notfound = return" + * or a simple CONF_PAIR, in which case the default actions are used. */ +modcallable *compile_modsingle(TALLOC_CTX *ctx, modcallable **parent, rlm_components_t component, CONF_ITEM *ci, + char const **modname); + +/* + * Do the second pass on compiling the modules. + */ +bool modcall_pass2(modcallable *mc); + +/* Add an entry to the end of a modgroup */ +void add_to_modcallable(modcallable *parent, modcallable *this); + +void modcall_debug(modcallable *mc, int depth); + +int modcall_pass2_condition(fr_cond_t *c); + +#ifdef __cplusplus +} +#endif + +#endif |