diff options
-rw-r--r-- | core/DHT.c | 11 | ||||
-rw-r--r-- | core/DHT.h | 11 |
2 files changed, 11 insertions, 11 deletions
@@ -65,17 +65,6 @@ | |||
65 | 65 | ||
66 | typedef struct { | 66 | typedef struct { |
67 | uint8_t client_id[CLIENT_ID_SIZE]; | 67 | uint8_t client_id[CLIENT_ID_SIZE]; |
68 | IP_Port ip_port; | ||
69 | uint64_t timestamp; | ||
70 | uint64_t last_pinged; | ||
71 | |||
72 | /* Returned by this node. Either our friend or us */ | ||
73 | IP_Port ret_ip_port; | ||
74 | uint64_t ret_timestamp; | ||
75 | } Client_data; | ||
76 | |||
77 | typedef struct { | ||
78 | uint8_t client_id[CLIENT_ID_SIZE]; | ||
79 | Client_data client_list[MAX_FRIEND_CLIENTS]; | 68 | Client_data client_list[MAX_FRIEND_CLIENTS]; |
80 | 69 | ||
81 | /* time at which the last get_nodes request was sent. */ | 70 | /* time at which the last get_nodes request was sent. */ |
@@ -34,6 +34,17 @@ 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 | ||
37 | typedef 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 | |||
37 | /* Add a new friend to the friends list | 48 | /* Add a new friend to the friends list |
38 | client_id must be CLIENT_ID_SIZE bytes long. | 49 | client_id must be CLIENT_ID_SIZE bytes long. |
39 | returns 0 if success | 50 | returns 0 if success |