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