Mercurial > syslog2iptables
comparison src/syslogconfig.h @ 63:60f59936fabb
good authentication prevents ip blocking for awhile
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 19 Dec 2015 10:12:24 -0800 |
parents | b45dddebe8fc |
children | c6c8a2102a3e |
comparison
equal
deleted
inserted
replaced
62:c30df5975c49 | 63:60f59936fabb |
---|---|
19 | 19 |
20 class PATTERN { | 20 class PATTERN { |
21 const char * pattern; // owned by the string table | 21 const char * pattern; // owned by the string table |
22 regex_t re; | 22 regex_t re; |
23 int index; // zero based substring of the regex match that contains the ip address or hostname | 23 int index; // zero based substring of the regex match that contains the ip address or hostname |
24 int amount; // count to add to the ip address leaky bucket | 24 int amount; // if positive, count to add to the ip address leaky bucket; |
25 // if negative count to set into the ip address leaky bucket | |
25 const char * message; // for logging, owned by the string table | 26 const char * message; // for logging, owned by the string table |
26 public: | 27 public: |
27 ~PATTERN(); | 28 ~PATTERN(); |
28 PATTERN(TOKEN &tok, const char *pattern_, int index_, int amount_, const char *msg_); | 29 PATTERN(TOKEN &tok, const char *pattern_, int index_, int amount_, const char *msg_); |
29 bool process(char *buf, CONTEXT &con, const char *file_name, int pattern_index); | 30 bool process(char *buf, CONTEXT &con, const char *file_name, int pattern_index); |