diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-14 13:15:47 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-14 13:15:47 +0000 |
commit | d6b22dd69ea85d024eaaac93e2a6521669f1ccc0 (patch) | |
tree | 3652ab876ad9af0bdb1c855a62bbbf826a7ff21f /srUtils.h | |
parent | 5e747be2d0bd05f1c075a2e12bfad56844ddc7d1 (diff) | |
download | rsyslog-d6b22dd69ea85d024eaaac93e2a6521669f1ccc0.tar.gz rsyslog-d6b22dd69ea85d024eaaac93e2a6521669f1ccc0.tar.xz rsyslog-d6b22dd69ea85d024eaaac93e2a6521669f1ccc0.zip |
moved decoding of syslog names to a more appropriate place
Diffstat (limited to 'srUtils.h')
-rwxr-xr-x | srUtils.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 |