diff options
Diffstat (limited to 'toxcore/onion.h')
-rw-r--r-- | toxcore/onion.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/toxcore/onion.h b/toxcore/onion.h index 5dedd60d..e8e7042c 100644 --- a/toxcore/onion.h +++ b/toxcore/onion.h | |||
@@ -92,6 +92,19 @@ int create_onion_path(const DHT *dht, Onion_Path *new_path, const Node_format *n | |||
92 | int create_onion_packet(uint8_t *packet, uint16_t max_packet_length, const Onion_Path *path, IP_Port dest, | 92 | int create_onion_packet(uint8_t *packet, uint16_t max_packet_length, const Onion_Path *path, IP_Port dest, |
93 | const uint8_t *data, uint32_t length); | 93 | const uint8_t *data, uint32_t length); |
94 | 94 | ||
95 | |||
96 | /* Create a onion packet to be sent over tcp. | ||
97 | * | ||
98 | * Use Onion_Path path to create packet for data of length to dest. | ||
99 | * Maximum length of data is ONION_MAX_DATA_SIZE. | ||
100 | * packet should be at least ONION_MAX_PACKET_SIZE big. | ||
101 | * | ||
102 | * return -1 on failure. | ||
103 | * return length of created packet on success. | ||
104 | */ | ||
105 | int create_onion_packet_tcp(uint8_t *packet, uint16_t max_packet_length, const Onion_Path *path, IP_Port dest, | ||
106 | const uint8_t *data, uint32_t length); | ||
107 | |||
95 | /* Create and send a onion packet. | 108 | /* Create and send a onion packet. |
96 | * | 109 | * |
97 | * Use Onion_Path path to send data of length to dest. | 110 | * Use Onion_Path path to send data of length to dest. |