summaryrefslogtreecommitdiff
path: root/toxcore/onion.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/onion.h')
-rw-r--r--toxcore/onion.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/toxcore/onion.h b/toxcore/onion.h
index 97ac3021..637692eb 100644
--- a/toxcore/onion.h
+++ b/toxcore/onion.h
@@ -28,6 +28,15 @@ typedef struct {
28 uint8_t secret_symmetric_key[crypto_secretbox_KEYBYTES]; 28 uint8_t secret_symmetric_key[crypto_secretbox_KEYBYTES];
29} Onion; 29} Onion;
30 30
31/* Create and send a onion packet.
32 *
33 * nodes is a list of 4 nodes, the packet will route through nodes 0, 1, 2 and the data
34 * with length length will arrive at 3.
35 *
36 * return -1 on failure.
37 * return 0 on success.
38 */
39int send_onion_packet(Onion *onion, Node_format *nodes, uint8_t *data, uint32_t length);
31 40
32Onion *new_onion(DHT *dht); 41Onion *new_onion(DHT *dht);
33 42