nsh: Call getaddrinfo in cmd_nslookup to support the dual stack host

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Iac7a9a6b871d473e4720db1d6cbfeea3dc9796a0
This commit is contained in:
Xiang Xiao
2020-03-30 18:06:47 +08:00
committed by patacongo
parent 326c80db72
commit 8da81578b0
3 changed files with 35 additions and 65 deletions

View File

@@ -372,8 +372,7 @@ static const struct cmdmap_s g_cmdmap[] =
# endif
#endif
#if defined(CONFIG_LIBC_NETDB) && defined(CONFIG_NETDB_DNSCLIENT) && \
!defined(CONFIG_NSH_DISABLE_NSLOOKUP)
#if defined(CONFIG_LIBC_NETDB) && !defined(CONFIG_NSH_DISABLE_NSLOOKUP)
{ "nslookup", cmd_nslookup, 2, 2, "<host-name>" },
#endif