NSH addroute and delroute: All expression of the netmask in IPv4 CIDR or IPv6 slash notation. This really reduces the pain of using the commands, especially for IPv6.

This commit is contained in:
Gregory Nutt
2017-08-10 10:30:20 -06:00
parent f58768db3d
commit 52e4da1e41
3 changed files with 207 additions and 22 deletions

View File

@@ -111,7 +111,7 @@ static const struct cmdmap_s g_cmdmap[] =
#endif
#if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE) && !defined(CONFIG_NSH_DISABLE_ADDROUTE)
{ "addroute", cmd_addroute, 4, 4, "<target> <netmask> <router>" },
{ "addroute", cmd_addroute, 3, 4, "<target> [<netmask>] <router>" },
#endif
#if defined(CONFIG_NET) && defined(CONFIG_NET_ARP) && !defined(CONFIG_NSH_DISABLE_ARP)
@@ -165,7 +165,7 @@ static const struct cmdmap_s g_cmdmap[] =
# endif
#if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE) && !defined(CONFIG_NSH_DISABLE_DELROUTE)
{ "delroute", cmd_delroute, 3, 3, "<target> <netmask>" },
{ "delroute", cmd_delroute, 2, 3, "<target> [<netmask>]" },
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT) && \