| 1455 | #endif /* NETDEV_USING_PING */ |
| 1456 | |
| 1457 | static void netdev_list_dns(void) |
| 1458 | { |
| 1459 | unsigned int index = 0; |
| 1460 | struct netdev *netdev = RT_NULL; |
| 1461 | rt_slist_t *node = RT_NULL; |
| 1462 | |
| 1463 | for (node = &(netdev_list->list); node; node = rt_slist_next(node)) |
| 1464 | { |
| 1465 | netdev = rt_list_entry(node, struct netdev, list); |
| 1466 | |
| 1467 | rt_kprintf("network interface device: %.*s%s\n", |
| 1468 | RT_NAME_MAX, netdev->name, |
| 1469 | (netdev == netdev_default)?" (Default)":""); |
| 1470 | |
| 1471 | for(index = 0; index < NETDEV_DNS_SERVERS_NUM; index++) |
| 1472 | { |
| 1473 | rt_kprintf("dns server #%d: %s\n", index, inet_ntoa(netdev->dns_servers[index])); |
| 1474 | } |
| 1475 | |
| 1476 | if (rt_slist_next(node)) |
| 1477 | { |
| 1478 | rt_kprintf("\n"); |
| 1479 | } |
| 1480 | } |
| 1481 | } |
| 1482 | |
| 1483 | int netdev_dns(int argc, char **argv) |
| 1484 | { |
no test coverage detected