1 /*
2 * Copyright (c) 2019 Balabit
3 * Copyright (c) 2002-2011 BalaBit IT Ltd, Budapest, Hungary
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 #include "cfg-parser.h"
25 #include "plugin.h"
26 #include "plugin-types.h"
27
28 extern CfgParser afsnmp_parser;
29
30 static Plugin afsnmp_plugins[] =
31 {
32 {
33 .type = LL_CONTEXT_DESTINATION,
34 .name = "snmp",
35 .parser = &afsnmp_parser,
36 },
37 {
38 .type = LL_CONTEXT_PARSER,
39 .name = "snmptrapd-parser",
40 .parser = &afsnmp_parser,
41 },
42 };
43
44 gboolean
afsnmp_module_init(PluginContext * context,CfgArgs * args)45 afsnmp_module_init(PluginContext *context, CfgArgs *args)
46 {
47 plugin_register(context, afsnmp_plugins, G_N_ELEMENTS(afsnmp_plugins));
48 return TRUE;
49 }
50
51 const ModuleInfo module_info =
52 {
53 .canonical_name = "afsnmp",
54 .version = SYSLOG_NG_VERSION,
55 .description = "The snmp module provides SNMP support for syslog-ng.",
56 .core_revision = SYSLOG_NG_SOURCE_REVISION,
57 .plugins = afsnmp_plugins,
58 .plugins_len = G_N_ELEMENTS(afsnmp_plugins)
59 };
60
61