diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-21 12:12:20 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-21 12:12:20 +0100 |
commit | dbdad7480739970eb71052de64b72ca3dfdf8042 (patch) | |
tree | 217019c25b4fb9954b6ca5b3530ac4e6b5ca7fdf /src/libutil/map_private.h | |
parent | 6e8a06293ca2e44082d55cad1e63b1164515839a (diff) | |
download | rspamd-dbdad7480739970eb71052de64b72ca3dfdf8042.tar.gz rspamd-dbdad7480739970eb71052de64b72ca3dfdf8042.zip |
[Feature] Add support for static maps
Diffstat (limited to 'src/libutil/map_private.h')
-rw-r--r-- | src/libutil/map_private.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libutil/map_private.h b/src/libutil/map_private.h index 9e24695b5..f59b3b6c1 100644 --- a/src/libutil/map_private.h +++ b/src/libutil/map_private.h @@ -44,7 +44,8 @@ typedef void (*rspamd_map_dtor) (gpointer p); enum fetch_proto { MAP_PROTO_FILE, MAP_PROTO_HTTP, - MAP_PROTO_HTTPS + MAP_PROTO_HTTPS, + MAP_PROTO_STATIC }; struct rspamd_map_backend { @@ -56,6 +57,7 @@ struct rspamd_map_backend { union { struct file_map_data *fd; struct http_map_data *hd; + struct static_map_data *sd; } data; gchar *uri; ref_entry_t ref; @@ -111,6 +113,12 @@ struct http_map_data { guint16 port; }; +struct static_map_data { + guchar *data; + gsize len; + gboolean processed; +}; + enum rspamd_map_http_stage { map_resolve_host2 = 0, /* 2 requests sent */ map_resolve_host1, /* 1 requests sent */ |