diff options
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/forwarding.h')
-rw-r--r-- | protocols/Tox/libtox/src/toxcore/forwarding.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/protocols/Tox/libtox/src/toxcore/forwarding.h b/protocols/Tox/libtox/src/toxcore/forwarding.h index 36ce8ad894..bd0ef09e1c 100644 --- a/protocols/Tox/libtox/src/toxcore/forwarding.h +++ b/protocols/Tox/libtox/src/toxcore/forwarding.h @@ -6,6 +6,10 @@ #define C_TOXCORE_TOXCORE_FORWARDING_H #include "DHT.h" +#include "attributes.h" +#include "crypto_core.h" +#include "logger.h" +#include "mono_time.h" #include "network.h" #ifdef __cplusplus @@ -26,7 +30,7 @@ extern "C" { typedef struct Forwarding Forwarding; non_null() -DHT *forwarding_get_dht(Forwarding *forwarding); +DHT *forwarding_get_dht(const Forwarding *forwarding); /** * @brief Send data to forwarder for forwarding via chain of dht nodes. @@ -41,7 +45,7 @@ DHT *forwarding_get_dht(Forwarding *forwarding); * @return true on success, false otherwise. */ non_null() -bool send_forward_request(Networking_Core *net, const IP_Port *forwarder, +bool send_forward_request(const Networking_Core *net, const IP_Port *forwarder, const uint8_t *chain_keys, uint16_t chain_length, const uint8_t *data, uint16_t data_length); @@ -75,11 +79,10 @@ bool create_forward_chain_packet(const uint8_t *chain_keys, uint16_t chain_lengt * @return true on success, false otherwise. */ non_null() -bool forward_reply(Networking_Core *net, const IP_Port *forwarder, +bool forward_reply(const Networking_Core *net, const IP_Port *forwarder, const uint8_t *sendback, uint16_t sendback_length, const uint8_t *data, uint16_t length); - /** * @brief Set callback to handle a forwarded request. * To reply to the packet, callback should use `forward_reply()` to send a reply @@ -119,7 +122,7 @@ nullable(1) void kill_forwarding(Forwarding *forwarding); #ifdef __cplusplus -} // extern "C" +} /* extern "C" */ #endif -#endif +#endif /* C_TOXCORE_TOXCORE_FORWARDING_H */ |