diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-05-06 08:43:15 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-05-06 08:43:15 +0200 |
commit | b056c258d7bab528034ec8c8749cdcf0d0102268 (patch) | |
tree | e3b19d5336e0db8ad23fcaf82d3142f8844d54ac /runtime/modules.h | |
parent | c0d1334f6e23b1cfb21d302e3a4b32c449c26547 (diff) | |
download | rsyslog-b056c258d7bab528034ec8c8749cdcf0d0102268.tar.gz rsyslog-b056c258d7bab528034ec8c8749cdcf0d0102268.tar.xz rsyslog-b056c258d7bab528034ec8c8749cdcf0d0102268.zip |
step: generalized new config interface for all module types
Diffstat (limited to 'runtime/modules.h')
-rw-r--r-- | runtime/modules.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/runtime/modules.h b/runtime/modules.h index 45fffdad..e3af1ad9 100644 --- a/runtime/modules.h +++ b/runtime/modules.h @@ -57,7 +57,8 @@ typedef enum eModType_ { eMOD_OUT = 1, /* output module */ eMOD_LIB = 2, /* library module */ eMOD_PARSER = 3,/* parser module */ - eMOD_STRGEN = 4 /* strgen module */ + eMOD_STRGEN = 4,/* strgen module */ + eMOD_ANY = 5 /* meta-name for "any type of module" -- to be used in function calls */ } eModType_t; @@ -110,17 +111,19 @@ struct modInfo_s { rsRetVal (*modExit)(void); /* called before termination or module unload */ rsRetVal (*modGetID)(void **); /* get its unique ID from module */ rsRetVal (*doHUP)(void *); /* non-restart type HUP handler */ + /* v2 config system specific */ + rsRetVal (*beginCnfLoad)(void*newCnf, rsconf_t *pConf); + rsRetVal (*endCnfLoad)(void*Cnf); + rsRetVal (*checkCnf)(void*Cnf); + rsRetVal (*activateCnf)(void*Cnf); /* make provided config the running conf */ + rsRetVal (*freeCnf)(void*Cnf); + /* end v2 config system specific */ /* below: create an instance of this module. Most importantly the module * can allocate instance memory in this call. */ rsRetVal (*createInstance)(); union { struct {/* data for input modules */ - rsRetVal (*beginCnfLoad)(void*newCnf, rsconf_t *pConf); - rsRetVal (*endCnfLoad)(void*Cnf); - rsRetVal (*checkCnf)(void*Cnf); - rsRetVal (*activateCnf)(void*Cnf); /* make provided config the running conf */ - rsRetVal (*freeCnf)(void*Cnf); /* TODO: remove? */rsRetVal (*willRun)(void); /* check if the current config will be able to run*/ rsRetVal (*runInput)(thrdInfo_t*); /* function to gather input and submit to queue */ rsRetVal (*afterRun)(thrdInfo_t*); /* function to gather input and submit to queue */ |