ze-filter  (ze-filter-0.8.0-develop-180218)
ze-stats.h File Reference

Go to the source code of this file.

Classes

struct  p_stats_T
 
struct  j_stats_T
 

Macros

#define STAT_RESTART   0
 
#define STAT_BYTES   1
 
#define STAT_MSGS   2
 
#define STAT_CONNECT   3
 
#define STAT_ABORT   4
 
#define STAT_CLOSE   5
 
#define STAT_ENVTO   6
 
#define STAT_FILES   7
 
#define STAT_XFILES   8
 
#define STAT_VIRUS   9
 
#define STAT_LUSERS   10
 
#define STAT_NO_TO_HEADERS   12
 
#define STAT_NO_FROM_HEADERS   13
 
#define STAT_RESOLVE_FAIL   14
 
#define STAT_RESOLVE_FORGED   15
 
#define STAT_MAX_RCPT   16
 
#define STAT_CONN_RATE   17
 
#define STAT_RCPT_RATE   18
 
#define STAT_MAX_MSGS   19
 
#define STAT_NO_HEADERS   20
 
#define STAT_PATTERN_MATCHING   21
 
#define STAT_SUBJECT_CONTENTS   22
 
#define STAT_HEADERS_CONTENTS   23
 
#define STAT_HELO_CONTENTS   24
 
#define STAT_FROM_CONTENTS   25
 
#define STAT_ORACLE   26
 
#define STAT_URLBL   27
 
#define STAT_POLICY   30
 
#define STAT_BINARY   31
 
#define STAT_BASE64   32
 
#define STAT_QUOTED_PRINTABLE   33
 
#define STAT_BAYES_SPAM   36
 
#define STAT_BAYES_HAM   37
 
#define STAT_BAYES_DUB   38
 
#define STAT_SINGLE_MESSAGE   40
 
#define STAT_MSG_RATE   41
 
#define STAT_OPEN_CONN   42
 
#define STAT_EMPTY_CONN   43
 
#define STAT_BAD_RCPT   44
 
#define STAT_BADMX   46
 
#define STAT_GREY_RCPT   47
 
#define STAT_GREY_MSGS   48
 
#define STAT_RCPT_TEMPFAIL   50
 
#define STAT_RCPT_REJECT   51
 
#define STAT_RCPT_ACCESS   52
 
#define STAT_RCPT_BAD_NETWORK   53
 
#define STAT_RCPT_UNKNOWN   54
 
#define STAT_RCPT_SPAMTRAP   55
 
#define STAT_XX   100
 
#define DIM_STATS   128
 
#define __ZE_STATS_H
 

Typedefs

typedef struct p_stats_T p_stats_T
 
typedef struct j_stats_T j_stats_T
 

Functions

void log_counters (int, bool)
 
void stats_inc (int, long)
 
void stats_reset ()
 
void init_proc_state ()
 
void save_state ()
 
void read_state ()
 
void reset_state ()
 
int print_state ()
 
char * stats_title (int)
 
void print_p_stats_all (int, p_stats_T *, char *, p_stats_T *, char *, int, bool)
 
void print_p_stats (int, p_stats_T *, char *, int, int)
 
int dump_state (int, int, int, int, int)
 
void print_filter_stats_summary (void)
 
void msg_score_stats_update (msg_scores_T *scores)
 
void msg_score_stats_print (int, int)
 

Macro Definition Documentation

◆ __ZE_STATS_H

#define __ZE_STATS_H

Definition at line 146 of file ze-stats.h.

◆ DIM_STATS

#define DIM_STATS   128

Definition at line 91 of file ze-stats.h.

◆ STAT_ABORT

#define STAT_ABORT   4

Definition at line 30 of file ze-stats.h.

◆ STAT_BAD_RCPT

#define STAT_BAD_RCPT   44

Definition at line 74 of file ze-stats.h.

◆ STAT_BADMX

#define STAT_BADMX   46

Definition at line 78 of file ze-stats.h.

◆ STAT_BASE64

