OpenVAS Libraries  4.0+rc3.SVN
severity_filter.h
1 /* OpenVAS-Client
2  *
3  * Description: Structures and protos for Severity Filters
4  *
5  * Authors:
6  * Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>
7  *
8  * Copyright:
9  * Copyright (C) 2009 Greenbone Networks GmbH
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License version 2,
13  * or, at your option, any later version as published by the Free
14  * Software Foundation
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25 
26 #ifndef _UTIL_SEVERITYFILTER_H
27 #define _UTIL_SEVERITYFILTER_H
28 
29 #include <glib.h>
30 
34 typedef struct severity_filter
35 {
36  gchar *name;
37  gchar *filename;
38  GSList *overrides;
40 
41 /* temporary, should be part of the global context */
42 extern severity_filter_t *global_filter;
43 
58 typedef struct severity_override
59 {
60  gchar *name;
61  gchar *host;
62  gchar *port;
64  gchar *OID;
65  gchar *reason;
66  gchar *severity_from;
67  gchar *severity_to;
68  gboolean active;
70 
71 
72 severity_filter_t *severity_filter_new (const gchar *, const gchar *);
75  * filter,
76  const
78  override);
80  const gchar * host,
81  const gchar * port,
82  const gchar * oid,
83  const gchar * from);
85 const gchar *severity_filter_apply (const gchar *, const gchar *, const gchar *,
86  const gchar *);
87 gboolean severity_filter_remove (severity_filter_t * filter,
88  severity_override_t * override);
89 
90 const severity_override_t *severity_override_new (const gchar *, const gchar *,
91  const gchar *, const gchar *,
92  const gchar *, const gchar *,
93  const gchar *, gboolean);
97 
99 
100 #endif /* _UTIL_SEVERITYFILTER_H */