You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
937 B

8 years ago
#ifndef F2B_JAIL_H_
#define F2B_JAIL_H_
#include "log.h"
8 years ago
#include "logfile.h"
8 years ago
#include "ipaddr.h"
#include "config.h"
#include "regexps.h"
#include "backend.h"
#include "filelist.h"
8 years ago
typedef struct f2b_jail_t {
struct f2b_jail_t *next;
bool enabled;
8 years ago
time_t bantime;
size_t tries;
char name[CONFIG_KEY_MAX];
8 years ago
char glob[PATH_MAX];
char backend_name[CONFIG_KEY_MAX];
char backend_init[CONFIG_VAL_MAX];
char filter_name[CONFIG_KEY_MAX];
char filter_init[CONFIG_VAL_MAX];
char source_name[CONFIG_KEY_MAX];
char source_init[CONFIG_VAL_MAX];
8 years ago
f2b_logfile_t *logfiles;
f2b_regex_t *regexps;
f2b_ipaddr_t *ipaddrs;
f2b_backend_t *backend;
} f2b_jail_t;
8 years ago
f2b_jail_t *f2b_jail_create (f2b_config_section_t *section);
void f2b_jail_set_defaults(f2b_config_section_t *section);
size_t f2b_jail_process (f2b_jail_t *jail);
bool f2b_jail_init (f2b_jail_t *jail, f2b_config_t *config);
8 years ago
#endif /* F2B_JAIL_H_ */