comparison src/syslogconfig.h @ 27:28fec0c67646

make add/remove commands configureable
author carl
date Sun, 12 Feb 2006 10:54:03 -0800
parents 0d65c3de34fd
children d2ceebcf6595
comparison
equal deleted inserted replaced
26:00bd0b0ef015 27:28fec0c67646
75 int generation; 75 int generation;
76 time_t load_time; 76 time_t load_time;
77 string_set config_files; 77 string_set config_files;
78 int threshold; 78 int threshold;
79 ippair_list ignore; // owns all the ippairs 79 ippair_list ignore; // owns all the ippairs
80 char * add_command; // owned by the string table
81 char * remove_command; // ""
80 syslogconfig_list syslogconfigs; // owns all the syslogconfigs 82 syslogconfig_list syslogconfigs; // owns all the syslogconfigs
81 83
82 CONFIG(); 84 CONFIG();
83 ~CONFIG(); 85 ~CONFIG();
84 void set_threshold(int threshold_) { threshold = threshold_; }; 86 void set_add(char *add) { add_command = add; };
85 int get_threshold() { return threshold; }; 87 void set_remove(char *remove) { remove_command = remove; };
88 void set_threshold(int threshold_) { threshold = threshold_; };
89 int get_threshold() { return threshold; };
86 void add_syslogconfig(SYSLOGCONFIGP con); 90 void add_syslogconfig(SYSLOGCONFIGP con);
87 void add_pair(IPPAIR pair); 91 void add_pair(IPPAIR pair);
88 void dump(); 92 void dump();
89 void read(); 93 void read();
90 void sleep(int duration, time_t &previous); 94 void sleep(int duration, time_t &previous);
96 char* register_string(char *name); 100 char* register_string(char *name);
97 int ip_address(char *have); 101 int ip_address(char *have);
98 bool load_conf(CONFIG &dc, char *fn); 102 bool load_conf(CONFIG &dc, char *fn);
99 void token_init(); 103 void token_init();
100 104
105 extern char *token_add;
101 extern char *token_bucket; 106 extern char *token_bucket;
102 extern char *token_file; 107 extern char *token_file;
103 extern char *token_ignore; 108 extern char *token_ignore;
104 extern char *token_include; 109 extern char *token_include;
105 extern char *token_index; 110 extern char *token_index;
106 extern char *token_lbrace; 111 extern char *token_lbrace;
107 extern char *token_pattern; 112 extern char *token_pattern;
108 extern char *token_rbrace; 113 extern char *token_rbrace;
114 extern char *token_remove;
109 extern char *token_semi; 115 extern char *token_semi;
110 extern char *token_slash; 116 extern char *token_slash;
111 extern char *token_threshold; 117 extern char *token_threshold;
112 118