move client data struct to header file

This commit is contained in:
Aaron Lipinski 2013-08-11 14:55:57 +12:00
parent e9f15d3879
commit 93b34ef9e3
2 changed files with 11 additions and 11 deletions

View File

@ -63,17 +63,6 @@
/*----------------------------------------------------------------------------------*/
typedef struct {
uint8_t client_id[CLIENT_ID_SIZE];
IP_Port ip_port;
uint64_t timestamp;
uint64_t last_pinged;
/* Returned by this node. Either our friend or us */
IP_Port ret_ip_port;
uint64_t ret_timestamp;
} Client_data;
typedef struct {
uint8_t client_id[CLIENT_ID_SIZE];
Client_data client_list[MAX_FRIEND_CLIENTS];

View File

@ -34,6 +34,17 @@ extern "C" {
/* size of the client_id in bytes */
#define CLIENT_ID_SIZE crypto_box_PUBLICKEYBYTES
typedef struct {
uint8_t client_id[CLIENT_ID_SIZE];
IP_Port ip_port;
uint64_t timestamp;
uint64_t last_pinged;
/* Returned by this node. Either our friend or us */
IP_Port ret_ip_port;
uint64_t ret_timestamp;
} Client_data;
/* Add a new friend to the friends list
client_id must be CLIENT_ID_SIZE bytes long.
returns 0 if success