summaryrefslogtreecommitdiff
path: root/toxcore/onion.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-05-01 15:46:48 -0400
committerirungentoo <irungentoo@gmail.com>2015-05-01 15:46:48 -0400
commitbd67129c3e532a97d13c7ed04541ecefc395ab5a (patch)
tree349afc587a5f73a6eb42f4d544c970b583ce7157 /toxcore/onion.h
parent7d13f1928e604b87c29ca22d8bf14e962c1cc8ed (diff)
Added a define for the length of onion paths.
Diffstat (limited to 'toxcore/onion.h')
-rw-r--r--toxcore/onion.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/toxcore/onion.h b/toxcore/onion.h
index b05d2c8c..2b270ea9 100644
--- a/toxcore/onion.h
+++ b/toxcore/onion.h
@@ -53,6 +53,8 @@ typedef struct {
53#define ONION_MAX_DATA_SIZE (ONION_MAX_PACKET_SIZE - (ONION_SEND_1 + 1)) 53#define ONION_MAX_DATA_SIZE (ONION_MAX_PACKET_SIZE - (ONION_SEND_1 + 1))
54#define ONION_RESPONSE_MAX_DATA_SIZE (ONION_MAX_PACKET_SIZE - (1 + ONION_RETURN_3)) 54#define ONION_RESPONSE_MAX_DATA_SIZE (ONION_MAX_PACKET_SIZE - (1 + ONION_RETURN_3))
55 55
56#define ONION_PATH_LENGTH 3
57
56typedef struct { 58typedef struct {
57 uint8_t shared_key1[crypto_box_BEFORENMBYTES]; 59 uint8_t shared_key1[crypto_box_BEFORENMBYTES];
58 uint8_t shared_key2[crypto_box_BEFORENMBYTES]; 60 uint8_t shared_key2[crypto_box_BEFORENMBYTES];
@@ -76,7 +78,7 @@ typedef struct {
76 78
77/* Create a new onion path. 79/* Create a new onion path.
78 * 80 *
79 * Create a new onion path out of nodes (nodes is a list of 3 nodes) 81 * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes)
80 * 82 *
81 * new_path must be an empty memory location of atleast Onion_Path size. 83 * new_path must be an empty memory location of atleast Onion_Path size.
82 * 84 *