suricata
util-syslog.c
Go to the documentation of this file.
1/* Copyright (C) 2007-2013 Open Information Security Foundation
2 *
3 * You can copy, redistribute or modify this Program under the terms of
4 * the GNU General Public License version 2 as published by the Free
5 * Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * version 2 along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17
18/**
19 * \file
20 *
21 * \author Gurvinder Singh <gurvindersinghdahiya@gmail.com>
22 *
23 * Syslog utility file
24 *
25 */
26
27#include "suricata-common.h"
28#include "util-syslog.h"
29
30/* holds the string-enum mapping for the syslog facility in SCLogOPIfaceCtx */
32 { "auth", LOG_AUTH },
33 { "authpriv", LOG_AUTHPRIV },
34 { "cron", LOG_CRON },
35 { "daemon", LOG_DAEMON },
36 { "ftp", LOG_FTP },
37 { "kern", LOG_KERN },
38 { "lpr", LOG_LPR },
39 { "mail", LOG_MAIL },
40 { "news", LOG_NEWS },
41 { "security", LOG_AUTH },
42 { "syslog", LOG_SYSLOG },
43 { "user", LOG_USER },
44 { "uucp", LOG_UUCP },
45 { "local0", LOG_LOCAL0 },
46 { "local1", LOG_LOCAL1 },
47 { "local2", LOG_LOCAL2 },
48 { "local3", LOG_LOCAL3 },
49 { "local4", LOG_LOCAL4 },
50 { "local5", LOG_LOCAL5 },
51 { "local6", LOG_LOCAL6 },
52 { "local7", LOG_LOCAL7 },
53 { NULL, -1 }
54};
55
56/** \brief returns the syslog facility enum map */
61
63 { "Emergency", LOG_EMERG },
64 { "Alert", LOG_ALERT },
65 { "Critical", LOG_CRIT },
66 { "Error", LOG_ERR },
67 { "Warning", LOG_WARNING },
68 { "Notice", LOG_NOTICE },
69 { "Info", LOG_INFO },
70 { "Debug", LOG_DEBUG },
71 { NULL, -1 }
72};
73
74/** \brief returns the syslog facility enum map */
79
SCEnumCharMap * SCSyslogGetLogLevelMap(void)
returns the syslog facility enum map
Definition util-syslog.c:75
SCEnumCharMap sc_syslog_facility_map[]
Definition util-syslog.c:31
SCEnumCharMap * SCSyslogGetFacilityMap(void)
returns the syslog facility enum map
Definition util-syslog.c:57
SCEnumCharMap sc_syslog_level_map[]
Definition util-syslog.c:62
#define LOG_ALERT
#define LOG_MAIL
#define LOG_AUTH
#define LOG_LOCAL0
#define LOG_CRON
#define LOG_KERN
#define LOG_LOCAL2
#define LOG_LPR
#define LOG_EMERG
#define LOG_AUTHPRIV
#define LOG_DEBUG
#define LOG_LOCAL6
#define LOG_LOCAL4
#define LOG_ERR
#define LOG_DAEMON
#define LOG_CRIT
#define LOG_SYSLOG
#define LOG_UUCP
#define LOG_LOCAL5
#define LOG_USER
#define LOG_FTP
#define LOG_NOTICE
#define LOG_LOCAL3
#define LOG_WARNING
#define LOG_LOCAL1
#define LOG_LOCAL7
#define LOG_NEWS
#define LOG_INFO