diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-03 13:10:37 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-03 13:10:37 +0200 |
commit | 1cdab4d2b548a0db54b5a2c5404f3f78e012113e (patch) | |
tree | 8b827e5bc63e61da3a57e71cc495326d8fbf462e /grammar/utils.h | |
parent | 62e95c10ba84871fd5ad97fccd75664b07620013 (diff) | |
download | rsyslog-1cdab4d2b548a0db54b5a2c5404f3f78e012113e.tar.gz rsyslog-1cdab4d2b548a0db54b5a2c5404f3f78e012113e.tar.bz2 rsyslog-1cdab4d2b548a0db54b5a2c5404f3f78e012113e.zip |
milestone: support for action list added to grammar
Diffstat (limited to 'grammar/utils.h')
-rw-r--r-- | grammar/utils.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/grammar/utils.h b/grammar/utils.h index 66b05647..2a6ba10a 100644 --- a/grammar/utils.h +++ b/grammar/utils.h @@ -30,6 +30,8 @@ cnfobjType2str(enum cnfobjType ot) } } +enum cnfactType { CNFACT_V2, CNFACT_LEGACY }; + struct cnfobj { enum cnfobjType objType; struct nvlst *nvlst; @@ -41,6 +43,21 @@ struct nvlst { es_str_t *value; }; +struct cnfcfsyslinelst { + struct cnfcfsyslinelst *next; + char *line; +}; + +struct cnfactlst { + struct cnfactlst *next; + struct cnfcfsyslinelst *syslines; + enum cnfactType actType; + union { + struct nvlst *lst; + char *legActLine; + } data; +}; + void readConfFile(FILE *fp, es_str_t **str); struct nvlst* nvlstNew(es_str_t *name, es_str_t *value); @@ -49,6 +66,11 @@ void nvlstPrint(struct nvlst *lst); struct cnfobj* cnfobjNew(enum cnfobjType objType, struct nvlst *lst); void cnfobjDestruct(struct cnfobj *o); void cnfobjPrint(struct cnfobj *o); +struct cnfactlst* cnfactlstNew(enum cnfactType actType, struct nvlst *lst, char *actLine); +void cnfactlstDestruct(struct cnfactlst *actlst); +void cnfactlstPrint(struct cnfactlst *actlst); +struct cnfactlst* cnfactlstAddSysline(struct cnfactlst* actlst, char *line); +struct cnfactlst* cnfactlstReverse(struct cnfactlst *actlst); /* debug helper */ void cstrPrint(char *text, es_str_t *estr); |