| 1481 | } |
| 1482 | |
| 1483 | int 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 | } |
| 1505 | MSH_CMD_EXPORT_ALIAS(netdev_dns, dns, list and set the information of dns); |
| 1506 | |
| 1507 | #ifdef NETDEV_USING_NETSTAT |
nothing calls this directly
no test coverage detected