summaryrefslogtreecommitdiff
path: root/src/ipcpd/unicast/dht.h
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2021-12-04 18:26:58 +0100
committerSander Vrijders <[email protected]>2021-12-06 17:52:16 +0100
commit9422e6be94ac1007e8115a920379fd545055e531 (patch)
tree31075ad5ee851ef4625e3cafbd821e591e817997 /src/ipcpd/unicast/dht.h
parent11d2ecc140486949c8d81e984137263ca48d5799 (diff)
downloadouroboros-9422e6be94ac1007e8115a920379fd545055e531.tar.gz
ouroboros-9422e6be94ac1007e8115a920379fd545055e531.zip
ipcpd: Move DHT to stack
This makes the DHT a single directory implementation and moves it to the stack (init/fini instead of create/destroy). This is a step towards making it a directory policy, in line with our other policy implementations. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/ipcpd/unicast/dht.h')
-rw-r--r--src/ipcpd/unicast/dht.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/ipcpd/unicast/dht.h b/src/ipcpd/unicast/dht.h
index df394714..29ab7ee5 100644
--- a/src/ipcpd/unicast/dht.h
+++ b/src/ipcpd/unicast/dht.h
@@ -28,25 +28,18 @@
#include <stdint.h>
#include <sys/types.h>
-struct dht;
+int dht_init(void);
-struct dht * dht_create(uint64_t addr);
+int dht_bootstrap(void);
-int dht_bootstrap(struct dht * dht,
- size_t b,
- time_t t_expire);
+void dht_fini(void);
-void dht_destroy(struct dht * dht);
+int dht_reg(const uint8_t * key);
-int dht_reg(struct dht * dht,
- const uint8_t * key);
+int dht_unreg(const uint8_t * key);
-int dht_unreg(struct dht * dht,
- const uint8_t * key);
+uint64_t dht_query(const uint8_t * key);
-uint64_t dht_query(struct dht * dht,
- const uint8_t * key);
-
-int dht_wait_running(struct dht * dht);
+int dht_wait_running(void);
#endif /* OUROBOROS_IPCPD_UNICAST_DHT_H */