summaryrefslogtreecommitdiff
path: root/toxcore/onion_client.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-01-09 20:55:45 -0500
committerirungentoo <irungentoo@gmail.com>2014-01-09 20:55:45 -0500
commit83e9890d6bfc08793a385904b6ddd66fc0037743 (patch)
tree32584f2313945d0ef07bb91fbeb8c08ecdffd3fb /toxcore/onion_client.h
parentea7d1a726d2145d11c210c217370c766cc6179e9 (diff)
Some work done on the client part.
Diffstat (limited to 'toxcore/onion_client.h')
-rw-r--r--toxcore/onion_client.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/toxcore/onion_client.h b/toxcore/onion_client.h
index 92fc21ac..a5f72e82 100644
--- a/toxcore/onion_client.h
+++ b/toxcore/onion_client.h
@@ -29,9 +29,14 @@
29#define MAX_ONION_CLIENTS 8 29#define MAX_ONION_CLIENTS 8
30 30
31typedef struct { 31typedef struct {
32 Node_format clients_list[MAX_ONION_CLIENTS]; 32 uint8_t client_id[CLIENT_ID_SIZE];
33 33 IP_Port ip_port;
34 uint8_t ping_id[ONION_PING_ID_SIZE];
35 uint64_t timestamp;
36} Onion_Node;
34 37
38typedef struct {
39 Onion_Node clients_list[MAX_ONION_CLIENTS];
35} Onion_Friend; 40} Onion_Friend;
36 41
37typedef struct { 42typedef struct {
@@ -40,7 +45,9 @@ typedef struct {
40 Onion_Friend *friends_list; 45 Onion_Friend *friends_list;
41 uint16_t num_friends; 46 uint16_t num_friends;
42 47
43 Node_format clients_annouce_list[MAX_ONION_CLIENTS]; 48 Onion_Node clients_announce_list[MAX_ONION_CLIENTS];
49
50 uint8_t secret_symmetric_key[crypto_secretbox_KEYBYTES];
44} Onion_Client; 51} Onion_Client;
45 52
46int onion_addfriend(Onion_Client *onion_c, uint8_t *client_id); 53int onion_addfriend(Onion_Client *onion_c, uint8_t *client_id);