new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / headers / report_op.h
1 /* Copyright (C) 2009 Trend Micro Inc.
2  * All rights 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 __REPORT_OP_H
11 #define __REPORT_OP_H
12
13 #define REPORT_RELATED      1
14 #define REPORT_FILTER       2
15
16 #define REPORT_REL_USER          0x001
17 #define REPORT_REL_SRCIP         0x002
18 #define REPORT_REL_LEVEL         0x004
19 #define REPORT_REL_RULE          0x010
20 #define REPORT_REL_GROUP         0x020
21 #define REPORT_REL_LOCATION      0x040
22 #define REPORT_TYPE_DAILY        0x100
23 #define REPORT_REL_FILE          0x200
24
25 typedef struct _report_filter {
26     const char *report_name;
27
28     const char *group;
29     const char *rule;
30     const char *level;
31     const char *location;
32     const char *user;
33     const char *srcip;
34     const char *files;
35     char *filename;
36
37     OSStore *top_user;
38     OSStore *top_srcip;
39     OSStore *top_level;
40     OSStore *top_rule;
41     OSStore *top_group;
42     OSStore *top_location;
43     OSStore *top_files;
44
45     int related_user;
46     int related_file;
47     int related_srcip;
48     int related_level;
49     int related_rule;
50     int related_group;
51     int related_location;
52
53     int report_type;
54     int show_alerts;
55     FILE *fp;
56
57 } report_filter;
58
59 int  os_report_configfilter(const char *filter_by, const char *filter_value,
60                             report_filter *r_filter, int arg_type) __attribute__((nonnull(3)));
61 void os_report_printtop(void *topstore, const char *hname, int print_related) __attribute__((nonnull));
62 void os_ReportdStart(report_filter *r_filter) __attribute__((nonnull));
63
64 #endif
65