summaryrefslogtreecommitdiff
path: root/core/packets.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-08-21 09:03:44 -0400
committerirungentoo <irungentoo@gmail.com>2013-08-21 09:03:44 -0400
commitc9a88607c21fabcb31c83271bd4c6f4b339275b7 (patch)
treeaec074c57eb64d777d4e5e28db5cb72de6a632cd /core/packets.h
parentda6416a58423ee68928b82e68ba8ded34cbeaf40 (diff)
parent6ffbfe7d174fef05ae1afe2a004097a4af08382b (diff)
Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Core
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;