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

Go to the source code of this file.

Classes

struct  dbblq_T
 
struct  dbbl_T
 
struct  blpool_T
 

Macros

#define JDEBUG   0
 
#define DREF   32
 
#define DIM_BL   16
 
#define SZPOOL   32
 
#define DATA_LOCK()
 
#define DATA_UNLOCK()
 

Typedefs

typedef struct blpool_T blpool_T
 

Functions

bool db_open_blacklist ()
 
bool db_close_blacklist ()
 
bool db_check_blacklist (char *ip)
 
bool db_update_blacklist (char *ip, int what)
 
bool db_blackliste_check (char *why, char *key, db_map_T *r)
 
bool db_map_open (char *bl)
 
bool db_map_close (char *bl)
 
bool db_map_close_all ()
 
bool db_map_check (char *bl, char *why, char *key, char *buf, size_t sz)
 
bool db_map_add (char *bl, char *why, char *key, char *buf)
 

Macro Definition Documentation

◆ DATA_LOCK

#define DATA_LOCK ( )
Value:
if (pthread_mutex_lock(&blpool.mutex) != 0) { \
ZE_LogSysError("pthread_mutex_lock"); \
}
pthread_mutex_t mutex
Definition: ze-dbbl.c:269

Definition at line 276 of file ze-dbbl.c.

◆ DATA_UNLOCK

#define DATA_UNLOCK ( )
Value:
if (pthread_mutex_unlock(&blpool.mutex) != 0) { \
ZE_LogSysError("pthread_mutex_unlock"); \
}
pthread_mutex_t mutex
Definition: ze-dbbl.c:269

Definition at line 281 of file ze-dbbl.c.

◆ DIM_BL

#define DIM_BL   16

Definition at line 187 of file ze-dbbl.c.

◆ DREF

#define DREF   32

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

◆ JDEBUG

#define JDEBUG   0

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

◆ SZPOOL

#define SZPOOL   32

Definition at line 265 of file ze-dbbl.c.

Typedef Documentation

◆ blpool_T

typedef struct blpool_T blpool_T

Function Documentation

◆ db_blackliste_check()

bool db_blackliste_check ( char *  why,
char *  key,
db_map_T r 
)

Definition at line 190 of file ze-dbbl.c.

◆ db_check_blacklist()

bool db_check_blacklist ( char *  ip)

Definition at line 103 of file ze-dbbl.c.

◆ db_close_blacklist()

bool db_close_blacklist ( )

Definition at line 83 of file ze-dbbl.c.

◆ db_map_add()

bool db_map_add ( char *  bl,
char *  why,
char *  key,
char *  buf 
)

Definition at line 521 of file ze-dbbl.c.

◆ db_map_check()

bool db_map_check ( char *  bl,
char *  why,
char *  key,
char *  buf,
size_t  sz 
)

Definition at line 454 of file ze-dbbl.c.

◆ db_map_close()

bool db_map_close ( char *  bl)

Definition at line 379 of file ze-dbbl.c.

◆ db_map_close_all()

bool db_map_close_all ( void  )

Definition at line 424 of file ze-dbbl.c.

◆ db_map_open()

bool db_map_open ( char *  bl)

Definition at line 317 of file ze-dbbl.c.

◆ db_open_blacklist()

bool db_open_blacklist ( )

Definition at line 56 of file ze-dbbl.c.

◆ db_update_blacklist()

bool db_update_blacklist ( char *  ip,
int  what 
)

Definition at line 145 of file ze-dbbl.c.