summaryrefslogtreecommitdiff
path: root/core/DHT.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-08-16 11:04:28 -0400
committerirungentoo <irungentoo@gmail.com>2013-08-16 11:04:28 -0400
commit095b3c49131abb84bc686636782901303f0489dd (patch)
tree016be5b55ed4eb257f2e425bea0bd5180b3c4154 /core/DHT.h
parentb15230583c31799d650584b05f4cfce8cd726aea (diff)
Some DHT hardening done.
See comments of added functions for details.
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