#include <string.h>
#include "repsheet.h"
#include "common.h"
#include "cidr.h"
#include "check_cidr.h"
|
int | initial_blacklist_size = 100 |
|
- Author
- Aaron Bedra
- Date
- 12/09/2014
int blacklist |
( |
redisContext * |
context, |
|
|
const char * |
actor, |
|
|
int |
type, |
|
|
const char * |
reason |
|
) |
| |
Adds the actor to the Repsheet blacklist
- Parameters
-
context | the Redis connection |
actor | the actors user data or ip address |
type | IP or USER string to describe the reason for blacklisting |
- Returns
- an integer result
int is_ip_blacklisted |
( |
redisContext * |
context, |
|
|
const char * |
actor, |
|
|
char * |
reason |
|
) |
| |
Checks to see if an ip is on the Repsheet blacklist
- Parameters
-
context | the Redis connection |
actor | the IP address of the actor |
reason | returns the reason for blacklisting. |
- Returns
- TRUE if yes, FALSE if no, DISCONNECTED if error
int is_user_blacklisted |
( |
redisContext * |
context, |
|
|
const char * |
actor, |
|
|
char * |
reason |
|
) |
| |
Checks to see if a user is on the Repsheet blacklist
- Parameters
-
context | the Redis connection |
actor | the user |
reason | returns the reason for blacklisting. |
- Returns
- TRUE if yes, FALSE if no, DISCONNECTED if error
void set_initial_blacklist_size |
( |
int |
new_size | ) |
|
externally settable parameter
- Parameters
-
new_size | initial size of expandable blacklist cache |