1 /* modpriv.h: Stuff needed by both modules.c and modcall.c, but should not be
2 * accessed from anywhere else.
8 #include <freeradius-devel/radiusd.h>
9 #include <freeradius-devel/modules.h>
12 * Using the native dlopen() API means that we don't want to use libltdl.
15 #define WITHOUT_LIBLTDL
18 #ifndef WITHOUT_LIBLTDL
21 typedef void *lt_dlhandle;
23 lt_dlhandle lt_dlopenext(const char *name);
24 void *lt_dlsym(lt_dlhandle handle, const char *symbol);
25 int lt_dlclose(lt_dlhandle handle);
26 const char *lt_dlerror(void);
28 #define LTDL_SET_PRELOADED_SYMBOLS(_x)
29 #define lt_dlinit(_x) (0)
31 #define lt_dlsetsearchpath(_x)
35 * Keep track of which modules we've loaded.
37 typedef struct module_entry_t {
38 char name[MAX_STRING_LEN];
39 const module_t *module;
43 typedef struct fr_module_hup_t fr_module_hup_t;
46 * Per-instance data structure, to correlate the modules
47 * with the instance names (may NOT be the module names!),
48 * and the per-instance data structures.
50 typedef struct module_instance_t {
51 char name[MAX_STRING_LEN];
52 module_entry_t *entry;
55 pthread_mutex_t *mutex;
62 module_instance_t *find_module_instance(CONF_SECTION *, const char *instname,
64 int module_hup_module(CONF_SECTION *cs, module_instance_t *node, time_t when);
65 #endif /* FR_MODPRIV_H */