import from branch_1_1:
[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                               const char *filename);
23
24 /* Create a single modcallable node that references a module instance. This
25  * may be a CONF_SECTION containing action specifiers like "notfound = return"
26  * or a simple CONF_PAIR, in which case the default actions are used. */
27 modcallable *compile_modsingle(modcallable *parent, int component, CONF_ITEM *ci,
28                                const char *filename, const char **modname);
29
30 /* Add an entry to the end of a modgroup, creating it first if necessary */
31 void add_to_modcallable(modcallable **parent, modcallable *this,
32                         int component, const char *name);
33
34 /* Free a tree returned by compile_modgroup or compile_modsingle */
35 void modcallable_free(modcallable **pc);