summaryrefslogtreecommitdiffstats
path: root/modules.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-23 17:24:41 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-23 17:24:41 +0000
commit9ee5888309e1f39f52546deaea4bcd3bdc216d8d (patch)
treea46550eb83762539b375063e6e74d828d1ebb42f /modules.h
parent8f236abd49739c0f791c5b893433f7dfa40d3dd8 (diff)
downloadrsyslog-9ee5888309e1f39f52546deaea4bcd3bdc216d8d.tar.gz
rsyslog-9ee5888309e1f39f52546deaea4bcd3bdc216d8d.tar.xz
rsyslog-9ee5888309e1f39f52546deaea4bcd3bdc216d8d.zip
continued working on modularization; begun to create interface for
configuring actions selector lines; begun basic functionality for module initialization and loading built-in modules.
Diffstat (limited to 'modules.h')
-rw-r--r--modules.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/modules.h b/modules.h
index b626d86e..da37a91c 100644
--- a/modules.h
+++ b/modules.h
@@ -45,13 +45,15 @@ typedef enum eModLinkType_ {
typedef struct moduleInfo {
struct moduleInfo *pNext; /* support for creating a linked module list */
- int iModVers; /* Interface version of module */
- eModType_t eModType; /* type of this module */
- eModLinkType_t eModLinkType;
- uchar* pszModName; /* printable module name, e.g. for dprintf */
+ int iIFVers; /* Interface version of module */
+ eModType_t eType; /* type of this module */
+ eModLinkType_t eLinkType;
+ uchar* pszName; /* printable module name, e.g. for dprintf */
/* functions supported by all types of modules */
- rsRetVal (*modInit)(); /* initialize the module */
+ rsRetVal (*modInit)(int, int*, rsRetVal(**)()); /* initialize the module */
/* be sure to support version handshake! */
+ rsRetVal (*modQueryEtryPt)(uchar *name, rsRetVal (**EtryPoint)()); /* query entry point addresses */
+ rsRetVal (*freeInstance)(struct filed*);/* called before termination or module unload */
rsRetVal (*modExit)(); /* called before termination or module unload */
/* below: parse a configuration line - return if processed
* or not. If not, must be parsed to next module.
@@ -66,16 +68,18 @@ typedef struct moduleInfo {
/* input modules come after output modules are finished, I am
* currently not really thinking about them. rgerhards, 2007-07-19
*/
- };
+ } im;
struct {/* data for output modules */
/* below: perform the configured action
*/
rsRetVal (*doAction)();
- };
+ } om;
} mod;
} modInfo_t;
/* prototypes */
+rsRetVal doModInit(rsRetVal (*modInit)(), uchar *name);
+void modPrintList(void);
#endif /* #ifndef MODULES_H_INCLUDED */
/*