aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/task.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-16 15:32:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-07-16 15:32:17 +0100
commitf46d3ab320e9a0638f4e96826a315608c65ea6c7 (patch)
tree08430063b824ed29a8e88e9876a15ea3f37ccd89 /src/libserver/task.h
parent8868de1133e8641bec9218858528b1f175bd10c1 (diff)
downloadrspamd-f46d3ab320e9a0638f4e96826a315608c65ea6c7.tar.gz
rspamd-f46d3ab320e9a0638f4e96826a315608c65ea6c7.zip
[Feature] Support protocol flags
Diffstat (limited to 'src/libserver/task.h')
-rw-r--r--src/libserver/task.h10
1 files changed, 9 insertions, 1 deletions
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))