1
|
1 /***************************************************************************
|
|
2 * Copyright (C) 2005 by 510 Software Group *
|
|
3 * *
|
|
4 * *
|
|
5 * This program is free software; you can redistribute it and/or modify *
|
|
6 * it under the terms of the GNU General Public License as published by *
|
|
7 * the Free Software Foundation; either version 2 of the License, or *
|
|
8 * (at your option) any later version. *
|
|
9 * *
|
|
10 * This program is distributed in the hope that it will be useful, *
|
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
13 * GNU General Public License for more details. *
|
|
14 * *
|
|
15 * You should have received a copy of the GNU General Public License *
|
|
16 * along with this program; if not, write to the *
|
|
17 * Free Software Foundation, Inc., *
|
|
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
19 ***************************************************************************/
|
|
20
|
|
21 #include "includes.h"
|
2
|
22 #include <fcntl.h>
|
3
|
23 #include <sys/socket.h>
|
|
24 #include <netinet/in.h>
|
|
25 #include <arpa/inet.h>
|
|
26 #include <netdb.h>
|
4
|
27 #include <limits.h>
|
1
|
28
|
4
|
29 static char* syslogconfig_version = "$Id$";
|
|
30 static char* iptables = "/sbin/iptables";
|
1
|
31
|
3
|
32 char *token_bucket;
|
1
|
33 char *token_file;
|
3
|
34 char *token_ignore;
|
1
|
35 char *token_include;
|
3
|
36 char *token_index;
|
1
|
37 char *token_lbrace;
|
3
|
38 char *token_pattern;
|
1
|
39 char *token_rbrace;
|
|
40 char *token_semi;
|
3
|
41 char *token_slash;
|
|
42 char *token_threshold;
|
|
43
|
|
44 struct ltint
|
|
45 {
|
|
46 bool operator()(const int s1, const int s2) const
|
|
47 {
|
|
48 return (unsigned)s1 < (unsigned)s2;
|
|
49 }
|
|
50 };
|
1
|
51
|
4
|
52 struct bucket {
|
|
53 int count;
|
|
54 bool latch; // true iff ever count>threshold
|
|
55 };
|
|
56
|
1
|
57 string_set all_strings; // owns all the strings, only modified by the config loader thread
|
|
58 const int maxlen = 1000; // used for snprintf buffers
|
4
|
59 typedef map<int, bucket, ltint> ip_buckets;
|
3
|
60
|
|
61 class IPR {
|
|
62 ip_buckets violations;
|
|
63 public:
|
4
|
64 void add(int ip, int amount, CONFIG &con);
|
3
|
65 void changed(CONFIG &con);
|
|
66 void leak(int amount, CONFIG &con);
|
|
67 };
|
|
68
|
|
69 IPR recorder;
|
|
70
|
|
71
|
|
72 ////////////////////////////////////////////////
|
|
73 //
|
4
|
74 void IPR::add(int ip, int amount, CONFIG &con) {
|
3
|
75 if (con.looking(ip)) {
|
|
76 ip_buckets::iterator i = violations.find(ip);
|
4
|
77 if (i == violations.end()) {
|
|
78 bucket b;
|
|
79 b.count = amount;
|
|
80 b.latch = false;
|
|
81 violations[ip] = b;
|
|
82 }
|
3
|
83 else {
|
4
|
84 bucket &b = (*i).second;
|
|
85 if (b.count < (INT_MAX-amount)) {
|
|
86 int t = con.get_threshold();
|
|
87 int c = b.count;
|
|
88 b.count += amount;
|
|
89 if ((!b.latch) && (c < t) && (t <= b.count)) {
|
|
90 b.latch = true;
|
|
91 changed(con);
|
|
92 }
|
|
93 }
|
3
|
94 }
|
|
95 }
|
|
96 }
|
|
97
|
|
98
|
|
99 void IPR::leak(int amount, CONFIG &con) {
|
|
100 bool ch = false;
|
|
101 for (ip_buckets::iterator i=violations.begin(); i!=violations.end(); ) {
|
4
|
102 int ip = (*i).first;
|
|
103 bucket &b = (*i).second;
|
|
104 if (b.count <= amount) {
|
|
105 ch |= b.latch;
|
3
|
106 violations.erase(i++);
|
|
107 }
|
|
108 else {
|
4
|
109 b.count -= amount;
|
3
|
110 i++;
|
|
111 }
|
|
112 }
|
|
113 if (ch) changed(con);
|
|
114 }
|
|
115
|
|
116
|
|
117 void IPR::changed(CONFIG &con) {
|
4
|
118 char buf[maxlen];
|
|
119 snprintf(buf, maxlen, "%s -F INPUT", iptables);
|
5
|
120 if (debug_syslog > 2) {
|
|
121 my_syslog(" ");
|
|
122 my_syslog(buf);
|
|
123 }
|
|
124 system(buf);
|
3
|
125 for (ip_buckets::iterator i=violations.begin(); i!=violations.end(); i++) {
|
4
|
126 int ip = (*i).first;
|
|
127 bucket &b = (*i).second;
|
|
128 if (b.count > con.get_threshold()) {
|
|
129 in_addr ad;
|
|
130 ad.s_addr = htonl(ip);
|
|
131 snprintf(buf, maxlen, "count=%d %s -A INPUT --src %s --jump DROP", b.count, iptables, inet_ntoa(ad));
|
5
|
132 if (debug_syslog > 2) my_syslog(buf);
|
|
133 system(buf);
|
4
|
134 }
|
3
|
135 }
|
|
136 }
|
1
|
137
|
|
138
|
3
|
139 ////////////////////////////////////////////////
|
|
140 //
|
|
141 int ip_address(char *have);
|
|
142 int ip_address(char *have) {
|
|
143 int ipaddr = 0;
|
|
144 in_addr ip;
|
|
145 if (inet_aton(have, &ip)) ipaddr = ip.s_addr;
|
|
146 else {
|
|
147 struct hostent *host = gethostbyname(have);
|
|
148 if (host && host->h_addrtype == AF_INET) memcpy(&ipaddr, host->h_addr, sizeof(ipaddr));
|
|
149 }
|
|
150 return ntohl(ipaddr);
|
|
151 }
|
|
152
|
|
153
|
|
154 ////////////////////////////////////////////////
|
|
155 //
|
4
|
156 PATTERN::PATTERN(TOKEN &tok, char *pattern_, int index_, int amount_) {
|
3
|
157 pattern = pattern_;
|
|
158 index = index_;
|
4
|
159 amount = amount_;
|
3
|
160 if (pattern) {
|
|
161 int rc = regcomp(&re, pattern, REG_ICASE | REG_EXTENDED);
|
|
162 if (rc) {
|
|
163 char bu[maxlen];
|
|
164 regerror(rc, &re, bu, maxlen);
|
|
165 char buf[maxlen];
|
|
166 snprintf(buf, sizeof(buf), "pattern %s not valid - %s", pattern, bu);
|
|
167 tok.token_error(buf);
|
|
168 pattern = NULL;
|
|
169 }
|
|
170 }
|
|
171 }
|
|
172
|
|
173
|
|
174 PATTERN::~PATTERN() {
|
|
175 regfree(&re);
|
|
176 }
|
|
177
|
|
178
|
|
179 bool PATTERN::process(char *buf, CONFIG &con) {
|
|
180 if (pattern) {
|
|
181 const int nmatch = index+1;
|
|
182 regmatch_t match[nmatch];
|
|
183 if (0 == regexec(&re, buf, nmatch, match, 0)) {
|
|
184 int s = match[index].rm_so;
|
|
185 int e = match[index].rm_eo;
|
|
186 if (s != -1) {
|
5
|
187 if (debug_syslog > 3) {
|
|
188 my_syslog(buf); // show lines with matches
|
|
189 }
|
3
|
190 buf[e] = '\0';
|
|
191 int ip = ip_address(buf+s);
|
|
192 if (ip) {
|
4
|
193 recorder.add(ip, amount, con);
|
3
|
194 }
|
|
195 return true;
|
|
196 }
|
|
197 }
|
|
198 }
|
|
199 return false;
|
|
200 }
|
|
201
|
|
202
|
|
203 void PATTERN::dump(int level) {
|
|
204 char indent[maxlen];
|
|
205 int i = min(maxlen-1, level*4);
|
|
206 memset(indent, ' ', i);
|
|
207 indent[i] = '\0';
|
|
208 printf("%s pattern \"%s\" {; \n", indent, pattern);
|
|
209 printf("%s index %d; \n", indent, index);
|
4
|
210 printf("%s bucket %d; \n", indent, amount);
|
3
|
211 printf("%s }; \n", indent);
|
|
212 }
|
|
213
|
|
214
|
|
215 ////////////////////////////////////////////////
|
|
216 //
|
1
|
217 CONFIG::CONFIG() {
|
|
218 reference_count = 0;
|
|
219 generation = 0;
|
|
220 load_time = 0;
|
|
221 }
|
|
222
|
|
223
|
|
224 CONFIG::~CONFIG() {
|
|
225 for (syslogconfig_list::iterator i=syslogconfigs.begin(); i!=syslogconfigs.end(); i++) {
|
|
226 SYSLOGCONFIG *c = *i;
|
|
227 delete c;
|
|
228 }
|
3
|
229 ignore.clear();
|
1
|
230 }
|
|
231
|
|
232
|
|
233 void CONFIG::add_syslogconfig(SYSLOGCONFIGP con) {
|
|
234 syslogconfigs.push_back(con);
|
|
235 }
|
|
236
|
|
237
|
3
|
238 void CONFIG::add_pair(IPPAIR pair) {
|
|
239 ignore.push_back(pair);
|
|
240 }
|
|
241
|
|
242
|
1
|
243 void CONFIG::dump() {
|
3
|
244 printf(" threshold %d; \n\n", threshold);
|
|
245
|
|
246 printf(" ignore { \n");
|
|
247 for (ippair_list::iterator i=ignore.begin(); i!=ignore.end(); i++) {
|
|
248 IPPAIR &p = *i;
|
|
249 in_addr ip;
|
|
250 ip.s_addr = htonl(p.first);
|
|
251 printf(" %s/%d; \n", inet_ntoa(ip), p.cidr);
|
|
252 }
|
|
253 printf(" }; \n\n");
|
|
254
|
1
|
255 for (syslogconfig_list::iterator i=syslogconfigs.begin(); i!=syslogconfigs.end(); i++) {
|
|
256 SYSLOGCONFIGP c = *i;
|
|
257 c->dump(0);
|
|
258 }
|
|
259 }
|
|
260
|
|
261
|
2
|
262 void CONFIG::read() {
|
3
|
263 while (true) {
|
|
264 bool have = false;
|
|
265 for (syslogconfig_list::iterator i=syslogconfigs.begin(); i!=syslogconfigs.end(); i++) {
|
|
266 SYSLOGCONFIGP c = *i;
|
|
267 have |= c->read(*this);
|
|
268 }
|
|
269 if (!have) break;
|
2
|
270 }
|
|
271 }
|
|
272
|
|
273
|
4
|
274 void CONFIG::sleep(int duration, time_t &previous) {
|
3
|
275 ::sleep(duration);
|
4
|
276 time_t now = time(NULL);
|
|
277 recorder.leak(now-previous, *this);
|
|
278 previous = now;
|
3
|
279 }
|
|
280
|
|
281
|
|
282 bool CONFIG::looking(int ip) {
|
|
283 for (ippair_list::iterator i=ignore.begin(); i!=ignore.end(); i++) {
|
|
284 IPPAIR &p = *i;
|
|
285 if ((p.first <= ip) && (ip <= p.last)) return false;
|
|
286 }
|
|
287 return true;
|
|
288 }
|
|
289
|
|
290 ////////////////////////////////////////////////
|
|
291 //
|
|
292 SYSLOGCONFIG::SYSLOGCONFIG(TOKEN &tok, char *file_name_) {
|
4
|
293 tokp = &tok;
|
2
|
294 file_name = file_name_;
|
4
|
295 open(true);
|
1
|
296 }
|
|
297
|
|
298
|
|
299 SYSLOGCONFIG::~SYSLOGCONFIG() {
|
4
|
300 close();
|
3
|
301 for (pattern_list::iterator i=patterns.begin(); i!=patterns.end(); i++) {
|
|
302 PATTERN *p = *i;
|
|
303 delete p;
|
|
304 }
|
2
|
305 }
|
|
306
|
|
307
|
4
|
308 void SYSLOGCONFIG::open(bool msg) {
|
|
309 fd = ::open(file_name, O_RDONLY);
|
|
310 len = 0;
|
|
311 if (fd == -1) {
|
|
312 if (msg) {
|
|
313 char buf[maxlen];
|
|
314 snprintf(buf, sizeof(buf), "syslog file %s not readable", file_name);
|
|
315 tokp->token_error(buf);
|
|
316 }
|
|
317 }
|
|
318 else {
|
5
|
319 if (debug_syslog > 1) {
|
|
320 snprintf(buf, sizeof(buf), "syslog file %s opened", file_name);
|
|
321 my_syslog(buf);
|
|
322 }
|
4
|
323 lseek(fd, 0, SEEK_END);
|
|
324 if (fstat(fd, &openfdstat)) {
|
|
325 close();
|
|
326 snprintf(buf, sizeof(buf), "syslog file %s cannot stat after open", file_name);
|
|
327 tokp->token_error(buf);
|
|
328 }
|
|
329 }
|
3
|
330 }
|
|
331
|
|
332
|
|
333 bool SYSLOGCONFIG::read(CONFIG &con) {
|
4
|
334 if (failed()) {
|
|
335 open(false);
|
|
336 if (failed()) return false;
|
|
337 }
|
3
|
338 int n = ::read(fd, buf+len, buflen-len);
|
|
339 bool have = (n > 0);
|
|
340 if (have) {
|
2
|
341 len += n;
|
|
342 while (true) {
|
|
343 char *p = (char*)memchr(buf, '\n', len);
|
|
344 if (!p) break;
|
|
345 n = p-buf;
|
|
346 *p = '\0';
|
3
|
347 process(con); // process null terminated string
|
2
|
348 len -= n+1;
|
|
349 memmove(buf, p+1, len);
|
|
350 }
|
|
351 // no <lf> in a full buffer
|
|
352 if (len == buflen) len = 0;
|
|
353 }
|
4
|
354 else {
|
|
355 // check for file close
|
|
356 struct stat filenamest;
|
|
357 if (0 == stat(file_name, &filenamest)) {
|
|
358 if ((filenamest.st_dev != openfdstat.st_dev) ||
|
|
359 (filenamest.st_ino != openfdstat.st_ino)) {
|
|
360 close();
|
|
361 }
|
|
362 }
|
|
363 else {
|
|
364 // filename no longer exists
|
|
365 close();
|
|
366 }
|
|
367
|
|
368 }
|
3
|
369 return have;
|
2
|
370 }
|
|
371
|
|
372
|
4
|
373 void SYSLOGCONFIG::close() {
|
5
|
374 if (debug_syslog > 1) {
|
|
375 snprintf(buf, sizeof(buf), "syslog file %s closed", file_name);
|
|
376 my_syslog(buf);
|
|
377 }
|
4
|
378 if (fd != -1) ::close(fd);
|
|
379 fd = -1;
|
|
380 }
|
|
381
|
|
382
|
|
383 void SYSLOGCONFIG::add_pattern(PATTERNP pat) {
|
|
384 patterns.push_back(pat);
|
|
385 }
|
|
386
|
|
387
|
3
|
388 void SYSLOGCONFIG::process(CONFIG &con) {
|
|
389 for (pattern_list::iterator i=patterns.begin(); i!=patterns.end(); i++) {
|
|
390 PATTERN *p = *i;
|
|
391 if (p->process(buf, con)) break;
|
|
392 }
|
1
|
393 }
|
|
394
|
|
395
|
|
396 void SYSLOGCONFIG::dump(int level) {
|
|
397 char indent[maxlen];
|
|
398 int i = min(maxlen-1, level*4);
|
|
399 memset(indent, ' ', i);
|
|
400 indent[i] = '\0';
|
|
401 char buf[maxlen];
|
|
402 printf("%s file \"%s\" {\n", indent, file_name);
|
3
|
403 for (pattern_list::iterator i=patterns.begin(); i!=patterns.end(); i++) {
|
|
404 PATTERN *p = *i;
|
4
|
405 p->dump(level+1);
|
3
|
406 }
|
1
|
407 printf("%s }; \n", indent);
|
|
408 }
|
|
409
|
|
410
|
|
411 ////////////////////////////////////////////////
|
|
412 // helper to discard the strings held by a string_set
|
|
413 //
|
|
414 void discard(string_set &s) {
|
|
415 for (string_set::iterator i=s.begin(); i!=s.end(); i++) {
|
|
416 free(*i);
|
|
417 }
|
|
418 s.clear();
|
|
419 }
|
|
420
|
|
421
|
|
422 ////////////////////////////////////////////////
|
|
423 // helper to register a string in a string set
|
|
424 //
|
|
425 char* register_string(string_set &s, char *name) {
|
|
426 string_set::iterator i = s.find(name);
|
|
427 if (i != s.end()) return *i;
|
|
428 char *x = strdup(name);
|
|
429 s.insert(x);
|
|
430 return x;
|
|
431 }
|
|
432
|
|
433
|
|
434 ////////////////////////////////////////////////
|
|
435 // register a global string
|
|
436 //
|
|
437 char* register_string(char *name) {
|
|
438 return register_string(all_strings, name);
|
|
439 }
|
|
440
|
|
441
|
|
442 ////////////////////////////////////////////////
|
|
443 //
|
|
444 bool tsa(TOKEN &tok, char *token);
|
|
445 bool tsa(TOKEN &tok, char *token) {
|
|
446 char *have = tok.next();
|
|
447 if (have == token) return true;
|
|
448 tok.token_error(token, have);
|
|
449 return false;
|
|
450 }
|
|
451
|
|
452
|
|
453 ////////////////////////////////////////////////
|
|
454 //
|
3
|
455 bool parse_pattern(TOKEN &tok, SYSLOGCONFIG &con);
|
|
456 bool parse_pattern(TOKEN &tok, SYSLOGCONFIG &con) {
|
|
457 char *pat = tok.next();
|
|
458 int ind, buc;
|
1
|
459 if (!tsa(tok, token_lbrace)) return false;
|
|
460 while (true) {
|
|
461 char *have = tok.next();
|
3
|
462 if (!have) break;
|
|
463 if (have == token_rbrace) break;
|
|
464 if (have == token_index) {
|
1
|
465 have = tok.next();
|
3
|
466 ind = atoi(have);
|
1
|
467 if (!tsa(tok, token_semi)) return false;
|
|
468 }
|
3
|
469 else if (have == token_bucket) {
|
|
470 have = tok.next();
|
|
471 buc = atoi(have);
|
|
472 if (!tsa(tok, token_semi)) return false;
|
1
|
473 }
|
|
474 else {
|
3
|
475 tok.token_error("index/bucket", have);
|
1
|
476 return false;
|
|
477 }
|
|
478 }
|
|
479 if (!tsa(tok, token_semi)) return false;
|
3
|
480 PATTERNP patt = new PATTERN(tok, pat, ind, buc);
|
|
481 con.add_pattern(patt);
|
|
482 return true;
|
|
483 }
|
|
484
|
|
485
|
|
486 ////////////////////////////////////////////////
|
|
487 //
|
|
488 bool parse_ignore(TOKEN &tok, CONFIG &dc);
|
|
489 bool parse_ignore(TOKEN &tok, CONFIG &dc) {
|
|
490 if (!tsa(tok, token_lbrace)) return false;
|
|
491 while (true) {
|
|
492 char *have = tok.next();
|
|
493 if (!have) break;
|
|
494 if (have == token_rbrace) break;
|
|
495 int ipaddr = ip_address(have);
|
|
496 if (ipaddr == 0) {
|
|
497 tok.token_error("ip address", have);
|
|
498 return false;
|
|
499 }
|
|
500 if (!tsa(tok, token_slash)) return false;
|
|
501 have = tok.next();
|
|
502 int mask = atoi(have);
|
|
503 if ((mask < 8) || (mask > 32)) {
|
|
504 tok.token_error("cidr 8..32 value", have);
|
|
505 return false;
|
|
506 }
|
|
507 if (!tsa(tok, token_semi)) return false;
|
|
508 IPPAIR pair;
|
|
509 const int masks[33] = {0xffffffff, // 0
|
|
510 0x7fffffff, // 1
|
|
511 0x3fffffff, // 2
|
|
512 0x1fffffff, // 3
|
|
513 0x0fffffff, // 4
|
|
514 0x07ffffff, // 5
|
|
515 0x03ffffff, // 6
|
|
516 0x01ffffff, // 7
|
|
517 0x00ffffff, // 8
|
|
518 0x007fffff, // 9
|
|
519 0x003fffff, // 10
|
|
520 0x001fffff, // 11
|
|
521 0x000fffff, // 12
|
|
522 0x0007ffff, // 13
|
|
523 0x0003ffff, // 14
|
|
524 0x0001ffff, // 15
|
|
525 0x0000ffff, // 16
|
|
526 0x00007fff, // 17
|
|
527 0x00003fff, // 18
|
|
528 0x00001fff, // 19
|
|
529 0x00000fff, // 20
|
|
530 0x000007ff, // 21
|
|
531 0x000003ff, // 22
|
|
532 0x000001ff, // 23
|
|
533 0x000000ff, // 24
|
|
534 0x0000007f, // 25
|
|
535 0x0000003f, // 26
|
|
536 0x0000001f, // 27
|
|
537 0x0000000f, // 28
|
|
538 0x00000007, // 29
|
|
539 0x00000003, // 30
|
|
540 0x00000001, // 31
|
|
541 0x00000000}; // 32
|
|
542 pair.first = ipaddr;
|
|
543 pair.last = ipaddr | masks[mask];
|
|
544 pair.cidr = mask;
|
|
545 dc.add_pair(pair);
|
|
546 }
|
|
547 if (!tsa(tok, token_semi)) return false;
|
|
548 return true;
|
|
549 }
|
|
550
|
|
551
|
|
552 ////////////////////////////////////////////////
|
|
553 //
|
|
554 bool parse_syslogconfig(TOKEN &tok, CONFIG &dc);
|
|
555 bool parse_syslogconfig(TOKEN &tok, CONFIG &dc) {
|
|
556 char *name = tok.next();
|
|
557 if (!tsa(tok, token_lbrace)) return false;
|
|
558 SYSLOGCONFIGP con = new SYSLOGCONFIG(tok, name);
|
2
|
559 if (con->failed()) {
|
|
560 delete con;
|
|
561 return false;
|
|
562 }
|
1
|
563 dc.add_syslogconfig(con);
|
3
|
564 while (true) {
|
|
565 char *have = tok.next();
|
|
566 if (!have) break;
|
|
567 if (have == token_rbrace) break;
|
|
568 if (have == token_pattern) {
|
|
569 if (!parse_pattern(tok, *con)) return false;
|
|
570 }
|
|
571 else {
|
|
572 tok.token_error("pattern", have);
|
|
573 return false;
|
|
574 }
|
|
575 }
|
|
576 if (!tsa(tok, token_semi)) return false;
|
1
|
577 return true;
|
|
578 }
|
|
579
|
|
580
|
|
581 ////////////////////////////////////////////////
|
|
582 // parse a config file
|
|
583 //
|
|
584 bool load_conf(CONFIG &dc, char *fn) {
|
|
585 int count = 0;
|
|
586 TOKEN tok(fn, &dc.config_files);
|
|
587 while (true) {
|
|
588 char *have = tok.next();
|
|
589 if (!have) break;
|
3
|
590 if (have == token_threshold) {
|
|
591 have = tok.next();
|
|
592 dc.set_threshold(atoi(have));
|
|
593 if (!tsa(tok, token_semi)) return false;
|
|
594 }
|
|
595 else if (have == token_ignore) {
|
|
596 if (!parse_ignore(tok, dc)) return false;
|
|
597 }
|
|
598 else if (have == token_file) {
|
|
599 if (!parse_syslogconfig(tok, dc)) return false;
|
|
600 count++;
|
1
|
601 }
|
|
602 else {
|
3
|
603 tok.token_error("threshold/ignore/file", have);
|
1
|
604 return false;
|
|
605 }
|
|
606 }
|
|
607 tok.token_error("load_conf() found %d syslog files in %s", count, fn);
|
|
608 return (!dc.syslogconfigs.empty());
|
|
609 }
|
|
610
|
|
611
|
|
612 ////////////////////////////////////////////////
|
|
613 // init the tokens
|
|
614 //
|
|
615 void token_init() {
|
3
|
616 token_bucket = register_string("bucket");
|
1
|
617 token_file = register_string("file");
|
3
|
618 token_ignore = register_string("ignore");
|
1
|
619 token_include = register_string("include");
|
3
|
620 token_index = register_string("index");
|
1
|
621 token_lbrace = register_string("{");
|
3
|
622 token_pattern = register_string("pattern");
|
1
|
623 token_rbrace = register_string("}");
|
|
624 token_semi = register_string(";");
|
3
|
625 token_slash = register_string("/");
|
|
626 token_threshold = register_string("threshold");
|
1
|
627 }
|