diff options
Diffstat (limited to 'core/DHT.h')
-rw-r--r-- | core/DHT.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -72,11 +72,19 @@ int DHT_handlepacket(uint8_t * packet, uint32_t length, IP_Port source); | |||
72 | void DHT_bootstrap(IP_Port ip_port, uint8_t * public_key); | 72 | void DHT_bootstrap(IP_Port ip_port, uint8_t * public_key); |
73 | 73 | ||
74 | 74 | ||
75 | //TODO: | 75 | //SAVE/LOAD functions |
76 | //Add functions to save and load the state(client list, friends list) | ||
77 | 76 | ||
77 | //get the size of the DHT (for saving) | ||
78 | uint32_t DHT_size(); | ||
78 | 79 | ||
79 | 80 | ||
81 | //save the DHT in data where data is an array of size DHT_size() | ||
82 | void DHT_save(uint8_t * data); | ||
83 | |||
84 | //load the DHT from data of size size; | ||
85 | //return -1 if failure | ||
86 | //return 0 if success | ||
87 | int DHT_load(uint8_t * data, uint32_t size); | ||
80 | 88 | ||
81 | 89 | ||
82 | #endif | 90 | #endif |