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

Go to the source code of this file.

Classes

struct  oracle_message_T
 

Macros

#define ORACLE_DATA_LOCK()   MUTEX_LOCK(&ora_mutex)
 
#define ORACLE_DATA_UNLOCK()   MUTEX_UNLOCK(&ora_mutex)
 
#define MINCNT   0
 
#define KEYVALUE   "^[a-z0-9_-]+=[^ \t]+"
 

Functions

void oracle_stats_update (int score)
 
void oracle_stats_get (double *gm, double *gs, long *gnb, double *tm, double *ts, long *tnb)
 
char * oracle_get_label (int type, int ind)
 
double oracle_get_podds (int type, int ind)
 
bool oracle_set_podds (int type, int ind, double value)
 
double oracle_get_nodds (int type, int ind)
 
bool oracle_set_nodds (int type, int ind, double value)
 
double oracle_get_score (int type, int ind)
 
bool oracle_set_score (int type, int ind, double value)
 
long oracle_get_count (int type, int ind)
 
long oracle_set_count (int type, int ind, long value)
 
long oracle_inc_count (int type, int ind)
 
bool oracle_dump_counters (int fd, bool verbose)
 
bool oracle_read_counters ()
 
bool oracle_save_counters ()
 
bool oracle_read_scores ()
 
bool load_oracle_defs (char *cfdir, char *fname)
 
void dump_oracle_defs ()
 
bool oracle_check_enabled (int type, int ind)
 
int oracle_compute_score (char *id, char *ip, spamchk_T *data)
 

Macro Definition Documentation

◆ KEYVALUE

#define KEYVALUE   "^[a-z0-9_-]+=[^ \t]+"

Definition at line 819 of file ze-oracle-scores.c.

◆ MINCNT

#define MINCNT   0

Definition at line 611 of file ze-oracle-scores.c.

◆ ORACLE_DATA_LOCK

#define ORACLE_DATA_LOCK ( )    MUTEX_LOCK(&ora_mutex)

Definition at line 297 of file ze-oracle-scores.c.

◆ ORACLE_DATA_UNLOCK

#define ORACLE_DATA_UNLOCK ( )    MUTEX_UNLOCK(&ora_mutex)

Definition at line 298 of file ze-oracle-scores.c.

Function Documentation

◆ oracle_get_nodds()

double oracle_get_nodds ( int  type,
int  ind 
)

Definition at line 431 of file ze-oracle-scores.c.

◆ oracle_get_podds()

double oracle_get_podds ( int  type,
int  ind 
)

Definition at line 379 of file ze-oracle-scores.c.

◆ oracle_set_nodds()

bool oracle_set_nodds ( int  type,
int  ind,
double  value 
)

Definition at line 456 of file ze-oracle-scores.c.

◆ oracle_set_podds()

bool oracle_set_podds ( int  type,
int  ind,
double  value 
)

Definition at line 404 of file ze-oracle-scores.c.