source: trunk/include/sh_modules.h@ 254

Last change on this file since 254 was 253, checked in by katerina, 15 years ago

Run SUID check in seperate thread (ticket #170).

File size: 1.2 KB
Line 
1
2#ifndef SH_MODULE_H
3#define SH_MODULE_H
4
5#include "sh_pthread.h"
6
7typedef struct rconf
8{
9 char * the_opt;
10 int (*func)(const char * opt);
11} sh_rconf;
12
13typedef struct mod_type
14{
15 /* The name of the module */
16 char * name;
17
18 /* Set by samhain to 1 on successful initialization, else 0 */
19 int initval;
20
21 /* The initialization function. Return 0 on success. */
22 int (* mod_init) (struct mod_type * arg);
23
24 /* The timer function. Return 0 if NOT time to check. */
25 int (* mod_timer) (time_t tcurrent);
26
27 /* The check function. Return 0 on success. */
28 /* Return nonzero on fatal error or if module is disabled. */
29 int (* mod_check) (void);
30
31 /* The cleanup function. Return 0 on success. */
32 int (* mod_cleanup) (void);
33
34 /* The preparation for reconfiguration. Return 0 on success. */
35 int (* mod_reconf) (void);
36
37 /* Section header in config file */
38 char * conf_section;
39
40 /* A table of key/handler_function for config file entries */
41 sh_rconf * conf_table;
42
43 SH_MUTEX(mod_mutex);
44
45} sh_mtype;
46
47
48extern sh_mtype modList[];
49
50
51/* #ifndef SH_MODULE_H */
52#endif
Note: See TracBrowser for help on using the repository browser.