diff options
Diffstat (limited to 'toxcore/onion_client.h')
-rw-r--r-- | toxcore/onion_client.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/onion_client.h b/toxcore/onion_client.h index a74783f6..bf891e7a 100644 --- a/toxcore/onion_client.h +++ b/toxcore/onion_client.h | |||
@@ -97,7 +97,7 @@ typedef struct { | |||
97 | Last_Pinged last_pinged[MAX_STORED_PINGED_NODES]; | 97 | Last_Pinged last_pinged[MAX_STORED_PINGED_NODES]; |
98 | uint8_t last_pinged_index; | 98 | uint8_t last_pinged_index; |
99 | 99 | ||
100 | int (*tcp_relay_node_callback)(void *object, uint32_t number, IP_Port ip_port, uint8_t *public_key); | 100 | int (*tcp_relay_node_callback)(void *object, uint32_t number, IP_Port ip_port, const uint8_t *public_key); |
101 | void *tcp_relay_node_callback_object; | 101 | void *tcp_relay_node_callback_object; |
102 | uint32_t tcp_relay_node_callback_number; | 102 | uint32_t tcp_relay_node_callback_number; |
103 | } Onion_Friend; | 103 | } Onion_Friend; |
@@ -171,7 +171,7 @@ int onion_set_friend_online(Onion_Client *onion_c, int friend_num, uint8_t is_on | |||
171 | * return 1, ip if client_id refers to a friend and we found him | 171 | * return 1, ip if client_id refers to a friend and we found him |
172 | * | 172 | * |
173 | */ | 173 | */ |
174 | int onion_getfriendip(Onion_Client *onion_c, int friend_num, IP_Port *ip_port); | 174 | int onion_getfriendip(const Onion_Client *onion_c, int friend_num, IP_Port *ip_port); |
175 | 175 | ||
176 | /* Set the function for this friend that will be callbacked with object and number | 176 | /* Set the function for this friend that will be callbacked with object and number |
177 | * when that friends gives us one of the TCP relays he is connected to. | 177 | * when that friends gives us one of the TCP relays he is connected to. |
@@ -182,7 +182,7 @@ int onion_getfriendip(Onion_Client *onion_c, int friend_num, IP_Port *ip_port); | |||
182 | * return 0 on success. | 182 | * return 0 on success. |
183 | */ | 183 | */ |
184 | int recv_tcp_relay_handler(Onion_Client *onion_c, int friend_num, int (*tcp_relay_node_callback)(void *object, | 184 | int recv_tcp_relay_handler(Onion_Client *onion_c, int friend_num, int (*tcp_relay_node_callback)(void *object, |
185 | uint32_t number, IP_Port ip_port, uint8_t *public_key), void *object, uint32_t number); | 185 | uint32_t number, IP_Port ip_port, const uint8_t *public_key), void *object, uint32_t number); |
186 | 186 | ||
187 | /* Set a friends DHT public key. | 187 | /* Set a friends DHT public key. |
188 | * timestamp is the time (current_time_monotonic()) at which the key was last confirmed belonging to | 188 | * timestamp is the time (current_time_monotonic()) at which the key was last confirmed belonging to |
@@ -198,7 +198,7 @@ int onion_set_friend_DHT_pubkey(Onion_Client *onion_c, int friend_num, const uin | |||
198 | * return 0 on failure (no key copied). | 198 | * return 0 on failure (no key copied). |
199 | * return timestamp on success (key copied). | 199 | * return timestamp on success (key copied). |
200 | */ | 200 | */ |
201 | uint64_t onion_getfriend_DHT_pubkey(Onion_Client *onion_c, int friend_num, uint8_t *dht_key); | 201 | uint64_t onion_getfriend_DHT_pubkey(const Onion_Client *onion_c, int friend_num, uint8_t *dht_key); |
202 | 202 | ||
203 | #define ONION_DATA_IN_RESPONSE_MIN_SIZE (crypto_box_PUBLICKEYBYTES + crypto_box_MACBYTES) | 203 | #define ONION_DATA_IN_RESPONSE_MIN_SIZE (crypto_box_PUBLICKEYBYTES + crypto_box_MACBYTES) |
204 | #define ONION_CLIENT_MAX_DATA_SIZE (MAX_DATA_REQUEST_SIZE - ONION_DATA_IN_RESPONSE_MIN_SIZE) | 204 | #define ONION_CLIENT_MAX_DATA_SIZE (MAX_DATA_REQUEST_SIZE - ONION_DATA_IN_RESPONSE_MIN_SIZE) |