source: trunk/include/sh_modules.h@ 415

Last change on this file since 415 was 259, checked in by katerina, 15 years ago

Use inotify in utmp module (ticket #177).

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