提交 a8e37265 编写于 作者: B bernard.xiong

fix list_if display mistake.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@305 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 8bc1d083
......@@ -302,16 +302,16 @@ FINSH_FUNCTION_EXPORT(set_dns, set DNS server address);
void list_if()
{
rt_kprintf("Default network interface: %c%c\n", netif_default->name[0], netif_default->name[1]);
rt_kprintf("ip address: %s\n", ip_ntoa(&(netif_default->ip_addr.addr)));
rt_kprintf("gw address: %s\n", ip_ntoa(&(netif_default->ip_addr.addr)));
rt_kprintf("net mask : %s\n", ip_ntoa(&(netif_default->ip_addr.addr)));
rt_kprintf("ip address: %s\n", inet_ntoa(*((struct in_addr*)&(netif_default->ip_addr))));
rt_kprintf("gw address: %s\n", inet_ntoa(*((struct in_addr*)&(netif_default->gw))));
rt_kprintf("net mask : %s\n", inet_ntoa(*((struct in_addr*)&(netif_default->netmask))));
#if LWIP_DNS
{
struct ip_addr ip_addr;
ip_addr = dns_getserver(0);
rt_kprintf("dns server: %d.%d.%d.%d\n", ip_ntoa(&ip_addr));
rt_kprintf("dns server: %s\n", inet_ntoa(*((struct in_addr*)&(ip_addr))));
}
#endif
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册