Add NSH addroute and delroute commands

This commit is contained in:
Gregory Nutt
2013-10-05 15:42:20 -06:00
parent 31a0c289d7
commit ff88e86ef2
8 changed files with 415 additions and 42 deletions

View File

@@ -154,6 +154,10 @@ static const struct cmdmap_s g_cmdmap[] =
{ "?", cmd_help, 1, 1, NULL },
#endif
#if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE) && !defined(CONFIG_NSH_DISABLE_ADDROUTE)
{ "addroute", cmd_addroute, 4, 4, "<target> <netmask> <router>" },
#endif
#if defined(CONFIG_NETUTILS_CODECS) && defined(CONFIG_CODECS_BASE64)
# ifndef CONFIG_NSH_DISABLE_BASE64DEC
{ "base64dec", cmd_base64decode, 2, 4, "[-w] [-f] <string or filepath>" },
@@ -188,6 +192,10 @@ static const struct cmdmap_s g_cmdmap[] =
{ "dd", cmd_dd, 3, 6, "if=<infile> of=<outfile> [bs=<sectsize>] [count=<sectors>] [skip=<sectors>]" },
# endif
#if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE) && !defined(CONFIG_NSH_DISABLE_DELROUTE)
{ "delroute", cmd_addroute, 3, 3, "<target> <netmask>" },
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT) && \
defined(CONFIG_FS_READABLE) && !defined(CONFIG_NSH_DISABLE_DF)
#ifdef CONFIG_NSH_CMDOPT_DF_H