diff options
author | Aaron Lipinski <kris.lipinski@gmail.com> | 2013-08-11 14:55:57 +1200 |
---|---|---|
committer | Aaron Lipinski <kris.lipinski@gmail.com> | 2013-08-15 12:02:56 +1200 |
commit | 93b34ef9e3b4ad44b9f387b112d168b2db55b8a3 (patch) | |
tree | 1998075fe41eb6ac56697a3d092e56927d66e892 /core/DHT.h | |
parent | e9f15d3879724da62fb2cfb8d8dceb01f1286ff9 (diff) |
move client data struct to header file
Diffstat (limited to 'core/DHT.h')
-rw-r--r-- | core/DHT.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |