summaryrefslogtreecommitdiff
path: root/core/DHT.h
diff options
context:
space:
mode:
authorslvr <slvr@unsafeio.com>2013-08-10 00:30:18 +0100
committerslvr <slvr@unsafeio.com>2013-08-10 00:43:50 +0100
commit6052b1f119d2b1494a7f2691f4dfed235b560636 (patch)
treeb3f24c586180ba526baf33e3d3814d3c10b8821d /core/DHT.h
parent1ec95162a0b0c4f54bb97ca39684573e73beac87 (diff)
network_registerhandler
Diffstat (limited to 'core/DHT.h')
-rw-r--r--core/DHT.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/DHT.h b/core/DHT.h
index cb5697ea..0e05f132 100644
--- a/core/DHT.h
+++ b/core/DHT.h
@@ -58,11 +58,6 @@ IP_Port DHT_getfriendip(uint8_t *client_id);
58/* Run this function at least a couple times per second (It's the main loop) */ 58/* Run this function at least a couple times per second (It's the main loop) */
59void doDHT(void); 59void doDHT(void);
60 60
61/* if we receive a DHT packet we call this function so it can be handled.
62 return 0 if packet is handled correctly.
63 return 1 if it didn't handle the packet or if the packet was shit. */
64int DHT_handlepacket(uint8_t *packet, uint32_t length, IP_Port source);
65
66/* Use this function to bootstrap the client 61/* Use this function to bootstrap the client
67 Sends a get nodes request to the given node with ip port and public_key */ 62 Sends a get nodes request to the given node with ip port and public_key */
68void DHT_bootstrap(IP_Port ip_port, uint8_t *public_key); 63void DHT_bootstrap(IP_Port ip_port, uint8_t *public_key);
@@ -93,6 +88,9 @@ uint32_t DHT_size(void);
93/* save the DHT in data where data is an array of size DHT_size() */ 88/* save the DHT in data where data is an array of size DHT_size() */
94void DHT_save(uint8_t *data); 89void DHT_save(uint8_t *data);
95 90
91/* init DHT */
92void DHT_init(void);
93
96/* load the DHT from data of size size; 94/* load the DHT from data of size size;
97 return -1 if failure 95 return -1 if failure
98 return 0 if success */ 96 return 0 if success */