summaryrefslogtreecommitdiff
path: root/toxcore/packets.h
diff options
context:
space:
mode:
authorjin-eld <jin at mediatomb dot cc>2013-08-04 15:10:37 +0300
committerjin-eld <jin at mediatomb dot cc>2013-08-24 03:25:07 +0300
commite658892793c42b2d058eed0937025ef2ddaaa372 (patch)
tree2a022cab057f2c16ca95860ed980092880052f6e /toxcore/packets.h
parente2aa8161adc85795fe4d63d4642f47e90937ddc2 (diff)
Rename core directory because of autoconf name clash
While doing the checks configure might generate "core" files and will then try to remove them. Having a "core" directory generates an error while runing the configure script. There's no workaround but to rename the core directory.
Diffstat (limited to 'toxcore/packets.h')
-rw-r--r--toxcore/packets.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/toxcore/packets.h b/toxcore/packets.h
new file mode 100644
index 00000000..4f410fb3
--- /dev/null
+++ b/toxcore/packets.h
@@ -0,0 +1,31 @@
1/*
2 * packet.h -- Packet structure
3 *
4 * This file is donated to the Tox Project.
5 * Copyright 2013 plutooo
6 */
7
8typedef struct {
9 uint8_t id[CLIENT_ID_SIZE];
10
11} __attribute__((packed)) clientid_t;
12
13// Ping packet
14typedef struct {
15 uint8_t packet_id;
16 clientid_t client_id;
17 uint8_t nonce[crypto_box_NONCEBYTES];
18 uint64_t ping_id;
19 uint8_t padding[ENCRYPTION_PADDING];
20
21} __attribute__((packed)) pingreq_t;
22
23// Pong packet
24typedef struct {
25 uint8_t packet_id;
26 clientid_t client_id;
27 uint8_t nonce[crypto_box_NONCEBYTES];
28 uint64_t ping_id;
29 uint8_t padding[ENCRYPTION_PADDING];
30
31} __attribute__((packed)) pingres_t;