diff options
author | notsecure <notsecure@marek.ca> | 2014-05-19 09:18:04 -0400 |
---|---|---|
committer | notsecure <notsecure@marek.ca> | 2014-05-19 09:18:04 -0400 |
commit | 0d711afbeca8b229d4161b2a07901ace51663c02 (patch) | |
tree | 6c91713fe149c4b9162e6b41422d27f7b8fe202c /toxcore/onion.h | |
parent | 207e87187d61b02098ae548426f84c6cce515525 (diff) |
IP_Port packing unpacking in onion.c
Diffstat (limited to 'toxcore/onion.h')
-rw-r--r-- | toxcore/onion.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/onion.h b/toxcore/onion.h index 712bbf13..13dc8f52 100644 --- a/toxcore/onion.h +++ b/toxcore/onion.h | |||
@@ -41,11 +41,11 @@ typedef struct { | |||
41 | 41 | ||
42 | #define ONION_MAX_PACKET_SIZE 1400 | 42 | #define ONION_MAX_PACKET_SIZE 1400 |
43 | 43 | ||
44 | #define ONION_RETURN_1 (crypto_box_NONCEBYTES + sizeof(IP_Port) + crypto_box_MACBYTES) | 44 | #define ONION_RETURN_1 (crypto_box_NONCEBYTES + SIZE_IPPORT + crypto_box_MACBYTES) |
45 | #define ONION_RETURN_2 (crypto_box_NONCEBYTES + sizeof(IP_Port) + crypto_box_MACBYTES + ONION_RETURN_1) | 45 | #define ONION_RETURN_2 (crypto_box_NONCEBYTES + SIZE_IPPORT + crypto_box_MACBYTES + ONION_RETURN_1) |
46 | #define ONION_RETURN_3 (crypto_box_NONCEBYTES + sizeof(IP_Port) + crypto_box_MACBYTES + ONION_RETURN_2) | 46 | #define ONION_RETURN_3 (crypto_box_NONCEBYTES + SIZE_IPPORT + crypto_box_MACBYTES + ONION_RETURN_2) |
47 | 47 | ||
48 | #define ONION_SEND_BASE (crypto_box_PUBLICKEYBYTES + sizeof(IP_Port) + crypto_box_MACBYTES) | 48 | #define ONION_SEND_BASE (crypto_box_PUBLICKEYBYTES + SIZE_IPPORT + crypto_box_MACBYTES) |
49 | #define ONION_SEND_3 (crypto_box_NONCEBYTES + ONION_SEND_BASE + ONION_RETURN_2) | 49 | #define ONION_SEND_3 (crypto_box_NONCEBYTES + ONION_SEND_BASE + ONION_RETURN_2) |
50 | #define ONION_SEND_2 (crypto_box_NONCEBYTES + ONION_SEND_BASE*2 + ONION_RETURN_1) | 50 | #define ONION_SEND_2 (crypto_box_NONCEBYTES + ONION_SEND_BASE*2 + ONION_RETURN_1) |
51 | #define ONION_SEND_1 (crypto_box_NONCEBYTES + ONION_SEND_BASE*3) | 51 | #define ONION_SEND_1 (crypto_box_NONCEBYTES + ONION_SEND_BASE*3) |