Imported Upstream version 2.7
[ossec-hids.git] / src / syscheckd / syscheck.h
1 /* @(#) $Id: ./src/syscheckd/syscheck.h, 2011/09/08 dcid Exp $
2  */
3
4 /* Copyright (C) 2009 Trend Micro Inc.
5  * All right reserved.
6  *
7  * This program is a free software; you can redistribute it
8  * and/or modify it under the terms of the GNU General Public
9  * License (version 2) as published by the FSF - Free Software
10  * Foundation
11  */
12
13
14 #ifndef __SYSCHECK_H
15
16 #define __SYSCHECK_H
17
18 #include "config/syscheck-config.h"
19 #define MAX_LINE PATH_MAX+256
20
21 /* Notify list size */
22 #define NOTIFY_LIST_SIZE    32
23
24
25 /* Global config */
26 config syscheck;
27
28
29 /** Function Prototypes **/
30
31 /* run_check: checks the integrity of the files against the
32  * saved database
33  */
34 void run_check();
35
36
37 /* start_daemon: Runs run_check periodically.
38  */
39 void start_daemon();
40
41
42 /* Read the XML config */
43 int Read_Syscheck_Config(char * cfgfile);
44
45
46 /* create the database */
47 int create_db();
48
49
50 /* int run_dbcheck()
51  * Checks database for changes.
52  */
53 int run_dbcheck();
54
55 /** void os_winreg_check()
56  * Checks the registry for changes.
57  */
58 void os_winreg_check();
59
60 /* starts real time */
61 int realtime_start();
62
63 /* Adds a directory to real time monitoring. */
64 int realtime_adddir(char *dir);
65
66 /* Process real time queue. */
67 int realtime_process();
68
69 /* Process the content of the file changes. */
70 char *seechanges_addfile(char *filename);
71
72 /* get checksum changes. */
73 int c_read_file(char *file_name, char *oldsum, char *newsum);
74
75 /** Sends syscheck message.
76  */
77 int send_syscheck_msg(char *msg);
78 int send_rootcheck_msg(char *msg);
79
80
81 #endif
82
83 /* EOF */