summaryrefslogtreecommitdiff
path: root/core/packets.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/packets.h')
-rw-r--r--core/packets.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/core/packets.h b/core/packets.h
index 222b1425..4f410fb3 100644
--- a/core/packets.h
+++ b/core/packets.h
@@ -10,15 +10,9 @@ typedef struct {
10 10
11} __attribute__((packed)) clientid_t; 11} __attribute__((packed)) clientid_t;
12 12
13typedef enum {
14 PACKET_PING_REQ = 0,
15 PACKET_PING_RES = 1
16
17} packetid_t;
18
19// Ping packet 13// Ping packet
20typedef struct { 14typedef struct {
21 uint8_t magic; 15 uint8_t packet_id;
22 clientid_t client_id; 16 clientid_t client_id;
23 uint8_t nonce[crypto_box_NONCEBYTES]; 17 uint8_t nonce[crypto_box_NONCEBYTES];
24 uint64_t ping_id; 18 uint64_t ping_id;
@@ -28,7 +22,7 @@ typedef struct {
28 22
29// Pong packet 23// Pong packet
30typedef struct { 24typedef struct {
31 uint8_t magic; 25 uint8_t packet_id;
32 clientid_t client_id; 26 clientid_t client_id;
33 uint8_t nonce[crypto_box_NONCEBYTES]; 27 uint8_t nonce[crypto_box_NONCEBYTES];
34 uint64_t ping_id; 28 uint64_t ping_id;