import from HEAD:
[freeradius.git] / src / include / modpriv.h
1 /* modpriv.h: Stuff needed by both modules.c and modcall.c, but should not be
2  * accessed from anywhere else.
3  *
4  * Version: $Id$ */
5 #include "radiusd.h"
6 #include "modules.h"
7 #include "ltdl.h"
8
9 /*
10  *      Keep track of which modules we've loaded.
11  */
12 typedef struct module_list_t {
13         struct module_list_t    *next;
14         char                    name[MAX_STRING_LEN];
15         module_t                *module;
16         lt_dlhandle             handle;
17 } module_list_t;
18
19 /*
20  *      Per-instance data structure, to correlate the modules
21  *      with the instance names (may NOT be the module names!),
22  *      and the per-instance data structures.
23  */
24 typedef struct module_instance_t {
25         struct module_instance_t *next;
26         char                    name[MAX_STRING_LEN];
27         module_list_t           *entry;
28         void                    *insthandle;
29 #ifdef HAVE_PTHREAD_H
30         pthread_mutex_t         *mutex;
31 #endif
32 } module_instance_t;
33
34 module_instance_t *find_module_instance(const char *instname);