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