From d6b22dd69ea85d024eaaac93e2a6521669f1ccc0 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 14 Feb 2008 13:15:47 +0000 Subject: moved decoding of syslog names to a more appropriate place --- srUtils.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'srUtils.h') diff --git a/srUtils.h b/srUtils.h index 6b4bb1bb..3a66dc22 100755 --- a/srUtils.h +++ b/srUtils.h @@ -27,6 +27,21 @@ #ifndef __SRUTILS_H_INCLUDED__ #define __SRUTILS_H_INCLUDED__ 1 + +/* syslog names */ +#define INTERNAL_NOPRI 0x10 /* the "no priority" priority */ +#define TABLE_NOPRI 0 /* Value to indicate no priority in f_pmask */ +#define TABLE_ALLPRI 0xFF /* Value to indicate all priorities in f_pmask */ +#define LOG_MARK LOG_MAKEPRI(LOG_NFACILITIES, 0) /* mark "facility" */ + +struct code { + char *c_name; + int c_val; +}; + +extern struct code syslogPriNames[]; +extern struct code syslogFacNames[]; + /** * A reimplementation of itoa(), as this is not available * on all platforms. We used the chance to make an interface @@ -71,6 +86,7 @@ long timeoutVal(struct timespec *pt); void mutexCancelCleanup(void *arg); void srSleep(int iSeconds, int iuSeconds); char *rs_strerror_r(int errnum, char *buf, size_t buflen); +int decodeSyslogName(uchar *name, struct code *codetab); /* mutex operations */ /* some macros to cancel-safe lock a mutex (it will automatically be released -- cgit v1.2.3