diff options
author | slvr <slvr@unsafeio.com> | 2013-08-10 00:30:18 +0100 |
---|---|---|
committer | slvr <slvr@unsafeio.com> | 2013-08-10 00:43:50 +0100 |
commit | 6052b1f119d2b1494a7f2691f4dfed235b560636 (patch) | |
tree | b3f24c586180ba526baf33e3d3814d3c10b8821d /core/DHT.h | |
parent | 1ec95162a0b0c4f54bb97ca39684573e73beac87 (diff) |
network_registerhandler
Diffstat (limited to 'core/DHT.h')
-rw-r--r-- | core/DHT.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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) */ |
59 | void doDHT(void); | 59 | void 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. */ | ||
64 | int 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 */ |
68 | void DHT_bootstrap(IP_Port ip_port, uint8_t *public_key); | 63 | void 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() */ |
94 | void DHT_save(uint8_t *data); | 89 | void DHT_save(uint8_t *data); |
95 | 90 | ||
91 | /* init DHT */ | ||
92 | void 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 */ |