#define STAT_BASE64   32

Definition at line 61 of file ze-stats.h.

◆ STAT_BAYES_DUB

#define STAT_BAYES_DUB   38

Definition at line 66 of file ze-stats.h.

◆ STAT_BAYES_HAM

#define STAT_BAYES_HAM   37

Definition at line 65 of file ze-stats.h.

◆ STAT_BAYES_SPAM

#define STAT_BAYES_SPAM   36

Definition at line 64 of file ze-stats.h.

◆ STAT_BINARY

#define STAT_BINARY   31

Definition at line 60 of file ze-stats.h.

◆ STAT_BYTES

#define STAT_BYTES   1

Definition at line 27 of file ze-stats.h.

◆ STAT_CLOSE

#define STAT_CLOSE   5

Definition at line 31 of file ze-stats.h.

◆ STAT_CONN_RATE

#define STAT_CONN_RATE   17

Definition at line 44 of file ze-stats.h.

◆ STAT_CONNECT

#define STAT_CONNECT   3

Definition at line 29 of file ze-stats.h.

◆ STAT_EMPTY_CONN

#define STAT_EMPTY_CONN   43

Definition at line 72 of file ze-stats.h.

◆ STAT_ENVTO

#define STAT_ENVTO   6

Definition at line 32 of file ze-stats.h.

◆ STAT_FILES

#define STAT_FILES   7

Definition at line 33 of file ze-stats.h.

◆ STAT_FROM_CONTENTS

#define STAT_FROM_CONTENTS   25

Definition at line 54 of file ze-stats.h.

◆ STAT_GREY_MSGS

#define STAT_GREY_MSGS   48

Definition at line 80 of file ze-stats.h.

◆ STAT_GREY_RCPT

#define STAT_GREY_RCPT   47

Definition at line 79 of file ze-stats.h.

◆ STAT_HEADERS_CONTENTS

#define STAT_HEADERS_CONTENTS   23

Definition at line 52 of file ze-stats.h.

◆ STAT_HELO_CONTENTS

#define STAT_HELO_CONTENTS   24

Definition at line 53 of file ze-stats.h.

◆ STAT_LUSERS

#define STAT_LUSERS   10

Definition at line 36 of file ze-stats.h.

◆ STAT_MAX_MSGS

#define STAT_MAX_MSGS   19

Definition at line 46 of file ze-stats.h.

◆ STAT_MAX_RCPT

#define STAT_MAX_RCPT   16

Definition at line 43 of file ze-stats.h.

◆ STAT_MSG_RATE

#define STAT_MSG_RATE   41

Definition at line 69 of file ze-stats.h.

◆ STAT_MSGS

#define STAT_MSGS   2

Definition at line 28 of file ze-stats.h.

◆ STAT_NO_FROM_HEADERS

#define STAT_NO_FROM_HEADERS   13

Definition at line 39 of file ze-stats.h.

◆ STAT_NO_HEADERS

#define STAT_NO_HEADERS   20

Definition at line 48 of file ze-stats.h.

◆ STAT_NO_TO_HEADERS

#define STAT_NO_TO_HEADERS   12

Definition at line 38 of file ze-stats.h.

◆ STAT_OPEN_CONN

#define STAT_OPEN_CONN   42

Definition at line 71 of file ze-stats.h.

◆ STAT_ORACLE

#define STAT_ORACLE   26

Definition at line 55 of file ze-stats.h.

◆ STAT_PATTERN_MATCHING

#define STAT_PATTERN_MATCHING   21

Definition at line 50 of file ze-stats.h.

◆ STAT_POLICY

#define STAT_POLICY   30

Definition at line 58 of file ze-stats.h.

◆ STAT_QUOTED_PRINTABLE

#define STAT_QUOTED_PRINTABLE   33

Definition at line 62 of file ze-stats.h.

◆ STAT_RCPT_ACCESS

#define STAT_RCPT_ACCESS   52

Definition at line 84 of file ze-stats.h.

