summaryrefslogtreecommitdiff
path: root/core/DHT.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-08-10 14:21:06 -0700
committerirungentoo <irungentoo@gmail.com>2013-08-10 14:21:06 -0700
commit6c2b2806d10881a4c44a47e877898e9de1cc63c9 (patch)
tree2879741f06260a5390ae619954f53f141ba4ce54 /core/DHT.h
parent341de59bb627600c27ef29b113fa71bac120350f (diff)
parent5b6465528f88c4ed45fe57d5c2c21270f9109bb9 (diff)
Merge pull request #415 from slvr/pr
Beginning to centralise packet handling
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 */