Fix mdnsresponder compilation issues (#481)

This commit is contained in:
Maxim Kulkin 2017-12-04 23:15:18 -08:00 committed by Ruslan V. Uss
parent f67495f4f0
commit 6faf7c569d
2 changed files with 72 additions and 69 deletions

View file

@ -1,9 +1,11 @@
#ifndef __MDNSRESPONDER_H__
#define __MDNSRESPONDER_H__
#include <lwip/ip_addr.h>
/*
* Basic multicast DNS responder
*
*
* Advertises the IP address, port, and characteristics of a service to other devices using multicast DNS on the same LAN,
* so they can find devices with addresses dynamically allocated by DHCP. See avahi, Bonjour, etc
* See RFC6762, RFC6763
@ -26,7 +28,7 @@ typedef enum {
mdns_UDP,
mdns_Browsable // see RFC6763:11 - adds a standard record that lets browsers find the service without needing to know its name
} mdns_flags;
void mdns_add_facility( const char* instanceName, // Short user-friendly instance name, should NOT include serial number/MAC/etc
const char* serviceName, // Must be registered, _name, (see RFC6335 5.1 & 5.2)
const char* addText, // Should be <key>=<value>, or "" if unused (see RFC6763 6.3)
@ -40,13 +42,13 @@ 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
mdns_init();
mdns_add_facility("Fluffy", "_https", "Zoom=1", mdns_TCP+mdns_Browsable, 443, 600);
*/
#endif