diff options
author | Coren[m] <Break@Ocean> | 2013-09-12 19:09:25 +0200 |
---|---|---|
committer | Coren[m] <Break@Ocean> | 2013-09-12 19:09:25 +0200 |
commit | b5db32585a89749ce8e91348d176292cdc20abfd (patch) | |
tree | dbbfda7d45545eeff19293df16587145bdafe7ee /toxcore/LAN_discovery.h | |
parent | 55499933be7857642d970d32f359e765ff4a2cab (diff) |
Patch to allow DHT_bootstrap to also do LAN discovery.
This patch inserts LAN discovery in DHT_bootstrap, allowing it to find clients even if it's run parameterless (and clients don't connect to it directly, e.g. because the port is already bound to a different client).
- moves the #define of LAN_DISCOVERY_INTERVAL from Messenger.c to LAN_discovery.h
- includes LAN_discovery.h into DHT_bootstrap.c
- DHT_bootstrap.c sends and accepts LAN_discovery packets
Diffstat (limited to 'toxcore/LAN_discovery.h')
-rw-r--r-- | toxcore/LAN_discovery.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/toxcore/LAN_discovery.h b/toxcore/LAN_discovery.h index 78990936..3e9d9de5 100644 --- a/toxcore/LAN_discovery.h +++ b/toxcore/LAN_discovery.h | |||
@@ -35,6 +35,8 @@ | |||
35 | #include <linux/netdevice.h> | 35 | #include <linux/netdevice.h> |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | /* Interval in seconds between LAN discovery packet sending. */ | ||
39 | #define LAN_DISCOVERY_INTERVAL 60 | ||
38 | 40 | ||
39 | /* Send a LAN discovery pcaket to the broadcast address with port port. */ | 41 | /* Send a LAN discovery pcaket to the broadcast address with port port. */ |
40 | int send_LANdiscovery(uint16_t port, Net_Crypto *c); | 42 | int send_LANdiscovery(uint16_t port, Net_Crypto *c); |