MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / netdev_list_dns

Function netdev_list_dns

components/net/netdev/src/netdev.c:1457–1481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1455#endif /* NETDEV_USING_PING */
1456
1457static 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
1483int netdev_dns(int argc, char **argv)
1484{

Callers 1

netdev_dnsFunction · 0.85

Calls 2

rt_slist_nextFunction · 0.85
rt_kprintfFunction · 0.85

Tested by

no test coverage detected