Imported Upstream version 2.7
[ossec-hids.git] / src / logcollector / logcollector.h
1 /* @(#) $Id: ./src/logcollector/logcollector.h, 2012/03/28 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
15 #ifndef __LOGREADER_H
16
17 #define __LOGREADER_H
18
19 #ifndef ARGV0
20 #define ARGV0 "ossec-logcollector"
21 #endif
22
23
24 #include "shared.h"
25 #include "config/localfile-config.h"
26 #include "config/config.h"
27
28
29
30
31 /*** Function prototypes ***/
32
33
34 /* Read logcollector config */
35 int LogCollectorConfig(char * cfgfile, int accept_remote);
36
37 /* Stary log collector daemon */
38 void LogCollectorStart();
39
40 /* Handle files */
41 int handle_file(int i, int do_fseek, int do_log);
42
43 /* Read syslog file */
44 void *read_syslog(int pos, int *rc, int drop_it);
45
46 /* Read snort full file */
47 void *read_snortfull(int pos, int *rc, int drop_it);
48
49 /* Read ossec alert file */
50 void *read_ossecalert(int pos, int *rc, int drop_it);
51
52 /* Read nmap grepable format */
53 void *read_nmapg(int pos, int *rc, int drop_it);
54
55 /* Read mysql log format */
56 void *read_mysql_log(int pos, int *rc, int drop_it);
57
58 /* Read mysql log format */
59 void *read_mssql_log(int pos, int *rc, int drop_it);
60
61 /* Read postgresql log format */
62 void *read_postgresql_log(int pos, int *rc, int drop_it);
63
64 /* read multi line logs. */
65 void *read_multiline(int pos, int *rc, int drop_it);
66
67 /* Read DJB multilog format */
68 /* Initializes multilog. */
69 int init_djbmultilog(int pos);
70 void *read_djbmultilog(int pos, int *rc, int drop_it);
71
72
73 /* Read events from output of command */
74 void *read_command(int pos, int *rc, int drop_it);
75 void *read_fullcommand(int pos, int *rc, int drop_it);
76
77
78 #ifdef WIN32
79 /* Windows only */
80 void win_startel();
81 void win_readel();
82 void win_read_vista_sec();
83 #endif
84
85
86 /*** Global variables ***/
87
88
89 int loop_timeout;
90 int logr_queue;
91 int open_file_attempts;
92 logreader *logff;
93
94
95 #endif