fix list_if display mistake.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@305 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
8bc1d0836e
commit
a8e372657e
|
@ -302,16 +302,16 @@ FINSH_FUNCTION_EXPORT(set_dns, set DNS server address);
|
||||||
void list_if()
|
void list_if()
|
||||||
{
|
{
|
||||||
rt_kprintf("Default network interface: %c%c\n", netif_default->name[0], netif_default->name[1]);
|
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("ip address: %s\n", inet_ntoa(*((struct in_addr*)&(netif_default->ip_addr))));
|
||||||
rt_kprintf("gw address: %s\n", ip_ntoa(&(netif_default->ip_addr.addr)));
|
rt_kprintf("gw address: %s\n", inet_ntoa(*((struct in_addr*)&(netif_default->gw))));
|
||||||
rt_kprintf("net mask : %s\n", ip_ntoa(&(netif_default->ip_addr.addr)));
|
rt_kprintf("net mask : %s\n", inet_ntoa(*((struct in_addr*)&(netif_default->netmask))));
|
||||||
|
|
||||||
#if LWIP_DNS
|
#if LWIP_DNS
|
||||||
{
|
{
|
||||||
struct ip_addr ip_addr;
|
struct ip_addr ip_addr;
|
||||||
|
|
||||||
ip_addr = dns_getserver(0);
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue