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

Function netdev_dns

components/net/netdev/src/netdev.c:1483–1504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1481}
1482
1483int netdev_dns(int argc, char **argv)
1484{
1485 if (argc == 1)
1486 {
1487 netdev_list_dns();
1488 }
1489 else if (argc == 3)
1490 {
1491 netdev_set_dns(argv[1], 0, argv[2]);
1492 }
1493 else if (argc == 4)
1494 {
1495 netdev_set_dns(argv[1], atoi(argv[2]), argv[3]);
1496 }
1497 else
1498 {
1499 rt_kprintf("bad parameter! input: dns <netdev_name> [dns_num] <dns_server>\n");
1500 return -1;
1501 }
1502
1503 return 0;
1504}
1505MSH_CMD_EXPORT_ALIAS(netdev_dns, dns, list and set the information of dns);
1506
1507#ifdef NETDEV_USING_NETSTAT

Callers

nothing calls this directly

Calls 3

netdev_list_dnsFunction · 0.85
netdev_set_dnsFunction · 0.85
rt_kprintfFunction · 0.85

Tested by

no test coverage detected