syslog-ng source
pdb-rule.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2013, 2015 Balabit
3  * Copyright (c) 1998-2013, 2015 Balázs Scheidler
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 as published
7  * by the Free Software Foundation, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * As an additional exemption you are allowed to compile & link against the
19  * OpenSSL libraries as published by the OpenSSL project. See the file
20  * COPYING for details.
21  *
22  */
23 #ifndef CORRELATION_PDB_RULE_H_INCLUDED
24 #define CORRELATION_PDB_RULE_H_INCLUDED
25 
26 #include "syslog-ng.h"
27 #include "pdb-action.h"
28 
29 /* this class encapsulates a the verdict of a rule in the pattern
30  * database and is stored as the "value" member in the RADIX tree
31  * node. It contains a reference to the original rule in the rule
32  * database. */
33 typedef struct _PDBRule PDBRule;
34 struct _PDBRule
35 {
37  gchar *class;
38  gchar *rule_id;
41  GPtrArray *actions;
42 };
43 
44 void pdb_rule_set_class(PDBRule *self, const gchar *class);
45 void pdb_rule_set_rule_id(PDBRule *self, const gchar *rule_id);
46 void pdb_rule_add_action(PDBRule *self, PDBAction *action);
47 gchar *pdb_rule_get_name(PDBRule *self);
48 
49 PDBRule *pdb_rule_new(void);
50 PDBRule *pdb_rule_ref(PDBRule *self);
51 void pdb_rule_unref(PDBRule *self);
52 
53 #endif
PDBRule * pdb_rule_ref(PDBRule *self)
Definition: pdb-rule.c:81
void pdb_rule_add_action(PDBRule *self, PDBAction *action)
Definition: pdb-rule.c:53
void pdb_rule_set_class(PDBRule *self, const gchar *class)
Definition: pdb-rule.c:27
gchar * pdb_rule_get_name(PDBRule *self)
Definition: pdb-rule.c:61
void pdb_rule_unref(PDBRule *self)
Definition: pdb-rule.c:88
void pdb_rule_set_rule_id(PDBRule *self, const gchar *rule_id)
Definition: pdb-rule.c:45
PDBRule * pdb_rule_new(void)
Definition: pdb-rule.c:70
Definition: atomic.h:31
Definition: pdb-action.h:48
Definition: synthetic-context.h:31
Definition: synthetic-message.h:45
Definition: pdb-rule.h:35
SyntheticMessage msg
Definition: pdb-rule.h:39
gchar * rule_id
Definition: pdb-rule.h:38
SyntheticContext context
Definition: pdb-rule.h:40
GPtrArray * actions
Definition: pdb-rule.h:41
GAtomicCounter ref_cnt
Definition: pdb-rule.h:36