00001 #include "grok_program.h"
00002
00003 #define CURPROGRAM (conf->programs[conf->nprograms - 1])
00004 #define CURINPUT (CURPROGRAM.inputs [CURPROGRAM.ninputs - 1])
00005 #define CURMATCH (CURPROGRAM.matchconfigs [CURPROGRAM.nmatchconfigs - 1])
00006 #define CURPATTERNFILE (CURPROGRAM.patternfiles [CURPROGRAM.npatternfiles - 1])
00007
00008 #define SETLOG(parent, mine) \
00009 (mine).logmask = (parent).logmask;
00010
00011
00012
00013 struct config {
00014 grok_program_t *programs;
00015 int nprograms;
00016 int program_size;
00017
00018 int logmask;
00019 int logdepth;
00020 };
00021
00022 void conf_init(struct config *conf);
00023 void conf_new_program(struct config *conf);
00024 void conf_new_input(struct config *conf);
00025 void conf_new_input_process(struct config *conf, char *cmd);
00026 void conf_new_input_file(struct config *conf, char *filename);
00027 void conf_new_matchconf(struct config *conf);
00028 void conf_new_match_pattern(struct config *conf, const char *pattern);
00029 void conf_match_set_debug(struct config *conf, int logmask);