source: trunk/include/sh_modules.h@ 255

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

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

File size: 1.2 KB
RevLine 
[1]1
2#ifndef SH_MODULE_H
3#define SH_MODULE_H
4
[140]5#include "sh_pthread.h"
[1]6
7typedef struct rconf
8{
9 char * the_opt;
[68]10 int (*func)(const char * opt);
[1]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. */
[140]22 int (* mod_init) (struct mod_type * arg);
[1]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. */
[253]28 /* Return nonzero on fatal error or if module is disabled. */
[1]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
[140]43 SH_MUTEX(mod_mutex);
44
[1]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.