diff options
Diffstat (limited to 'src/fuzzy_storage.h')
-rw-r--r-- | src/fuzzy_storage.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/fuzzy_storage.h b/src/fuzzy_storage.h new file mode 100644 index 000000000..533ecaf13 --- /dev/null +++ b/src/fuzzy_storage.h @@ -0,0 +1,30 @@ +#ifndef RSPAMD_FUZZY_STORAGE_H +#define RSPAMD_FUZZY_STORAGE_H + +#include "config.h" +#include "main.h" +#include "fuzzy.h" + +/* Commands for fuzzy storage */ +#define FUZZY_CHECK 0 +#define FUZZY_WRITE 1 +#define FUZZY_DEL 2 + +struct fuzzy_cmd { + u_char cmd; + uint32_t blocksize; + u_char hash[FUZZY_HASHLEN]; +}; + +struct fuzzy_session { + struct rspamd_worker *worker; + struct event ev; + struct fuzzy_cmd cmd; + struct timeval tv; + int fd; + u_char *pos; +}; + +void start_fuzzy_storage (struct rspamd_worker *worker); + +#endif |