diff --git a/extras/mdnsresponder/mdnsresponder.c b/extras/mdnsresponder/mdnsresponder.c index 30ff75e..43fdadf 100644 --- a/extras/mdnsresponder/mdnsresponder.c +++ b/extras/mdnsresponder/mdnsresponder.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -39,6 +40,7 @@ #define DNS_MULTICAST_ADDRESS "224.0.0.251" // RFC 6762 #define DNS_MDNS_PORT 5353 // RFC 6762 +#define DNS_MSG_SIZE 512 //------------------------------------------------------------------- @@ -480,7 +482,7 @@ void mdns_add_TXT(const char* rKey, u32_t ttl, const char* txStr) } } -void mdns_add_A(const char* rKey, u32_t ttl, struct ip_addr addr) +void mdns_add_A(const char* rKey, u32_t ttl, ip_addr_t addr) { mdns_add_response(rKey, DNS_RRTYPE_A, ttl, &addr, sizeof(addr)); } @@ -666,7 +668,7 @@ static void mdns_reply(struct mdns_hdr* hdrP) free(mdns_response); } -static void mdns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr, u16_t port) +static void mdns_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) // Callback from udp_recv { UNUSED_ARG(pcb); diff --git a/extras/mdnsresponder/mdnsresponder.h b/extras/mdnsresponder/mdnsresponder.h index 2dd8c76..0c5895f 100644 --- a/extras/mdnsresponder/mdnsresponder.h +++ b/extras/mdnsresponder/mdnsresponder.h @@ -1,6 +1,8 @@ #ifndef __MDNSRESPONDER_H__ #define __MDNSRESPONDER_H__ +#include + /* * Basic multicast DNS responder * @@ -40,7 +42,7 @@ void mdns_add_facility( const char* instanceName, // Short user-friendly insta void mdns_add_PTR(const char* rKey, u32_t ttl, const char* nameStr); void mdns_add_SRV(const char* rKey, u32_t ttl, u16_t rPort, const char* targname); void mdns_add_TXT(const char* rKey, u32_t ttl, const char* txtStr); -void mdns_add_A (const char* rKey, u32_t ttl, struct ip_addr addr); +void mdns_add_A (const char* rKey, u32_t ttl, ip_addr_t addr); /* Sample usage, advertising a secure web service