summaryrefslogtreecommitdiff
path: root/protocols/Tox/libtox/src/toxcore/forwarding.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-02-15 12:18:35 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-02-15 12:18:35 +0300
commit31e72718ee54867accf0b739a24adc86f8b7ab54 (patch)
treef964c10c5d97d9fe4fd2bd8187c250faedcb0fd7 /protocols/Tox/libtox/src/toxcore/forwarding.h
parent282e9c18d9d3b726cce3d2ef0babc88029661cb8 (diff)
libtox update
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/forwarding.h')
-rw-r--r--protocols/Tox/libtox/src/toxcore/forwarding.h15
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 */