~ubuntu-branches/ubuntu/vivid/syslog-ng-incubator/vivid-proposed

« back to all changes in this revision

Viewing changes to modules/monitor-source/monitor-source-parser.c

  • Committer: Package Import Robot
  • Author(s): Gergely Nagy
  • Date: 2014-03-14 11:34:57 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140314113457-yqfw8yp81pysy32r
Tags: 0.2.1-1
* New upstream release:
  + New module: syslog-ng-mod-graphite
  + New module: syslog-ng-mod-elasticsearch
* debian/copyright updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
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>
 
5
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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
 
18
 *
 
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.
 
22
 *
 
23
 */
 
24
 
 
25
#include "monitor-source.h"
 
26
#include "cfg-parser.h"
 
27
#include "monitor-source-grammar.h"
 
28
 
 
29
extern int monitor_source_debug;
 
30
int monitor_parse(CfgLexer *lexer, LogDriver **instance, gpointer arg);
 
31
 
 
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 },
 
37
  { NULL }
 
38
};
 
39
 
 
40
CfgParser monitor_parser =
 
41
{
 
42
#if ENABLE_DEBUG
 
43
  .debug_flag = &monitor_source_debug,
 
44
#endif
 
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,
 
49
};
 
50
 
 
51
CFG_PARSER_IMPLEMENT_LEXER_BINDING(monitor_, LogDriver **)