ze-filter  (ze-filter-0.8.0-develop-180218)
ze-mailregex.c File Reference
#include <ze-sys.h>
#include "ze-filter.h"

Go to the source code of this file.

Classes

struct  RegexRec_T
 

Macros

#define DEBUG   0
 
#define LOG_REGEX_IP   1
 
#define REGEX_MAX_LEN   256
 
#define REGCOMP_FLAGS   (REG_ICASE | REG_NEWLINE | REG_EXTENDED)
 
#define ZE_PCRE_FLAGS   (PCRE_CASELESS | PCRE_DOTALL)
 
#define PMATCH_LOCK()   MUTEX_LOCK(&p.match.mutex)
 
#define PMATCH_UNLOCK()   MUTEX_UNLOCK(&p.match.mutex)
 
#define DATA_LOCK()   MUTEX_LOCK(&st_mutex)
 
#define DATA_UNLOCK()   MUTEX_UNLOCK(&st_mutex)
 
#define DIM_VECTOR   (3 * 32)
 
#define URLBL_LOG   12
 
#define DBBL_SCORE   0
 
#define DBBL_DATE   1
 
#define DBBL_RESOLVE   2
 
#define DBBL_ORIGIN   3
 
#define DBBL_DIM   8
 
#define URL_DOMAIN_EXPRESSION   "http[s]?://[^ /<>\\(\\)\"\'?]*"
 
#define URL_FULL_EXPRESSION   "http[s]?://[^ <>\"\']*"
 
#define MAX_DB_ERROR   16
 

Functions

bool log_found_regex (char *, char *, char *, int, int, char *)
 
void dump_regex_table ()
 
bool load_regex_table (char *cfdir, char *fname)
 
int check_regex (char *id, char *ip, char *msg, int where)
 
int check_rurlbl (char *id, char *ip, char *msg)
 
bool db_open_rurlbl_database ()
 
bool db_close_rurbl_database ()
 
bool db_reopen_rurlbl_database ()
 

Macro Definition Documentation

◆ DATA_LOCK

#define DATA_LOCK ( )    MUTEX_LOCK(&st_mutex)

Definition at line 90 of file ze-mailregex.c.

◆ DATA_UNLOCK

#define DATA_UNLOCK ( )    MUTEX_UNLOCK(&st_mutex)

Definition at line 91 of file ze-mailregex.c.

◆ DBBL_DATE

#define DBBL_DATE   1

Definition at line 434 of file ze-mailregex.c.

◆ DBBL_DIM

#define DBBL_DIM   8

Definition at line 437 of file ze-mailregex.c.

◆ DBBL_ORIGIN

#define DBBL_ORIGIN   3

Definition at line 436 of file ze-mailregex.c.

◆ DBBL_RESOLVE

#define DBBL_RESOLVE   2

Definition at line 435 of file ze-mailregex.c.

◆ DBBL_SCORE

#define DBBL_SCORE   0

Definition at line 433 of file ze-mailregex.c.

◆ DEBUG

#define DEBUG   0

Definition at line 29 of file ze-mailregex.c.

◆ DIM_VECTOR

#define DIM_VECTOR   (3 * 32)

Definition at line 292 of file ze-mailregex.c.

◆ LOG_REGEX_IP

#define LOG_REGEX_IP   1

Definition at line 31 of file ze-mailregex.c.

◆ MAX_DB_ERROR

#define MAX_DB_ERROR   16

Definition at line 877 of file ze-mailregex.c.

◆ PMATCH_LOCK

#define PMATCH_LOCK ( )    MUTEX_LOCK(&p.match.mutex)

Definition at line 60 of file ze-mailregex.c.

◆ PMATCH_UNLOCK

#define PMATCH_UNLOCK ( )    MUTEX_UNLOCK(&p.match.mutex)

Definition at line 61 of file ze-mailregex.c.

◆ REGCOMP_FLAGS

#define REGCOMP_FLAGS   (REG_ICASE | REG_NEWLINE | REG_EXTENDED)

Definition at line 35 of file ze-mailregex.c.

◆ REGEX_MAX_LEN

#define REGEX_MAX_LEN   256

Definition at line 33 of file ze-mailregex.c.

◆ URL_DOMAIN_EXPRESSION

#define URL_DOMAIN_EXPRESSION   "http[s]?://[^ /<>\\(\\)\"\'?]*"

Definition at line 439 of file ze-mailregex.c.

◆ URL_FULL_EXPRESSION

#define URL_FULL_EXPRESSION   "http[s]?://[^ <>\"\']*"

Definition at line 440 of file ze-mailregex.c.

◆ URLBL_LOG

#define URLBL_LOG   12

Definition at line 431 of file ze-mailregex.c.

◆ ZE_PCRE_FLAGS

#define ZE_PCRE_FLAGS   (PCRE_CASELESS | PCRE_DOTALL)

Definition at line 38 of file ze-mailregex.c.

Function Documentation

◆ db_close_rurbl_database()

bool db_close_rurbl_database ( )

Definition at line 824 of file ze-mailregex.c.