summaryrefslogtreecommitdiffstats
path: root/runtime/rsyslog.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-10 16:49:14 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-10 16:49:14 +0200
commit6f4e3c4e4c85acdcf58969970484a54639ecc8f9 (patch)
tree1e3470e4ac9738c7713f1ef1a0558ed881457d44 /runtime/rsyslog.h
parent9704f129f72ec9ece11aeccea4bbf0cbccb116cb (diff)
downloadrsyslog-6f4e3c4e4c85acdcf58969970484a54639ecc8f9.tar.gz
rsyslog-6f4e3c4e4c85acdcf58969970484a54639ecc8f9.tar.xz
rsyslog-6f4e3c4e4c85acdcf58969970484a54639ecc8f9.zip
restructered code in perparation for multiple rule set support
... this was long overdue, and I finlly tackeld it. It turned out to be more complex than I initially thought. The next step now probably is to actually implement multiple rule sets and the beauty that comes with them.
Diffstat (limited to 'runtime/rsyslog.h')
-rw-r--r--runtime/rsyslog.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h
index f93592b7..b587554e 100644
--- a/runtime/rsyslog.h
+++ b/runtime/rsyslog.h
@@ -62,7 +62,9 @@
typedef unsigned char uchar;/* get rid of the unhandy "unsigned char" */
typedef struct thrdInfo thrdInfo_t;
typedef struct obj_s obj_t;
-typedef struct filed selector_t;/* TODO: this so far resides in syslogd.c, think about modularization */
+typedef struct ruleset_s ruleset_t;
+typedef struct rule_s rule_t;
+//typedef struct filed selector_t;/* TODO: this so far resides in syslogd.c, think about modularization */
typedef struct NetAddr netAddr_t;
typedef struct netstrms_s netstrms_t;
typedef struct netstrm_s netstrm_t;
@@ -112,6 +114,16 @@ typedef enum {
eFLOWCTL_FULL_DELAY = 2 /**< delay possible for extended period of time */
} flowControl_t;
+/* filter operations */
+typedef enum {
+ FIOP_NOP = 0, /* do not use - No Operation */
+ FIOP_CONTAINS = 1, /* contains string? */
+ FIOP_ISEQUAL = 2, /* is (exactly) equal? */
+ FIOP_STARTSWITH = 3, /* starts with a string? */
+ FIOP_REGEX = 4, /* matches a (BRE) regular expression? */
+ FIOP_EREREGEX = 5 /* matches a ERE regular expression? */
+} fiop_t;
+
/* The error codes below are orginally "borrowed" from
* liblogging. As such, we reserve values up to -2999
@@ -367,6 +379,11 @@ typedef enum rsObjectID rsObjID;
# define O_CLOEXEC 0
#endif
+/* some constants */
+// TODO: do we really need them - if not, delete -- rgerhards, 2009-06-10
+#define IGNORE_ERROR_CODES 1
+#define ABORT_ON_ERROR 0
+
/* The following prototype is convenient, even though it may not be the 100% correct place.. -- rgerhards 2008-01-07 */
void dbgprintf(char *, ...) __attribute__((format(printf, 1, 2)));