From cd2b24dfc45c4b115ace6d17ab0237511fef3d66 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards
Date: Tue, 19 Feb 2008 10:30:42 +0000
Subject: - added doc on how expressions will work - cleaned up the stringbuf
Construct interface - did some cleanup on stringbuf calls - we now have much
better interfaces and macros
---
ChangeLog | 3 +
Makefile.am | 1 +
cfsysline.c | 3 +-
doc/Makefile.am | 1 +
doc/expression.html | 24 ++++++++
doc/history.html | 4 +-
doc/imfile.html | 9 +--
doc/professional_support.html | 125 +++---------------------------------------
expr.c | 68 +++++++++++------------
msg.c | 68 +++++++++++------------
obj-types.h | 5 +-
obj.c | 6 +-
outchannel.c | 4 +-
parse.c | 27 ++++-----
stream.c | 3 +-
stringbuf.c | 31 +++++++----
stringbuf.h | 2 +-
syslogd.c | 4 +-
template.c | 11 ++--
19 files changed, 157 insertions(+), 242 deletions(-)
create mode 100644 doc/expression.html
diff --git a/ChangeLog b/ChangeLog
index 535bf4e3..1badc202 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
---------------------------------------------------------------------------
Version 3.12.0 (rgerhards), 2008-02-??
+- bugfix: debug.html was missing from release tarball - thanks to Michael
+ Biebl for bringing this to my attention
+- some internal cleanup on the stringbuf object calling interface
---------------------------------------------------------------------------
Version 3.11.3 (rgerhards), 2008-02-18
- fixed a bug in imklog which lead to duplicate message content in
diff --git a/Makefile.am b/Makefile.am
index bde71b8b..2b319401 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,6 +42,7 @@ rsyslogd_SOURCES = \
msg.c \
msg.h \
expr.c \
+ expr.h \
omshell.c \
omshell.h \
omusrmsg.c \
diff --git a/cfsysline.c b/cfsysline.c
index 7249188e..378bfe1d 100644
--- a/cfsysline.c
+++ b/cfsysline.c
@@ -453,8 +453,7 @@ getWord(uchar **pp, rsCStrObj **ppStrB)
ASSERT(*pp != NULL);
ASSERT(*ppStrB != NULL);
- if((*ppStrB = rsCStrConstruct()) == NULL)
- ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
+ CHKiRet(rsCStrConstruct(ppStrB));
/* parse out the word */
p = *pp;
diff --git a/doc/Makefile.am b/doc/Makefile.am
index e081f88f..49a689c6 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -3,6 +3,7 @@ html_files = \
debug.html \
features.html \
generic_design.html \
+ expression.html \
history.html \
how2help.html \
install.html \
diff --git a/doc/expression.html b/doc/expression.html
new file mode 100644
index 00000000..51d99900
--- /dev/null
+++ b/doc/expression.html
@@ -0,0 +1,24 @@
+
+
+Expressions
+
+
+
+Expressions
+Rsyslog supports expressions at a growing number of places. So
+far, they are supported for filtering messages.
+
+Formal Definition
+
+Below is the formal definition of expression format (in ABNF, RFC 2234):
+
expr := e_and *("or" e_and)
e_and := e_cmp *("and" e_cmp)
e_cmp := val cmp_op val
val := ["+" / "-"] term *(("+" / "-") term)
term := factor *(("*" / "/" / "%") factor)
factor := ["not"] terminal
terminal := var / constant / function / "(" expr ")"
function := name "(" *("," expr) ")"
var := "$" varname
varname := msgvar / sysvar
msgvar := name
sysvar := "$" name
name := alpha *(alnum)
constant := string / number
string := simpstr / tplstr ; tplstr will be implemented in next phase
simpstr := "'" *char "'" ; use your imagination for char ;)
tplstr := '"' template '"' ; not initially implemented
number := 1*digit
cmp_op := "==" / "!=" / "<" / ">" / "<=" / ">="
digit := %x30-39
alpha := "a" ... "z" # all letters
alnum :* alpha / digit / "_"
+[rsyslog.conf overview]
+[manual index] [rsyslog site]
+This documentation is part of the
+rsyslog
+project.
+Copyright © 2008 by Rainer
+Gerhards and
+Adiscon.
+Released under the GNU GPL version 3 or higher.
+
\ No newline at end of file
diff --git a/doc/history.html b/doc/history.html
index 4e0b374a..ba6b6fc6 100644
--- a/doc/history.html
+++ b/doc/history.html
@@ -31,7 +31,7 @@ rather better control over the output format. So there we were, with
a rsyslogd that covers a lot of enhancements, but not a single one
of these that made its name ;) Since version 0.9.2, receiving syslog
messages via plain tcp is finally supported, a bit later sending via
-TCP, too. Starting with 1.11.0, RFC 3195 is finally support at the
+TCP, too. Starting with 1.11.0, RFC 3195 is finally supported at the
receiving side (a.k.a. "listener"). Support for sending via RFC 3195 is
still due. Anyhow, rsyslog has come much closer to what it name
promises.
@@ -118,4 +118,4 @@ Don't be shy to post to either the blog or the
-