diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-03 18:44:02 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-03 18:44:02 +0100 |
commit | b1db196953713dd09c499a3edf81347bd903c19e (patch) | |
tree | 7c4d1d4a92337f0cd1538c7cd9bc77904901ce8d /runtime/module-template.h | |
parent | 6f511cecfae3592f271627ebcb41e6a8c4f831e9 (diff) | |
download | rsyslog-b1db196953713dd09c499a3edf81347bd903c19e.tar.gz rsyslog-b1db196953713dd09c499a3edf81347bd903c19e.tar.bz2 rsyslog-b1db196953713dd09c499a3edf81347bd903c19e.zip |
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...
Diffstat (limited to 'runtime/module-template.h')
-rw-r--r-- | runtime/module-template.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/runtime/module-template.h b/runtime/module-template.h index b136b6a3..18aad650 100644 --- a/runtime/module-template.h +++ b/runtime/module-template.h @@ -412,6 +412,8 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\ CODEqueryEtryPt_STD_MOD_QUERIES \ else if(!strcmp((char*) name, "parse")) {\ *pEtryPoint = parse;\ + } else if(!strcmp((char*) name, "GetParserName")) {\ + *pEtryPoint = GetParserName;\ } /* modInit() @@ -604,7 +606,6 @@ static rsRetVal doHUP(instanceData __attribute__((unused)) *pData)\ } - /* parse() - main entry point of parser modules */ #define BEGINparse \ @@ -620,5 +621,16 @@ static rsRetVal parse(msg_t *pMsg)\ } +/* function to specify the parser name. This is done via a single command which + * receives a ANSI string as parameter. + */ +#define PARSER_NAME(x) \ +static rsRetVal GetParserName(uchar **ppSz)\ +{\ + *ppSz = UCHAR_CONSTANT(x);\ + return RS_RET_OK;\ +} + + /* vim:set ai: */ |