summaryrefslogtreecommitdiff
path: root/toxcore/DHT.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/DHT.h')
-rw-r--r--toxcore/DHT.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/toxcore/DHT.h b/toxcore/DHT.h
index 35000c87..547f3887 100644
--- a/toxcore/DHT.h
+++ b/toxcore/DHT.h
@@ -65,7 +65,9 @@
65 65
66/* Functions to transfer ips safely across wire. */ 66/* Functions to transfer ips safely across wire. */
67void to_net_family(IP *ip); 67void to_net_family(IP *ip);
68void to_host_family(IP *ip); 68
69/* return 0 on success, -1 on failure. */
70int to_host_family(IP *ip);
69 71
70typedef struct { 72typedef struct {
71 IP_Port ip_port; 73 IP_Port ip_port;
@@ -324,14 +326,6 @@ int get_close_nodes(const DHT *dht, const uint8_t *client_id, Node_format *nodes
324 */ 326 */
325uint16_t closelist_nodes(DHT *dht, Node_format *nodes, uint16_t max_num); 327uint16_t closelist_nodes(DHT *dht, Node_format *nodes, uint16_t max_num);
326 328
327/* Put up to max_num random nodes in nodes.
328 *
329 * return the number of nodes.
330 *
331 * NOTE:this is used to pick nodes for paths.
332 */
333uint16_t random_nodes_path(const DHT *dht, Node_format *nodes, uint16_t max_num);
334
335/* Run this function at least a couple times per second (It's the main loop). */ 329/* Run this function at least a couple times per second (It's the main loop). */
336void do_DHT(DHT *dht); 330void do_DHT(DHT *dht);
337 331