2
* Copyright (c) 2014 BalaBit IT Ltd, Budapest, Hungary
3
* Copyright (c) 2014 Gergely Nagy <algernon@balabit.hu>
4
* Copyright (c) 2014 Viktor Tusa <tusa@balabit.hu>
6
* This program is free software; you can redistribute it and/or modify it
7
* under the terms of the GNU General Public License version 2 as published
8
* by the Free Software Foundation, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
* As an additional exemption you are allowed to compile & link against the
20
* OpenSSL libraries as published by the OpenSSL project. See the file
21
* COPYING for details.
25
#include "monitor-source.h"
26
#include "cfg-parser.h"
27
#include "monitor-source-grammar.h"
29
extern int monitor_source_debug;
30
int monitor_parse(CfgLexer *lexer, LogDriver **instance, gpointer arg);
32
static CfgLexerKeyword monitor_keywords[] = {
33
{ "monitor", KW_MONITOR },
34
{ "monitor_freq", KW_MONITOR_FREQ },
35
{ "monitor_script", KW_MONITOR_SCRIPT },
36
{ "monitor_func", KW_MONITOR_FUNC },
40
CfgParser monitor_parser =
43
.debug_flag = &monitor_source_debug,
45
.name = "monitor-source",
46
.keywords = monitor_keywords,
47
.parse = (int (*)(CfgLexer *lexer, gpointer *instance, gpointer)) monitor_parse,
48
.cleanup = (void (*)(gpointer)) log_pipe_unref,
51
CFG_PARSER_IMPLEMENT_LEXER_BINDING(monitor_, LogDriver **)