ze-filter  (ze-filter-0.8.0-develop-180218)
ze-throttle.h
Go to the documentation of this file.
1 /*
2  *
3  * ze-filter - Mail Server Filter for sendmail
4  *
5  * Copyright (c) 2001-2018 - Jose-Marcio Martins da Cruz
6  *
7  * Auteur : Jose Marcio Martins da Cruz
8  * jose.marcio.mc@gmail.org
9  *
10  * Historique :
11  * Creation : janvier 2002
12  *
13  * This program is free software, but with restricted license :
14  *
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19  *
20  * More details about ze-filter license can be found at ze-filter
21  * web site : http://foss.jose-marcio.org
22  */
23 
24 #ifndef __ZE_THROTTLE_H
25 
26 
27 bool connrate_init (size_t, size_t);
28 void connrate_free();
29 bool connrate_resize(size_t , size_t);
30 
31 bool connrate_cleanup_table(time_t now);
32 int connrate_update_table (time_t);
33 
34 void connrate_log_table ();
35 void connrate_print_table (int, int, int, int);
36 void connrate_save_table (char *);
37 int connrate_read_table (char *);
38 
39 int connrate_add_host_entry (char *, time_t);
40 int connrate_add_rcpt_entry (char *, int, time_t);
41 int connrate_add_bounce_entry (char *, time_t);
42 
43 int connrate_check_host (char *);
44 int connrate_check_rcpt (char *);
45 int connrate_check_bounce (char *);
46 
47 extern unsigned int connrate_interval; /* 1 minute */
48 extern unsigned int connrate_window; /* 10 minutes */
49 
50 void add_throttle_entry (time_t);
51 
52 void update_throttle(time_t);
53 bool update_throttle_dos();
54 bool check_throttle_dos(void);
55 void log_throttle_stats(void);
56 
57 #define __ZE_THROTTLE_H
58 #endif
59 
60 
void connrate_log_table()
void log_throttle_stats(void)
Definition: ze-throttle.c:313
int connrate_check_host(char *)
bool connrate_cleanup_table(time_t now)
int connrate_update_table(time_t)
unsigned int connrate_interval
int connrate_add_host_entry(char *, time_t)
int connrate_add_rcpt_entry(char *, int, time_t)
void add_throttle_entry(time_t)
Definition: ze-throttle.c:148
unsigned int connrate_window
bool check_throttle_dos(void)
Definition: ze-throttle.c:239
bool update_throttle_dos()
Definition: ze-throttle.c:256
void connrate_free()
void connrate_print_table(int, int, int, int)
bool connrate_resize(size_t, size_t)
bool connrate_init(size_t, size_t)
void update_throttle(time_t)
Definition: ze-throttle.c:186
void connrate_save_table(char *)
int connrate_read_table(char *)
int connrate_add_bounce_entry(char *, time_t)
int connrate_check_rcpt(char *)
int connrate_check_bounce(char *)