mDNS
This is a mDNS server.
Diff: mDNSResponder.h
- Revision:
- 2:2b00b659497a
- Parent:
- 0:0df3300689d2
- Child:
- 4:47d30d199ce0
--- a/mDNSResponder.h Tue Aug 11 17:11:58 2015 +0000 +++ b/mDNSResponder.h Fri Aug 14 12:26:23 2015 +0000 @@ -12,39 +12,16 @@ #include "EthernetInterface.h" #include "dns-sd.h" -#if LWIP_DNS /* don't build if not configured for use in lwipopts.h */ +#if LWIP_DNS #include "mbed.h" #include "mem.h" #include "memp.h" #include "dns.h" -// As defined by IANA. -// #define MDNS_PORT (5353) #define MCAST "224.0.0.251" -// How long we announce our IP and URLs to be valid. Should -// ideally be 1/3 or so of the DHCP lease time. But we do -// not know that. -// -#define MDNS_TTL ( 100 ) - -// Rebroadcast our details more regularly than the TTL as -// we otherwise get dropped. -// -#ifndef MDNS_INTERVAL -#define MDNS_INTERVAL ( MDNS_TTL * 2 / 3 ) -#endif - -#ifndef MDNS_QCACHE -#define MDNS_QCACHE 1 -#endif - -#ifndef MDNS_MAXCACHEDNSLABELS -#define MDNS_MAXCACHEDNSLABELS (10) -#endif - class mDNSResponder { public: @@ -62,14 +39,12 @@ char* decode_name(char* query, char* packet); void send_dns_ans(struct dns_hdr* hdr); - /*static objs from my uip-mdns */ + /*static objs */ static MY_SD_DOMAINS SD_domains; - static char PTR_query_name[PTR_QUERY_NAME_LEN]; static struct dns_hdr SD_res_hdr; static char query_buf[1500]; static QR_MAP g_queries; - /* end - from my dns */ char* IP_str; uint8_t IP_byte[4];