summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-01 13:58:22 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-01 13:58:22 +0000
commit00c4d034ba294dada5095413dd453b95fdbec968 (patch)
tree76f492c370d431b3a1683deb62d6cf0de65761f9 /syslogd.c
parente75225d3842cc64a80303d4b2b264e2a5d78e3f4 (diff)
downloadrsyslog-00c4d034ba294dada5095413dd453b95fdbec968.tar.gz
rsyslog-00c4d034ba294dada5095413dd453b95fdbec968.tar.xz
rsyslog-00c4d034ba294dada5095413dd453b95fdbec968.zip
moved definition of selector_t to syslogd.c again, as this now no longer is
a global structure
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/syslogd.c b/syslogd.c
index c99760e6..9b728e3c 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -574,6 +574,48 @@ struct action_s {
typedef struct action_s action_t;
+/* This structure represents the files that will have log
+ * copies printed.
+ * RGerhards 2004-11-08: Each instance of the filed structure
+ * describes what I call an "output channel". This is important
+ * to mention as we now allow database connections to be
+ * present in the filed structure. If helps immensely, if we
+ * think of it as the abstraction of an output channel.
+ * rgerhards, 2005-10-26: The structure below provides ample
+ * opportunity for non-thread-safety. Each of the variable
+ * accesses must be carefully evaluated, many of them probably
+ * be guarded by mutexes. But beware of deadlocks...
+ */
+struct filed {
+ struct filed *f_next; /* next in linked list */
+ /* filter properties */
+ enum {
+ FILTER_PRI = 0, /* traditional PRI based filer */
+ FILTER_PROP = 1 /* extended filter, property based */
+ } f_filter_type;
+ EHostnameCmpMode eHostnameCmpMode;
+ rsCStrObj *pCSHostnameComp; /* hostname to check */
+ rsCStrObj *pCSProgNameComp; /* tag to check or NULL, if not to be checked */
+ union {
+ u_char f_pmask[LOG_NFACILITIES+1]; /* priority mask */
+ struct {
+ rsCStrObj *pCSPropName;
+ 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 regular expression? */
+ } operation;
+ rsCStrObj *pCSCompValue; /* value to "compare" against */
+ char isNegated; /* actually a boolean ;) */
+ } prop;
+ } f_filterData;
+ action_t *pAction; /* pointer to the action descriptor */
+};
+typedef struct filed selector_t; /* new type name */
+
+
/* support for simple textual representation of FIOP names
* rgerhards, 2005-09-27
*/