From 3d1c77dc57687b7ae995dc1aeaf65bdee96341c6 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 26 Jul 2013 10:24:56 -0400 Subject: Added basic Local/LAN discovery. --- core/LAN_discovery.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 core/LAN_discovery.h (limited to 'core/LAN_discovery.h') diff --git a/core/LAN_discovery.h b/core/LAN_discovery.h new file mode 100644 index 00000000..7448abac --- /dev/null +++ b/core/LAN_discovery.h @@ -0,0 +1,28 @@ +/* LAN_discovery.h + * + * LAN discovery implementation. + * + */ + + +#ifndef LAN_DISCOVERY_H +#define LAN_DISCOVERY_H + + +#include "DHT.h" + + +/*Send a LAN discovery pcaket to the broadcast address with port port*/ +int send_LANdiscovery(uint16_t port); + + +/* if we receive a packet we call this function so it can be handled. + return 0 if packet is handled correctly. + return 1 if it didn't handle the packet or if the packet was shit. */ +int LANdiscovery_handlepacket(uint8_t * packet, uint32_t length, IP_Port source); + + + + + +#endif -- cgit v1.2.3