From 1ada506e2d90377c2475e103340d8986bf8847f9 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 27 Oct 2009 17:31:27 +0100 Subject: added the capability to have ruleset-specific main message queues This offers considerable additional flexibility AND superior performance (in cases where multiple inputs now can avoid lock contention) --- runtime/ruleset.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/ruleset.h') diff --git a/runtime/ruleset.h b/runtime/ruleset.h index 32571687..deea9405 100644 --- a/runtime/ruleset.h +++ b/runtime/ruleset.h @@ -25,6 +25,7 @@ #ifndef INCLUDED_RULESET_H #define INCLUDED_RULESET_H +#include "queue.h" #include "linkedlist.h" /* the ruleset object */ @@ -32,6 +33,7 @@ struct ruleset_s { BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */ linkedList_t llRules; /* this is NOT a pointer - no typo here ;) */ uchar *pszName; /* name of our ruleset */ + qqueue_t *pQueue; /* "main" message queue, if the ruleset has its own (else NULL) */ }; /* interfaces */ @@ -50,8 +52,9 @@ BEGINinterface(ruleset) /* name must also be changed in ENDinterface macro! */ rsRetVal (*SetDefaultRuleset)(uchar*); rsRetVal (*SetCurrRuleset)(uchar*); ruleset_t* (*GetCurrent)(void); + qqueue_t* (*GetRulesetQueue)(ruleset_t*); ENDinterface(ruleset) -#define rulesetCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */ +#define rulesetCURR_IF_VERSION 2 /* increment whenever you change the interface structure! */ /* prototypes */ -- cgit v1.2.3 From b1db196953713dd09c499a3edf81347bd903c19e Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 3 Nov 2009 18:44:02 +0100 Subject: one step closer to dynamically loadable parsers This is a milestone commit, which adds new code that breaks nothing, but also does not add any visible change. Just prep work... --- runtime/ruleset.h | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/ruleset.h') diff --git a/runtime/ruleset.h b/runtime/ruleset.h index deea9405..6c8f64b5 100644 --- a/runtime/ruleset.h +++ b/runtime/ruleset.h @@ -34,6 +34,7 @@ struct ruleset_s { linkedList_t llRules; /* this is NOT a pointer - no typo here ;) */ uchar *pszName; /* name of our ruleset */ qqueue_t *pQueue; /* "main" message queue, if the ruleset has its own (else NULL) */ + parserList_t *pParserLst;/* list of parsers to use for this ruleset */ }; /* interfaces */ -- cgit v1.2.3 From 1b7f5c54684db29c096e09238648a45dce78ebee Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 4 Nov 2009 10:40:27 +0100 Subject: moved rfc3164/5424 code to new parser modules another milestone commit: the program works, the new interface is used, some more cleanup is needed and the per-ruleset config options are still missing. But we are getting closer... --- runtime/ruleset.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/ruleset.h') diff --git a/runtime/ruleset.h b/runtime/ruleset.h index 6c8f64b5..222d773e 100644 --- a/runtime/ruleset.h +++ b/runtime/ruleset.h @@ -54,8 +54,10 @@ BEGINinterface(ruleset) /* name must also be changed in ENDinterface macro! */ rsRetVal (*SetCurrRuleset)(uchar*); ruleset_t* (*GetCurrent)(void); qqueue_t* (*GetRulesetQueue)(ruleset_t*); + /* v3, 2009-11-04 */ + parserList_t* (*GetParserList)(msg_t *); ENDinterface(ruleset) -#define rulesetCURR_IF_VERSION 2 /* increment whenever you change the interface structure! */ +#define rulesetCURR_IF_VERSION 3 /* increment whenever you change the interface structure! */ /* prototypes */ -- cgit v1.2.3