#include <string.h>
#include "repsheet.h"
#include "common.h"
#include "cidr.h"
#include "check_cidr.h"
|
|
void | set_initial_whitelist_size (int new_size) |
| |
| int | whitelist (redisContext *context, const char *actor, int type, const char *reason) |
| |
| int | is_ip_whitelisted (redisContext *context, const char *actor, char *reason) |
| |
| int | is_user_whitelisted (redisContext *context, const char *actor, char *reason) |
| |
|
|
int | initial_whitelist_size = 1000 |
| |
- Author
- Aaron Bedra
- Date
- 12/09/2014
| int is_ip_whitelisted |
( |
redisContext * |
context, |
|
|
const char * |
actor, |
|
|
char * |
reason |
|
) |
| |
Checks to see if an ip is on the Repsheet whitelist
- Parameters
-
| context | the Redis connection |
| actor | the IP address of the actor |
| reason | returns the reason for whitelisting. |
- Returns
- TRUE if yes, FALSE if no, DISCONNECTED if error
| int is_user_whitelisted |
( |
redisContext * |
context, |
|
|
const char * |
actor, |
|
|
char * |
reason |
|
) |
| |
Checks to see if a user is on the Repsheet whitelist
- Parameters
-
| context | the Redis connection |
| actor | the user |
| reason | returns the reason for whitelisting. |
- Returns
- TRUE if yes, FALSE if no, DISCONNECTED if error
| int whitelist |
( |
redisContext * |
context, |
|
|
const char * |
actor, |
|
|
int |
type, |
|
|
const char * |
reason |
|
) |
| |
Adds the actor to the Repsheet whitelist
- Parameters
-
| context | the Redis connection |
| actor | the actors user data or ip address |
| type | IP or USER string to describe the reason for whitelisting |
- Returns
- an integer result