◆ STAT_RCPT_BAD_NETWORK

#define STAT_RCPT_BAD_NETWORK   53

Definition at line 85 of file ze-stats.h.

◆ STAT_RCPT_RATE

#define STAT_RCPT_RATE   18

Definition at line 45 of file ze-stats.h.

◆ STAT_RCPT_REJECT

#define STAT_RCPT_REJECT   51

Definition at line 83 of file ze-stats.h.

◆ STAT_RCPT_SPAMTRAP

#define STAT_RCPT_SPAMTRAP   55

Definition at line 87 of file ze-stats.h.

◆ STAT_RCPT_TEMPFAIL

#define STAT_RCPT_TEMPFAIL   50

Definition at line 82 of file ze-stats.h.

◆ STAT_RCPT_UNKNOWN

#define STAT_RCPT_UNKNOWN   54

Definition at line 86 of file ze-stats.h.

◆ STAT_RESOLVE_FAIL

#define STAT_RESOLVE_FAIL   14

Definition at line 41 of file ze-stats.h.

◆ STAT_RESOLVE_FORGED

#define STAT_RESOLVE_FORGED   15

Definition at line 42 of file ze-stats.h.

◆ STAT_RESTART

#define STAT_RESTART   0

Definition at line 26 of file ze-stats.h.

◆ STAT_SINGLE_MESSAGE

#define STAT_SINGLE_MESSAGE   40

Definition at line 68 of file ze-stats.h.

◆ STAT_SUBJECT_CONTENTS

#define STAT_SUBJECT_CONTENTS   22

Definition at line 51 of file ze-stats.h.

◆ STAT_URLBL

#define STAT_URLBL   27

Definition at line 56 of file ze-stats.h.

◆ STAT_VIRUS

#define STAT_VIRUS   9

Definition at line 35 of file ze-stats.h.

◆ STAT_XFILES

#define STAT_XFILES   8

Definition at line 34 of file ze-stats.h.

◆ STAT_XX

#define STAT_XX   100

Definition at line 89 of file ze-stats.h.

Typedef Documentation

◆ j_stats_T

typedef struct j_stats_T j_stats_T

◆ p_stats_T

typedef struct p_stats_T p_stats_T

Function Documentation

◆ dump_state()

int dump_state ( int  ,
int  ,
int  ,
int  ,
int   
)

◆ init_proc_state()

void init_proc_state ( )

Definition at line 502 of file ze-stats.c.

◆ log_counters()

void log_counters ( int  ,
bool   
)

Definition at line 330 of file ze-stats.c.

◆ msg_score_stats_print()

void msg_score_stats_print ( int  ,
int   
)

Definition at line 118 of file ze-stats.c.

◆ msg_score_stats_update()

void msg_score_stats_update ( msg_scores_T scores)

Definition at line 52 of file ze-stats.c.

◆ print_filter_stats_summary()

void print_filter_stats_summary ( void  )

Definition at line 1146 of file ze-stats.c.

◆ print_p_stats()

void print_p_stats ( int  ,
p_stats_T ,
char *  ,
int  ,
int   
)

Definition at line 807 of file ze-stats.c.

◆ print_p_stats_all()

void print_p_stats_all ( int  ,
p_stats_T ,
char *  ,
p_stats_T ,
char *  ,
int  ,
bool   
)

Definition at line 878 of file ze-stats.c.

◆ print_state()

int print_state ( )

◆ read_state()

void read_state ( )

Definition at line 467 of file ze-stats.c.

◆ reset_state()

void reset_state ( )

Definition at line 528 of file ze-stats.c.

◆ save_state()

void save_state ( )

Definition at line 430 of file ze-stats.c.

◆ stats_inc()

void stats_inc ( int  ,
long   
)

Definition at line 401 of file ze-stats.c.

◆ stats_reset()

void stats_reset ( )

Definition at line 381 of file ze-stats.c.

◆ stats_title()

char* stats_title ( int  )

Definition at line 782 of file ze-stats.c.