summaryrefslogtreecommitdiff
path: root/protocols/Tox/libtox/src/toxcore/LAN_discovery.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/LAN_discovery.h')
-rw-r--r--protocols/Tox/libtox/src/toxcore/LAN_discovery.h48
1 files changed, 35 insertions, 13 deletions
diff --git a/protocols/Tox/libtox/src/toxcore/LAN_discovery.h b/protocols/Tox/libtox/src/toxcore/LAN_discovery.h
index 753de5249f..6d9d17b664 100644
--- a/protocols/Tox/libtox/src/toxcore/LAN_discovery.h
+++ b/protocols/Tox/libtox/src/toxcore/LAN_discovery.h
@@ -26,27 +26,49 @@
#include "DHT.h"
-/* Interval in seconds between LAN discovery packet sending. */
-#define LAN_DISCOVERY_INTERVAL 10
+#ifndef DHT_DEFINED
+#define DHT_DEFINED
+typedef struct DHT DHT;
+#endif /* DHT_DEFINED */
-/* Send a LAN discovery pcaket to the broadcast address with port port. */
-int send_LANdiscovery(uint16_t port, DHT *dht);
+#ifndef IP_DEFINED
+#define IP_DEFINED
+typedef struct IP IP;
+#endif /* IP_DEFINED */
-/* Sets up packet handlers. */
-void LANdiscovery_init(DHT *dht);
+/**
+ * Interval in seconds between LAN discovery packet sending.
+ */
+#define LAN_DISCOVERY_INTERVAL 10
-/* Clear packet handlers. */
-void LANdiscovery_kill(DHT *dht);
+uint32_t lan_discovery_interval(void);
-/* Is IP a local ip or not. */
-bool Local_ip(IP ip);
+/**
+ * Send a LAN discovery pcaket to the broadcast address with port port.
+ */
+int32_t lan_discovery_send(uint16_t port, DHT *dht);
-/* checks if a given IP isn't routable
+/**
+ * Sets up packet handlers.
+ */
+void lan_discovery_init(DHT *dht);
+
+/**
+ * Clear packet handlers.
+ */
+void lan_discovery_kill(DHT *dht);
+
+/**
+ * Is IP a local ip or not.
+ */
+bool ip_is_local(IP ip);
+
+/**
+ * checks if a given IP isn't routable
*
* return 0 if ip is a LAN ip.
* return -1 if it is not.
*/
-int LAN_ip(IP ip);
-
+int32_t ip_is_lan(IP ip);
#endif