summaryrefslogtreecommitdiff
path: root/toxcore/onion_announce.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-05-12 14:39:12 -0400
committerirungentoo <irungentoo@gmail.com>2014-05-12 14:39:12 -0400
commit8783bea25ee366cfa3b1fa7c8930c2c2ffaef8fc (patch)
tree57229407341f4ddb88cb5c337e12e6305eb7099e /toxcore/onion_announce.h
parent10da970e0dfcb21fda4da96635b690065375daff (diff)
Use ping_array to store onion announce information instead of sending
over a huge cookie. This reduces the size of the onion announce packets by 100 bytes.
Diffstat (limited to 'toxcore/onion_announce.h')
-rw-r--r--toxcore/onion_announce.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/onion_announce.h b/toxcore/onion_announce.h
index dff61e99..ea320998 100644
--- a/toxcore/onion_announce.h
+++ b/toxcore/onion_announce.h
@@ -29,7 +29,7 @@
29#define ONION_ANNOUNCE_TIMEOUT 300 29#define ONION_ANNOUNCE_TIMEOUT 300
30#define ONION_PING_ID_SIZE crypto_hash_sha256_BYTES 30#define ONION_PING_ID_SIZE crypto_hash_sha256_BYTES
31 31
32#define ONION_ANNOUNCE_SENDBACK_DATA_LENGTH (crypto_box_NONCEBYTES + sizeof(uint32_t) + sizeof(uint64_t) + crypto_box_PUBLICKEYBYTES + sizeof(IP_Port) + crypto_box_MACBYTES) 32#define ONION_ANNOUNCE_SENDBACK_DATA_LENGTH (sizeof(uint64_t))
33 33
34#define ONION_ANNOUNCE_RESPONSE_MIN_SIZE (1 + ONION_ANNOUNCE_SENDBACK_DATA_LENGTH + crypto_box_NONCEBYTES + 1 + ONION_PING_ID_SIZE + crypto_box_MACBYTES) 34#define ONION_ANNOUNCE_RESPONSE_MIN_SIZE (1 + ONION_ANNOUNCE_SENDBACK_DATA_LENGTH + crypto_box_NONCEBYTES + 1 + ONION_PING_ID_SIZE + crypto_box_MACBYTES)
35#define ONION_ANNOUNCE_RESPONSE_MAX_SIZE (ONION_ANNOUNCE_RESPONSE_MIN_SIZE + sizeof(Node_format)*MAX_SENT_NODES) 35#define ONION_ANNOUNCE_RESPONSE_MAX_SIZE (ONION_ANNOUNCE_RESPONSE_MIN_SIZE + sizeof(Node_format)*MAX_SENT_NODES)
@@ -76,7 +76,7 @@ typedef struct {
76 * return 0 on success. 76 * return 0 on success.
77 */ 77 */
78int send_announce_request(Networking_Core *net, Onion_Path *path, Node_format dest, uint8_t *public_key, 78int send_announce_request(Networking_Core *net, Onion_Path *path, Node_format dest, uint8_t *public_key,
79 uint8_t *secret_key, uint8_t *ping_id, uint8_t *client_id, uint8_t *data_public_key, uint8_t *sendback_data); 79 uint8_t *secret_key, uint8_t *ping_id, uint8_t *client_id, uint8_t *data_public_key, uint64_t sendback_data);
80 80
81/* Create and send an onion data request packet. 81/* Create and send an onion data request packet.
82 * 82 *