diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-07-21 18:08:19 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-07-21 18:08:19 +0200 |
commit | e64cd212432c2cf76245888499461e9c8bf73243 (patch) | |
tree | 2356138e72aac9469804fafdb743740504354f3c /runtime/cfsysline.h | |
parent | 490518ae18290b546510fb4bd112e01f23002d5f (diff) | |
download | rsyslog-e64cd212432c2cf76245888499461e9c8bf73243.tar.gz rsyslog-e64cd212432c2cf76245888499461e9c8bf73243.tar.xz rsyslog-e64cd212432c2cf76245888499461e9c8bf73243.zip |
moving towards scoping inside rsyslog.conf
first step: adding object-type specifier to config statement table
Diffstat (limited to 'runtime/cfsysline.h')
-rw-r--r-- | runtime/cfsysline.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/runtime/cfsysline.h b/runtime/cfsysline.h index 07ab5fcd..81107aa3 100644 --- a/runtime/cfsysline.h +++ b/runtime/cfsysline.h @@ -26,9 +26,10 @@ #include "linkedlist.h" +#if 0 /* types of configuration handlers */ -typedef enum cslCmdHdlrType { +enum cslCmdHdlrType { eCmdHdlrInvalid = 0, /* invalid handler type - indicates a coding error */ eCmdHdlrCustomHandler, /* custom handler, just call handler function */ eCmdHdlrUID, @@ -41,13 +42,23 @@ typedef enum cslCmdHdlrType { eCmdHdlrFacility, eCmdHdlrSeverity, eCmdHdlrGetWord -} ecslCmdHdrlType; +}; + + +/* the next type describes $Begin .. $End block object types + */ +enum cslConfObjType { + eConfObjGlobal = 0, /* global directives */ + eConfObjAction, /* action-specific directives */ +}; +#endif /* this is a single entry for a parse routine. It describes exactly * one entry point/handler. * The short name is cslch (Configfile SysLine CommandHandler) */ struct cslCmdHdlr_s { /* config file sysline parse entry */ + ecslConfObjType eConfObjType; /* which config object is this for? */ ecslCmdHdrlType eType; /* which type of handler is this? */ rsRetVal (*cslCmdHdlr)(); /* function pointer to use with handler (params depending on eType) */ void *pData; /* user-supplied data pointer */ @@ -66,7 +77,7 @@ struct cslCmd_s { /* config file sysline parse entry */ typedef struct cslCmd_s cslCmd_t; /* prototypes */ -rsRetVal regCfSysLineHdlr(uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(), void *pData, void *pOwnerCookie); +rsRetVal regCfSysLineHdlr(uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(), void *pData, void *pOwnerCookie, ecslConfObjType eConfObjType); rsRetVal unregCfSysLineHdlrs(void); rsRetVal unregCfSysLineHdlrs4Owner(void *pOwnerCookie); rsRetVal processCfSysLineCommand(uchar *pCmd, uchar **p); |