summaryrefslogtreecommitdiff
path: root/netcon/RPC.h
diff options
context:
space:
mode:
authorJoseph Henry <josephjah@gmail.com>2016-01-11 13:23:43 -0800
committerJoseph Henry <josephjah@gmail.com>2016-01-11 13:23:43 -0800
commit78c0f0a443919d8f214486f188c6e83a8af15fef (patch)
treeb08fe58eb68d77e3e0a8409a9bbc966ca7514c23 /netcon/RPC.h
parent7656e6b9f867e500e9d176b2757d35210620f2d3 (diff)
downloadinfinitytier-78c0f0a443919d8f214486f188c6e83a8af15fef.tar.gz
infinitytier-78c0f0a443919d8f214486f188c6e83a8af15fef.zip
RPC detection fix
Diffstat (limited to 'netcon/RPC.h')
-rw-r--r--netcon/RPC.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/netcon/RPC.h b/netcon/RPC.h
index ee8182e8..5affc0d4 100644
--- a/netcon/RPC.h
+++ b/netcon/RPC.h
@@ -7,13 +7,15 @@
#define MAGIC_PADDING_SIZE 12
#define TOKEN_SIZE MAGIC_SIZE+MAGIC_PADDING_SIZE
+#define RPC_PHRASE "zerotier\0"
+#define RPC_PHRASE_SIZE 9
// 1st section
-#define IDX_SIGNAL_BYTE 0
-#define IDX_PID 1
-#define IDX_TID sizeof(pid_t) + 1
-#define IDX_COUNT IDX_TID + sizeof(pid_t)
-#define IDX_TIME IDX_COUNT + sizeof(int)
-#define IDX_PAYLOAD IDX_TIME + 20 /* 20 being the length of the timestamp string */
+#define IDX_SIGNAL_PHRASE 0
+#define IDX_PID IDX_SIGNAL_PHRASE + RPC_PHRASE_SIZE
+#define IDX_TID sizeof(pid_t) + IDX_PID
+#define IDX_COUNT IDX_TID + sizeof(pid_t)
+#define IDX_TIME IDX_COUNT + sizeof(int)
+#define IDX_PAYLOAD IDX_TIME + 20 /* 20 being the length of the timestamp string */
// 2nd section
#define CMD_ID_IDX 0