From bd67129c3e532a97d13c7ed04541ecefc395ab5a Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 1 May 2015 15:46:48 -0400 Subject: Added a define for the length of onion paths. --- toxcore/onion.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'toxcore/onion.h') 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 { #define ONION_MAX_DATA_SIZE (ONION_MAX_PACKET_SIZE - (ONION_SEND_1 + 1)) #define ONION_RESPONSE_MAX_DATA_SIZE (ONION_MAX_PACKET_SIZE - (1 + ONION_RETURN_3)) +#define ONION_PATH_LENGTH 3 + typedef struct { uint8_t shared_key1[crypto_box_BEFORENMBYTES]; uint8_t shared_key2[crypto_box_BEFORENMBYTES]; @@ -76,7 +78,7 @@ typedef struct { /* Create a new onion path. * - * Create a new onion path out of nodes (nodes is a list of 3 nodes) + * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) * * new_path must be an empty memory location of atleast Onion_Path size. * -- cgit v1.2.3