2013-10-07 21:08:23 +00:00
|
|
|
#include <stdlib.h>
|
2013-08-16 15:12:47 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2013-08-26 18:30:02 +00:00
|
|
|
#ifndef BLACKLIST_H
|
|
|
|
#define BLACKLIST_H
|
2013-08-16 15:12:47 +00:00
|
|
|
|
2013-10-03 06:47:31 +00:00
|
|
|
uint32_t blacklist_lookup_index(uint64_t index);
|
2013-08-16 15:12:47 +00:00
|
|
|
int blacklist_is_allowed(uint32_t s_addr);
|
|
|
|
void blacklist_prefix(char *ip, int prefix_len);
|
|
|
|
void whitelist_prefix(char *ip, int prefix_len);
|
2013-10-07 21:08:23 +00:00
|
|
|
int blacklist_init(char *whitelist, char *blacklist,
|
|
|
|
char **whitelist_entries,
|
|
|
|
size_t whitelist_entries_len,
|
|
|
|
char **blacklist_entries,
|
|
|
|
size_t blacklist_entries_len);
|
2013-08-16 15:12:47 +00:00
|
|
|
uint64_t blacklist_count_allowed();
|
|
|
|
uint64_t blacklist_count_not_allowed();
|
|
|
|
|
|
|
|
#endif
|