ze-filter
(ze-filter-0.8.0-develop-180218)
|
Go to the source code of this file.
Classes | |
struct | RATE_DEF_T |
struct | Bucket_T |
struct | Res_T |
struct | HistEvt_T |
struct | RateHist_T |
struct | SmtpRate_T |
struct | smtp_select_S |
Macros | |
#define | MINUTE * 60 |
#define | HOUR * 60 MINUTE |
#define | DAY * 24 HOUR |
#define | SZ_KEY 80 |
#define | DEBUG_LEVEL 19 |
#define | SZ_BUCKET 30 |
#define | NB_BUCKET 128 |
#define | RATEHIST_INITIALIZER {NULL,0,0} |
#define | DATA_LOCK() MUTEX_LOCK(&hdata.mutex) |
#define | DATA_UNLOCK() MUTEX_UNLOCK(&hdata.mutex) |
Typedefs | |
typedef struct Bucket_T | Bucket_T |
typedef struct Res_T | Res_T |
typedef struct HistEvt_T | HistEvt_T |
typedef struct SmtpRate_T | SmtpRate_T |
typedef struct smtp_select_S | smtp_select_T |
Functions | |
bool | smtprate_init (size_t sza, size_t szb) |
void | smtprate_free () |
bool | smtprate_resize (size_t sza, size_t szb) |
int | smtprate_add_entry (int which, char *key, char *name, int nb, time_t t) |
int | smtprate_check (int which, char *key, time_t win) |
bool | smtprate_cleanup_table (time_t now, time_t win) |
int | smtprate_update_table (time_t w_width) |
void | smtprate_save_table (char *filename) |
int | smtprate_read_table (char *filename) |
void | smtprate_log_table () |
void | smtprate_print_table (int fd, int allhosts, int verbose, bool hostnames, time_t win, uint32_t flags, int nbrecs) |
uint32_t | smtprate_str2flags (char *str) |
Variables | |
unsigned int | smtprate_interval = 60 |
unsigned int | smtprate_window = 600 |
#define DATA_LOCK | ( | ) | MUTEX_LOCK(&hdata.mutex) |
Definition at line 153 of file ze-smtprate.c.
#define DATA_UNLOCK | ( | ) | MUTEX_UNLOCK(&hdata.mutex) |
Definition at line 155 of file ze-smtprate.c.
#define DAY * 24 HOUR |
Definition at line 32 of file ze-smtprate.c.
#define DEBUG_LEVEL 19 |
Definition at line 37 of file ze-smtprate.c.
#define HOUR * 60 MINUTE |
Definition at line 31 of file ze-smtprate.c.
#define MINUTE * 60 |
Definition at line 30 of file ze-smtprate.c.
#define NB_BUCKET 128 |
Definition at line 91 of file ze-smtprate.c.
#define RATEHIST_INITIALIZER {NULL,0,0} |
Definition at line 134 of file ze-smtprate.c.
#define SZ_BUCKET 30 |
Definition at line 86 of file ze-smtprate.c.
#define SZ_KEY 80 |
Definition at line 34 of file ze-smtprate.c.
typedef struct smtp_select_S smtp_select_T |
Definition at line 881 of file ze-smtprate.c.
typedef struct SmtpRate_T SmtpRate_T |
void smtprate_print_table | ( | int | fd, |
int | allhosts, | ||
int | verbose, | ||
bool | hostnames, | ||
time_t | win, | ||
uint32_t | flags, | ||
int | nbrecs | ||
) |
Definition at line 970 of file ze-smtprate.c.