summaryrefslogtreecommitdiffstats
path: root/kernel/seppl_protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/seppl_protocol.h')
-rw-r--r--kernel/seppl_protocol.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/kernel/seppl_protocol.h b/kernel/seppl_protocol.h
new file mode 100644
index 0000000..08d4fa6
--- /dev/null
+++ b/kernel/seppl_protocol.h
@@ -0,0 +1,27 @@
+#ifndef _SEPPL_H
+#define _SEPPL_H
+
+#define SEPPL_PROTOCOL 177
+
+// Packet layout:
+// 1. IP-Header PLAIN
+// 2. Uncrypted header PLAIN
+// 3. iv PLAIN
+// 4. Crypted header CRYPTED
+// 5. Payload (with TCP/UDP/...-Header) CRYPTED
+// 6. Padding CRYPTED
+
+struct seppl_uncrypt_hdr {
+ uint8_t algorithm;
+ char key_name[7];
+} __attribute__((packed)) uncrypt_hdr;
+
+struct seppl_crypt_hdr{
+ uint8_t ident; // 0x00
+ uint8_t saved_protocol;
+ uint16_t saved_tot_len;
+ uint16_t saved_frag_off;
+} __attribute__((packed)) crypt_hdr;
+
+
+#endif