89ec4dc5dd1472176a2c8debef3b8a4c00be3805
[freeradius.git] / src / include / modcall.h
1 /* modcall.h: the outside interface to the module-calling tree. Includes
2  * functions to build the tree from the config file, and to call it by
3  * feeding it REQUESTs.
4  *
5  * Version: $Id$ */
6
7 #include <freeradius-devel/conffile.h> /* Need CONF_* definitions */
8
9 /*
10  *      For each authorize/authtype/etc, we have an ordered
11  *      tree of instances to call.  This data structure keeps track
12  *      of that order.
13  */
14 typedef struct modcallable modcallable;
15
16 int modcall(int component, modcallable *c, REQUEST *request);
17
18 /* Parse a module-method's config section (e.g. authorize{}) into a tree that
19  * may be called with modcall() */
20 modcallable *compile_modgroup(modcallable *parent,
21                               int component, CONF_SECTION *cs);
22
23 /* Create a single modcallable node that references a module instance. This
24  * may be a CONF_SECTION containing action specifiers like "notfound = return"
25  * or a simple CONF_PAIR, in which case the default actions are used. */
26 modcallable *compile_modsingle(modcallable *parent, int component, CONF_ITEM *ci,
27                                const char **modname);
28
29 /* Add an entry to the end of a modgroup, creating it first if necessary */
30 void add_to_modcallable(modcallable **parent, modcallable *this,
31                         int component, const char *name);
32
33 /* Free a tree returned by compile_modgroup or compile_modsingle */
34 void modcallable_free(modcallable **pc);