Minor tidy
This commit is contained in:
parent
4b1b2a5cc3
commit
6eb7ce9385
2 changed files with 627 additions and 633 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -5,12 +5,12 @@
|
||||||
* Basic multicast DNS responder
|
* Basic multicast DNS responder
|
||||||
*
|
*
|
||||||
* Advertises the IP address, port, and characteristics of a service to other devices using multicast DNS on the same LAN,
|
* 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
|
* so they can find devices with addresses dynamically allocated by DHCP. See avahi, Bonjour, etc
|
||||||
* See RFC6762, RFC6763
|
* See RFC6762, RFC6763
|
||||||
*
|
*
|
||||||
* This sample code is in the public domain.
|
* This sample code is in the public domain.
|
||||||
*
|
*
|
||||||
* M J A Hamel 2016
|
* by M J A Hamel 2016
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -22,18 +22,18 @@ void mdns_init();
|
||||||
// be advertised whenever the device is given an IP address by WiFi
|
// be advertised whenever the device is given an IP address by WiFi
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
mdns_TCP,
|
mdns_TCP,
|
||||||
mdns_UDP,
|
mdns_UDP,
|
||||||
mdns_Browsable // RFC6763:11 - adds a standard record that lets browsers find the service without needing to know its name
|
mdns_Browsable // see RFC6763:11 - adds a standard record that lets browsers find the service without needing to know its name
|
||||||
} mdns_flags;
|
} mdns_flags;
|
||||||
|
|
||||||
void mdns_add_facility( const char* instanceName, // Short user-friendly instance name, should NOT include serial number/MAC/etc
|
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* 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)
|
const char* addText, // Should be <key>=<value>, or "" if unused (see RFC6763 6.3)
|
||||||
mdns_flags flags, // TCP or UDP plus browsable
|
mdns_flags flags, // TCP or UDP plus browsable
|
||||||
u16_t onPort, // port number
|
u16_t onPort, // port number
|
||||||
u32_t ttl // time-to-live, seconds
|
u32_t ttl // time-to-live, seconds
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Low-level RR builders for rolling your own
|
// Low-level RR builders for rolling your own
|
||||||
|
|
@ -44,8 +44,8 @@ void mdns_add_A (const char* rKey, u32_t ttl, struct ip_addr addr);
|
||||||
|
|
||||||
/* Sample usage, advertising a secure web service
|
/* Sample usage, advertising a secure web service
|
||||||
|
|
||||||
mdns_init();
|
mdns_init();
|
||||||
mdns_add_facility("Fluffy", "_https", "Zoom=1", mdns_TCP+mdns_Browsable, 443, 600);
|
mdns_add_facility("Fluffy", "_https", "Zoom=1", mdns_TCP+mdns_Browsable, 443, 600);
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue