summaryrefslogtreecommitdiff
path: root/core/DHT.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/DHT.h')
-rw-r--r--core/DHT.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/DHT.h b/core/DHT.h
index 0e05f132..00a43d76 100644
--- a/core/DHT.h
+++ b/core/DHT.h
@@ -34,6 +34,19 @@ extern "C" {
34/* size of the client_id in bytes */ 34/* size of the client_id in bytes */
35#define CLIENT_ID_SIZE crypto_box_PUBLICKEYBYTES 35#define CLIENT_ID_SIZE crypto_box_PUBLICKEYBYTES
36 36
37typedef struct {
38 uint8_t client_id[CLIENT_ID_SIZE];
39 IP_Port ip_port;
40 uint64_t timestamp;
41 uint64_t last_pinged;
42
43 /* Returned by this node. Either our friend or us */
44 IP_Port ret_ip_port;
45 uint64_t ret_timestamp;
46} Client_data;
47
48Client_data * DHT_get_close_list(void);
49
37/* Add a new friend to the friends list 50/* Add a new friend to the friends list
38 client_id must be CLIENT_ID_SIZE bytes long. 51 client_id must be CLIENT_ID_SIZE bytes long.
39 returns 0 if success 52 returns 0 if success