From f46d3ab320e9a0638f4e96826a315608c65ea6c7 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 16 Jul 2019 15:32:17 +0100 Subject: [Feature] Support protocol flags --- src/libserver/task.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/libserver/task.h') diff --git a/src/libserver/task.h b/src/libserver/task.h index d6a9fc7c9..ec66febd4 100644 --- a/src/libserver/task.h +++ b/src/libserver/task.h @@ -118,13 +118,21 @@ enum rspamd_task_stage { #define RSPAMD_TASK_FLAG_MESSAGE_REWRITE (1u << 24u) #define RSPAMD_TASK_FLAG_MAX_SHIFT (24u) +/* Spamc message */ #define RSPAMD_TASK_PROTOCOL_FLAG_SPAMC (1u << 0u) +/* Request has a JSON control block */ #define RSPAMD_TASK_PROTOCOL_FLAG_HAS_CONTROL (1u << 1u) +/* Request has been done by a local client */ #define RSPAMD_TASK_PROTOCOL_FLAG_LOCAL_CLIENT (1u << 2u) +/* Request has been sent via milter */ #define RSPAMD_TASK_PROTOCOL_FLAG_MILTER (1u << 3u) +/* Compress protocol reply */ #define RSPAMD_TASK_PROTOCOL_FLAG_COMPRESSED (1u << 4u) +/* Include all URLs */ #define RSPAMD_TASK_PROTOCOL_FLAG_EXT_URLS (1u << 5u) -#define RSPAMD_TASK_PROTOCOL_FLAG_MAX_SHIFT (5u) +/* Client allows body block (including headers in no FLAG_MILTER) */ +#define RSPAMD_TASK_PROTOCOL_FLAG_BODY_BLOCK (1u << 6u) +#define RSPAMD_TASK_PROTOCOL_FLAG_MAX_SHIFT (6u) #define RSPAMD_TASK_IS_SKIPPED(task) (((task)->flags & RSPAMD_TASK_FLAG_SKIP)) #define RSPAMD_TASK_IS_SPAMC(task) (((task)->protocol_flags & RSPAMD_TASK_PROTOCOL_FLAG_SPAMC)) -- cgit v1.2.3