blob: d27336254a20e99e0d3c2f9a794311c61eb52b1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#ifndef RSPAMD_VIEW_H
#define RSPAMD_VIEW_H
#include "config.h"
#include "main.h"
#include "radix.h"
struct rspamd_view {
GList *from_re_list;
GHashTable *from_hash;
radix_tree_t *ip_tree;
GHashTable *symbols_hash;
GList *symbols_re_list;
memory_pool_t *pool;
};
struct rspamd_view* init_view (memory_pool_t *pool);
gboolean add_view_from (struct rspamd_view *view, char *line);
gboolean add_view_ip (struct rspamd_view *view, char *line);
gboolean add_view_symbols (struct rspamd_view *view, char *line);
gboolean check_view (GList *views, const char *symbol, struct worker_task *task);
#endif
|