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