X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=src%2Finclude%2Fmodules.h;h=dbb17f3de6597fe988c8ea4de3d160db5cc5d53d;hb=e2eaf9194b16fdd15ebf274aafd05edc9fefb4bb;hp=c9877846e27b8556dc367c3a4bc969f514684b3c;hpb=ead2df5a7a288fde62552da2e05014c7acedd84e;p=freeradius.git diff --git a/src/include/modules.h b/src/include/modules.h index c987784..dbb17f3 100644 --- a/src/include/modules.h +++ b/src/include/modules.h @@ -7,8 +7,16 @@ #ifndef RADIUS_MODULES_H #define RADIUS_MODULES_H + +#include +RCSIDH(modules_h, "$Id$") + #include +#ifdef __cplusplus +extern "C" { +#endif + typedef int (*packetmethod)(void *instance, REQUEST *request); enum { @@ -20,13 +28,19 @@ enum { RLM_COMPONENT_PRE_PROXY, /* 5 */ RLM_COMPONENT_POST_PROXY, /* 6 */ RLM_COMPONENT_POST_AUTH, /* 7 */ - RLM_COMPONENT_COUNT /* 8: How many components are there */ +#ifdef WITH_COA + RLM_COMPONENT_RECV_COA, /* 8 */ + RLM_COMPONENT_SEND_COA, /* 9 */ +#endif + RLM_COMPONENT_COUNT /* 8 / 10: How many components are there */ }; -#define RLM_TYPE_THREAD_SAFE (0 << 0) -#define RLM_TYPE_THREAD_UNSAFE (1 << 0) +#define RLM_TYPE_THREAD_SAFE (0 << 0) +#define RLM_TYPE_THREAD_UNSAFE (1 << 0) +#define RLM_TYPE_CHECK_CONFIG_SAFE (1 << 1) +#define RLM_TYPE_HUP_SAFE (1 << 2) -#define RLM_MODULE_MAGIC_NUMBER ((uint32_t) (0xf4ee4ad2)) +#define RLM_MODULE_MAGIC_NUMBER ((uint32_t) (0xf4ee4ad3)) #define RLM_MODULE_INIT RLM_MODULE_MAGIC_NUMBER typedef struct module_t { @@ -51,8 +65,9 @@ enum { RLM_MODULE_NUMCODES /* How many return codes there are */ }; -int setup_modules(int); +int setup_modules(int, CONF_SECTION *); int detach_modules(void); +int module_hup(CONF_SECTION *modules); int module_authorize(int type, REQUEST *request); int module_authenticate(int type, REQUEST *request); int module_preacct(REQUEST *request); @@ -61,5 +76,23 @@ int module_checksimul(int type, REQUEST *request, int maxsimul); int module_pre_proxy(int type, REQUEST *request); int module_post_proxy(int type, REQUEST *request); int module_post_auth(int type, REQUEST *request); +#ifdef WITH_COA +int module_recv_coa(int type, REQUEST *request); +int module_send_coa(int type, REQUEST *request); +#define MODULE_NULL_COA_FUNCS ,NULL,NULL +#else +#define MODULE_NULL_COA_FUNCS +#endif +int indexed_modcall(int comp, int idx, REQUEST *request); + +/* + * For now, these are strongly tied together. + */ +int virtual_servers_load(CONF_SECTION *config); +void virtual_servers_free(time_t when); + +#ifdef __cplusplus +} +#endif #endif /* RADIUS_MODULES_H */