syslog-ng source
pdb-lookup-params.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2017 Balabit
3  * Copyright (c) 1998-2017 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 
24 #ifndef CORRELATION_PDB_LOOKUP_PARAMS_H_INCLUDED
25 #define CORRELATION_PDB_LOOKUP_PARAMS_H_INCLUDED
26 
27 #include <template/templates.h>
28 #include "logmsg/logmsg.h"
29 
30 typedef struct _PDBLookupParams PDBLookupParams;
32 {
33  LogMessage *msg;
35  LogTemplate *program_template;
37  const gchar *message_string;
38  gssize message_len;
39 };
40 
41 void pdb_lookup_params_init(PDBLookupParams *lookup, LogMessage *msg, LogTemplate *program_template);
42 
43 static inline void
44 pdb_lookup_params_override_message(PDBLookupParams *lookup, const gchar *message, gssize message_len)
45 {
46  lookup->message_handle = LM_V_NONE;
47  lookup->message_string = message;
48  lookup->message_len = message_len;
49 }
50 #endif
@ LM_V_NONE
Definition: logmsg.h:78
guint32 NVHandle
Definition: nvtable.h:35
void pdb_lookup_params_init(PDBLookupParams *lookup, LogMessage *msg, LogTemplate *program_template)
Definition: pdb-lookup-params.c:40
Definition: pdb-lookup-params.h:32
LogTemplate * program_template
Definition: pdb-lookup-params.h:35
LogMessage * msg
Definition: pdb-lookup-params.h:33
const gchar * message_string
Definition: pdb-lookup-params.h:37
NVHandle message_handle
Definition: pdb-lookup-params.h:36
NVHandle program_handle
Definition: pdb-lookup-params.h:34
gssize message_len
Definition: pdb-lookup-params.h:38
LogMessage * msg
Definition: test_rename.c:35
lookup_method lookup
Definition: tfgetent.c:138