diff options
Diffstat (limited to 'core/LAN_discovery.h')
-rw-r--r-- | core/LAN_discovery.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/core/LAN_discovery.h b/core/LAN_discovery.h new file mode 100644 index 00000000..655830f9 --- /dev/null +++ b/core/LAN_discovery.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* LAN_discovery.h | ||
2 | * | ||
3 | * LAN discovery implementation. | ||
4 | * | ||
5 | * Copyright (C) 2013 Tox project All Rights Reserved. | ||
6 | * | ||
7 | * This file is part of Tox. | ||
8 | * | ||
9 | * Tox is free software: you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation, either version 3 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * Tox is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with Tox. If not, see <http://www.gnu.org/licenses/>. | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | |||
25 | #ifndef LAN_DISCOVERY_H | ||
26 | #define LAN_DISCOVERY_H | ||
27 | |||
28 | |||
29 | #include "DHT.h" | ||
30 | |||
31 | #ifdef __cplusplus | ||
32 | extern "C" { | ||
33 | #endif | ||
34 | |||
35 | /*Send a LAN discovery pcaket to the broadcast address with port port*/ | ||
36 | int send_LANdiscovery(uint16_t port); | ||
37 | |||
38 | |||
39 | /* if we receive a packet we call this function so it can be handled. | ||
40 | return 0 if packet is handled correctly. | ||
41 | return 1 if it didn't handle the packet or if the packet was shit. */ | ||
42 | int LANdiscovery_handlepacket(uint8_t * packet, uint32_t length, IP_Port source); | ||
43 | |||
44 | |||
45 | |||
46 | #ifdef __cplusplus | ||
47 | } | ||
48 | #endif | ||
49 | |||
50 | #endif | ||