summaryrefslogtreecommitdiff
path: root/toxcore/onion_announce.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-01-06 17:59:44 -0500
committerirungentoo <irungentoo@gmail.com>2014-01-06 17:59:44 -0500
commit566c9f63bcaa87cbded56e9365b908d2b7e10673 (patch)
tree5a45f4238227dd090014e65d6707396aa3062a4a /toxcore/onion_announce.h
parent6cd1e7fb707e20681e066b0a7e452e15c227c280 (diff)
onion_announce seems to be working perfectly.
Stuff added and fixed.
Diffstat (limited to 'toxcore/onion_announce.h')
-rw-r--r--toxcore/onion_announce.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/toxcore/onion_announce.h b/toxcore/onion_announce.h
index 66a8702d..29cbaf58 100644
--- a/toxcore/onion_announce.h
+++ b/toxcore/onion_announce.h
@@ -45,8 +45,8 @@ typedef struct {
45 45
46/* Create and send an onion announce request packet. 46/* Create and send an onion announce request packet.
47 * 47 *
48 * nodes is a list of 4 nodes, the packet will route through nodes 0, 1, 2 and the data 48 * nodes is a list of 4 nodes, the packet will route through nodes 0, 1, 2 and the announe
49 * with length length will arrive at 3. 49 * request will be sent to 3.
50 * 50 *
51 * public_key and secret_key is the kepair which will be used to encrypt the request. 51 * public_key and secret_key is the kepair which will be used to encrypt the request.
52 * ping_id is the ping id that will be sent in the request. 52 * ping_id is the ping id that will be sent in the request.
@@ -58,6 +58,20 @@ typedef struct {
58int send_announce_request(DHT *dht, Node_format *nodes, uint8_t *public_key, uint8_t *secret_key, uint8_t *ping_id, 58int send_announce_request(DHT *dht, Node_format *nodes, uint8_t *public_key, uint8_t *secret_key, uint8_t *ping_id,
59 uint8_t *client_id); 59 uint8_t *client_id);
60 60
61/* Create and send an onion data request packet.
62 *
63 * nodes is a list of 4 nodes, the packet will route through nodes 0, 1, 2 and the data
64 * request packet will arrive at 3. (if 3 knows the person with the public_key they should
65 * send the packet to that person in the form of a response)
66 *
67 * public_key is the real public key of the node which we want to send the data of length length to.
68 *
69 * return -1 on failure.
70 * return 0 on success.
71 */
72int send_data_request(DHT *dht, Node_format *nodes, uint8_t *public_key, uint8_t *data, uint16_t length);
73
74
61Onion_Announce *new_onion_announce(DHT *dht); 75Onion_Announce *new_onion_announce(DHT *dht);
62 76
63void kill_onion_announce(Onion_Announce *onion_a); 77void kill_onion_announce(Onion_Announce *onion_a);