From 0c7a59b5dba98e4b48489a86cdcb3b43b71c409b Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 18 Aug 2016 11:06:50 +0200 Subject: [PATCH] Minor: Documentation fixes --- doc/doxygen/lwip.Doxyfile | 6 ++--- doc/mdns.txt | 8 ++++-- src/core/dns.c | 54 +++++++++++++++++++-------------------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index c3f17d23..8a638ba8 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -2113,10 +2113,8 @@ PREDEFINED = __DOXYGEN__=1 \ SO_REUSE=1 \ SO_REUSE_RXTOALL=1 \ LWIP_HAVE_SLIPIF=1 \ - LWIP_6LOWPAN=1 \ - "LWIP_DNS && LWIP_SOCKET " \ - "(LWIP_DNS && LWIP_SOCKET)=1 " - + LWIP_6LOWPAN=1 + # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The # macro definition that is found in the sources will be used. Use the PREDEFINED diff --git a/doc/mdns.txt b/doc/mdns.txt index 699ccbfc..c3228432 100644 --- a/doc/mdns.txt +++ b/doc/mdns.txt @@ -16,13 +16,14 @@ MDNS support does not depend on DNS. MDNS supports using IPv4 only, v6 only, or v4+v6. To enable MDNS responder, set - LWIP_MDNS = 1 + LWIP_MDNS_RESPONDER = 1 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. -Increase MEMP_NUM_UDP_PCB. MDNS needs one PCB. +Increase MEMP_NUM_UDP_PCB by 1. MDNS needs one PCB. +Increase LWIP_NUM_NETIF_CLIENT_DATA by 1 (MDNS needs one entry on netif). MDNS with IPv4 requires LWIP_IGMP = 1, and preferably LWIP_AUTOIP = 1. MDNS with IPv6 requires LWIP_IPV6_MLD = 1, and that a link-local address is @@ -59,6 +60,9 @@ since the default case-insensitive comparison assumes this. It is recommended to call this function after an IPv4 address has been set, since there is currently no check if the v4 address is valid. +Call mdns_resp_netif_settings_changed() every time the IP address +on the netif has changed. + To stop responding on a netif, run mdns_resp_remove_netif(struct netif *netif) diff --git a/src/core/dns.c b/src/core/dns.c index d9d7add7..6ad0b4b7 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -1,6 +1,32 @@ /** * @file * DNS - host name to IP address resolver. + * + * @defgroup dns DNS + * @ingroup callbackstyle_api + * + * Implements a DNS host name to IP address resolver. + * + * The lwIP DNS resolver functions are used to lookup a host name and + * map it to a numerical IP address. It maintains a list of resolved + * hostnames that can be queried with the dns_lookup() function. + * New hostnames can be resolved using the dns_query() function. + * + * The lwIP version of the resolver also adds a non-blocking version of + * gethostbyname() that will work with a raw API application. This function + * checks for an IP address string first and converts it if it is valid. + * gethostbyname() then does a dns_lookup() to see if the name is + * already in the table. If so, the IP is returned. If not, a query is + * issued and the function returns with a ERR_INPROGRESS status. The app + * using the dns client must then go into a waiting state. + * + * Once a hostname has been resolved (or found to be non-existent), + * the resolver code calls a specified callback function (which + * must be implemented by the module that uses the resolver). + * + * All functions must be called from TCPIP thread. + * + * @see @ref netconn_common for thread-safe access. */ /* @@ -37,34 +63,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** - * @defgroup dns DNS - * @ingroup callbackstyle_api - * - * Implements a DNS host name to IP address resolver. - * - * The lwIP DNS resolver functions are used to lookup a host name and - * map it to a numerical IP address. It maintains a list of resolved - * hostnames that can be queried with the dns_lookup() function. - * New hostnames can be resolved using the dns_query() function. - * - * The lwIP version of the resolver also adds a non-blocking version of - * gethostbyname() that will work with a raw API application. This function - * checks for an IP address string first and converts it if it is valid. - * gethostbyname() then does a dns_lookup() to see if the name is - * already in the table. If so, the IP is returned. If not, a query is - * issued and the function returns with a ERR_INPROGRESS status. The app - * using the dns client must then go into a waiting state. - * - * Once a hostname has been resolved (or found to be non-existent), - * the resolver code calls a specified callback function (which - * must be implemented by the module that uses the resolver). - * - * All functions must be called from TCPIP thread. - * - * @see @ref netconn_common for thread-safe access. - */ - /*----------------------------------------------------------------------------- * RFC 1035 - Domain names - implementation and specification * RFC 2181 - Clarifications to the DNS Specification