From fbb4dcc0af4b5b1e61243cbc0999f5e80e5ab6fa Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 9 Jan 2016 15:57:44 -0600 Subject: [PATCH] Some networking logic was used helpers from apps/netutils. Not good. Quick fix is to duplicate logic --- include/nuttx/net/dns.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/nuttx/net/dns.h b/include/nuttx/net/dns.h index 94da6abbec..f7dff02af6 100644 --- a/include/nuttx/net/dns.h +++ b/include/nuttx/net/dns.h @@ -198,6 +198,25 @@ int dns_setserver(FAR const struct sockaddr *addr, socklen_t addrlen); int dns_getserver(FAR struct sockaddr *addr, FAR socklen_t *addrlen); +/**************************************************************************** + * Name: dns_getaddr + * + * Description: + * Get the DNS server IPv4 address + * + * Parameters: + * ipaddr The location to return the IPv4 address + * + * Return: + * Zero (OK) is returned on success; A negated errno value is returned + * on failure. + * + ****************************************************************************/ + +#ifdef CONFIG_NET_IPv4 +int dns_getaddr(FAR struct in_addr *inaddr); +#endif + #undef EXTERN #if defined(__cplusplus) }