diff --git a/doc/mdns.txt b/doc/mdns.txt index 3cbb1ba4..e3921359 100644 --- a/doc/mdns.txt +++ b/doc/mdns.txt @@ -4,7 +4,7 @@ Author: Erik Ekman Note! The MDNS responder does not have all features required by the standards. -See notes in src/core/mdns.c for what is left. It is however usable in normal +See notes in src/apps/mdns/mdns.c for what is left. It is however usable in normal cases - but watch out if many devices on the same network try to use the same host/service instance names. @@ -17,7 +17,7 @@ MDNS supports using IPv4 only, v6 only, or v4+v6. To enable MDNS responder, set LWIP_MDNS = 1 -in lwipopts.h and add src/core/mdns.c to your list of files to build. +in lwipopts.h and add src/apps/mdns/mdns.c to your list of files to build. The max number of services supported per netif is defined by MDNS_MAX_SERVICES, default is 1. diff --git a/src/apps/mdns/mdns.c b/src/apps/mdns/mdns.c index 8e1c5f99..c51f5571 100644 --- a/src/apps/mdns/mdns.c +++ b/src/apps/mdns/mdns.c @@ -1890,7 +1890,7 @@ mdns_resp_init(void) * @return ERR_OK if netif was added, an err_t otherwise */ err_t -mdns_resp_add_netif(struct netif *netif, char *hostname, u32_t dns_ttl) +mdns_resp_add_netif(struct netif *netif, const char *hostname, u32_t dns_ttl) { err_t res; @@ -1985,7 +1985,7 @@ mdns_resp_remove_netif(struct netif *netif) * @return ERR_OK if the service was added to the netif, an err_t otherwise */ err_t -mdns_resp_add_service(struct netif *netif, char *name, char *service, u16_t proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_data) +mdns_resp_add_service(struct netif *netif, const char *name, const char *service, u16_t proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_data) { int i; int slot = -1; @@ -2042,7 +2042,7 @@ mdns_resp_add_service(struct netif *netif, char *name, char *service, u16_t prot * @return ERR_OK if the string was added to the reply, an err_t otherwise */ err_t -mdns_resp_add_service_txtitem(struct mdns_service *service, char *txt, int txt_len) +mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, int txt_len) { LWIP_ASSERT("mdns_resp_add_service: service != NULL", service); diff --git a/src/include/lwip/apps/mdns.h b/src/include/lwip/apps/mdns.h index 36892192..08fa5df7 100644 --- a/src/include/lwip/apps/mdns.h +++ b/src/include/lwip/apps/mdns.h @@ -47,12 +47,12 @@ struct mdns_service; void mdns_resp_init(void); -err_t mdns_resp_add_netif(struct netif *netif, char *hostname, u32_t dns_ttl); +err_t mdns_resp_add_netif(struct netif *netif, const char *hostname, u32_t dns_ttl); err_t mdns_resp_remove_netif(struct netif *netif); typedef void (*service_get_txt_fn_t)(struct mdns_service *service, void *txt_userdata); -err_t mdns_resp_add_service(struct netif *netif, char *name, char *service, u16_t proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_userdata); -err_t mdns_resp_add_service_txtitem(struct mdns_service *service, char *txt, int txt_len); +err_t mdns_resp_add_service(struct netif *netif, const char *name, const char *service, u16_t proto, u16_t port, u32_t dns_ttl, service_get_txt_fn_t txt_fn, void *txt_userdata); +err_t mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, int txt_len); /* Domain struct and methods - visible for unit tests */