aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/rspamd_control.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-10-23 18:37:34 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-10-23 18:37:34 +0100
commit63c6d3080d531e7eb4bf32ac985408dbd0513c6b (patch)
tree4f179039acf6ff729748c3265e5c71c268068117 /src/libserver/rspamd_control.h
parentb1d1a3c45e9447ac9de3a2a17901366fe821e5f4 (diff)
downloadrspamd-63c6d3080d531e7eb4bf32ac985408dbd0513c6b.tar.gz
rspamd-63c6d3080d531e7eb4bf32ac985408dbd0513c6b.zip
[Project] Synchronize hyperscan caches via the main process
Diffstat (limited to 'src/libserver/rspamd_control.h')
-rw-r--r--src/libserver/rspamd_control.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libserver/rspamd_control.h b/src/libserver/rspamd_control.h
index 1c0f593e3..dff48927d 100644
--- a/src/libserver/rspamd_control.h
+++ b/src/libserver/rspamd_control.h
@@ -47,12 +47,13 @@ enum rspamd_srv_type {
RSPAMD_SRV_ON_FORK,
RSPAMD_SRV_HEARTBEAT,
RSPAMD_SRV_HEALTH,
+ RSPAMD_NOTICE_HYPERSCAN_CACHE,
};
enum rspamd_log_pipe_type {
RSPAMD_LOG_PIPE_SYMBOLS = 0,
};
-#define CONTROL_PATHLEN MIN(PATH_MAX, PIPE_BUF - sizeof(int) * 2)
+#define CONTROL_PATHLEN MIN(PATH_MAX, PIPE_BUF - sizeof(int) * 2 - sizeof(gint64))
struct rspamd_control_command {
enum rspamd_control_type type;
union {
@@ -174,6 +175,10 @@ struct rspamd_srv_command {
struct {
guint status;
} health;
+ /* Used when a worker loads a valid hyperscan file */
+ struct {
+ char path[CONTROL_PATHLEN];
+ } hyperscan_cache_file;
} cmd;
};
@@ -205,6 +210,9 @@ struct rspamd_srv_reply {
guint scanners_count;
guint workers_hb_lost;
} health;
+ struct {
+ int unused;
+ } hyperscan_cache_file;
} reply;
};