summaryrefslogtreecommitdiff
path: root/core/DHT.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/DHT.h')
-rw-r--r--core/DHT.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/DHT.h b/core/DHT.h
index 00a43d76..c6ca4ce1 100644
--- a/core/DHT.h
+++ b/core/DHT.h
@@ -75,6 +75,16 @@ void doDHT(void);
75 Sends a get nodes request to the given node with ip port and public_key */ 75 Sends a get nodes request to the given node with ip port and public_key */
76void DHT_bootstrap(IP_Port ip_port, uint8_t *public_key); 76void DHT_bootstrap(IP_Port ip_port, uint8_t *public_key);
77 77
78/* Add nodes to the toping list
79 all nodes in this list are pinged every TIME_TOPING seconds
80 and are then removed from the list.
81 if the list is full the nodes farthest from our client_id are replaced
82 the purpose of this list is to enable quick integration of new nodes into the
83 network while preventing amplification attacks.
84 return 0 if node was added
85 return -1 if node was not added */
86int add_toping(uint8_t *client_id, IP_Port ip_port);
87
78/* ROUTING FUNCTIONS */ 88/* ROUTING FUNCTIONS */
79 89
80/* send the given packet to node with client_id 90/* send the given packet to node with client_id