new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / syscheckd / syscheck.h
1 /* Copyright (C) 2009 Trend Micro Inc.
2  * All right reserved.
3  *
4  * This program is a free software; you can redistribute it
5  * and/or modify it under the terms of the GNU General Public
6  * License (version 2) as published by the FSF - Free Software
7  * Foundation
8  */
9
10 #ifndef __SYSCHECK_H
11 #define __SYSCHECK_H
12
13 #include "config/syscheck-config.h"
14 #define MAX_LINE PATH_MAX+256
15
16 /* Notify list size */
17 #define NOTIFY_LIST_SIZE    32
18
19 /* Global config */
20 extern syscheck_config syscheck;
21
22 /** Function Prototypes **/
23
24 /* Check the integrity of the files against the saved database */
25 void run_check(void);
26
27 /* Run run_check periodically */
28 void start_daemon(void) __attribute__((noreturn));
29
30 /* Read the XML config */
31 int Read_Syscheck_Config(const char *cfgfile) __attribute__((nonnull));
32
33 /* Create the database */
34 int create_db(void);
35
36 /* Check database for changes */
37 int run_dbcheck(void);
38
39 /* Scan directory */
40 int read_dir(const char *dir_name, int opts, OSMatch *restriction);
41
42
43 /* Check the registry for changes */
44 void os_winreg_check(void);
45
46 /* Start real time */
47 int realtime_start(void);
48
49 /* Add a directory to real time monitoring */
50 int realtime_adddir(const char *dir) __attribute__((nonnull));
51
52 /* Process real time queue */
53 int realtime_process(void);
54
55 /* Process the content of the file changes */
56 char *seechanges_addfile(const char *filename) __attribute__((nonnull));
57
58 /* Get checksum changes */
59 int c_read_file(const char *file_name, const char *oldsum, char *newsum) __attribute__((nonnull));
60
61 int send_syscheck_msg(const char *msg) __attribute__((nonnull));
62 int send_rootcheck_msg(const char *msg) __attribute__((nonnull));
63
64 #endif
65