aboutsummaryrefslogtreecommitdiffstats
path: root/src/protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol.h')
-rw-r--r--src/protocol.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/protocol.h b/src/protocol.h
new file mode 100644
index 000000000..6c750e91f
--- /dev/null
+++ b/src/protocol.h
@@ -0,0 +1,31 @@
+#ifndef RSPAMD_PROTOCOL_H
+#define RSPAMD_PROTOCOL_H
+
+#include "config.h"
+
+#define RSPAMD_FILTER_ERROR 1
+#define RSPAMD_NETWORK_ERROR 2
+#define RSPAMD_PROTOCOL_ERROR 3
+#define RSPAMD_LENGTH_ERROR 4
+
+struct worker_task;
+
+enum rspamd_protocol {
+ SPAMC_PROTO,
+ RSPAMC_PROTO,
+};
+
+enum rspamd_command {
+ CMD_CHECK,
+ CMD_SYMBOLS,
+ CMD_REPORT,
+ CMD_REPORT_IFSPAM,
+ CMD_SKIP,
+ CMD_PING,
+ CMD_PROCESS,
+};
+
+int read_rspamd_input_line (struct worker_task *task, char *line);
+int write_reply (struct worker_task *task);
+
+#endif