summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2006-02-16 11:56:31 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2006-02-16 11:56:31 +0000
commit324afbb734d9e36ce474f2b549f50b8a10fb2264 (patch)
treef0a6c7060464b743020553e273de94c195f020c1
parentec091abff842fb5fc94d99d50f94080d25666ce9 (diff)
downloadrsyslog-324afbb734d9e36ce474f2b549f50b8a10fb2264.tar.gz
rsyslog-324afbb734d9e36ce474f2b549f50b8a10fb2264.tar.xz
rsyslog-324afbb734d9e36ce474f2b549f50b8a10fb2264.zip
added some missing defines for solaris (solved the copy&paste prob via cvs
;))
-rw-r--r--syslogd.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/syslogd.c b/syslogd.c
index 2b5c1433..03a0c57d 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -191,6 +191,54 @@
#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
#define LOG_PRI(p) ((p) & LOG_PRIMASK)
#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
+typedef struct _code {
+ char *c_name;
+ int c_val;
+} CODE;
+
+CODE prioritynames[] =
+ {
+ { "alert", LOG_ALERT },
+ { "crit", LOG_CRIT },
+ { "debug", LOG_DEBUG },
+ { "emerg", LOG_EMERG },
+ { "err", LOG_ERR },
+ { "error", LOG_ERR }, /* DEPRECATED */
+ { "info", LOG_INFO },
+ { "none", INTERNAL_NOPRI }, /* INTERNAL */
+ { "notice", LOG_NOTICE },
+ { "panic", LOG_EMERG }, /* DEPRECATED */
+ { "warn", LOG_WARNING }, /* DEPRECATED */
+ { "warning", LOG_WARNING },
+ { NULL, -1 }
+ };
+
+CODE facilitynames[] =
+ {
+ { "auth", LOG_AUTH },
+ { "authpriv", LOG_AUTHPRIV },
+ { "cron", LOG_CRON },
+ { "daemon", LOG_DAEMON },
+ { "ftp", LOG_FTP },
+ { "kern", LOG_KERN },
+ { "lpr", LOG_LPR },
+ { "mail", LOG_MAIL },
+ { "mark", INTERNAL_MARK }, /* INTERNAL */
+ { "news", LOG_NEWS },
+ { "security", LOG_AUTH }, /* DEPRECATED */
+ { "syslog", LOG_SYSLOG },
+ { "user", LOG_USER },
+ { "uucp", LOG_UUCP },
+ { "local0", LOG_LOCAL0 },
+ { "local1", LOG_LOCAL1 },
+ { "local2", LOG_LOCAL2 },
+ { "local3", LOG_LOCAL3 },
+ { "local4", LOG_LOCAL4 },
+ { "local5", LOG_LOCAL5 },
+ { "local6", LOG_LOCAL6 },
+ { "local7", LOG_LOCAL7 },
+ { NULL, -1 }
+ };
#endif
#include "rsyslog.h"