diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-10-31 14:36:00 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-10-31 14:36:00 +0000 |
commit | 608e5adab4915ada5c2881d66d20e3d6fa0efba5 (patch) | |
tree | bbc2662360f180653bb42c54b921dec07135b648 /apps/nshlib/nsh_parse.c | |
parent | 120fc05c1d11406857c6d245abe9a344dcaae268 (diff) | |
download | nuttx-608e5adab4915ada5c2881d66d20e3d6fa0efba5.tar.gz nuttx-608e5adab4915ada5c2881d66d20e3d6fa0efba5.tar.bz2 nuttx-608e5adab4915ada5c2881d66d20e3d6fa0efba5.zip |
Add apps/netutils/codecs and associated NSH commands from Darcy Gong
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5280 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/nshlib/nsh_parse.c')
-rw-r--r-- | apps/nshlib/nsh_parse.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c index df2f7c3e3..f9642809f 100644 --- a/apps/nshlib/nsh_parse.c +++ b/apps/nshlib/nsh_parse.c @@ -153,6 +153,15 @@ static const struct cmdmap_s g_cmdmap[] = { "?", cmd_help, 1, 1, NULL }, #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>" }, +# endif +# ifndef CONFIG_NSH_DISABLE_BASE64ENC + { "base64enc", cmd_base64encode, 2, 4, "[-w] [-f] <string or filepath>" }, +# endif +#endif + #if CONFIG_NFILE_DESCRIPTORS > 0 # ifndef CONFIG_NSH_DISABLE_CAT { "cat", cmd_cat, 2, NSH_MAX_ARGUMENTS, "<path> [<path> [<path> ...]]" }, @@ -246,6 +255,12 @@ static const struct cmdmap_s g_cmdmap[] = { "mb", cmd_mb, 2, 3, "<hex-address>[=<hex-value>][ <hex-byte-count>]" }, #endif +#if defined(CONFIG_NETUTILS_CODECS) && defined(CONFIG_CODECS_HASH_MD5) +# ifndef CONFIG_NSH_DISABLE_MD5 + { "md5", cmd_md5, 2, 3, "[-f] <string or filepath>" }, +# endif +#endif + #if !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_FS_WRITABLE) # ifndef CONFIG_NSH_DISABLE_MKDIR { "mkdir", cmd_mkdir, 2, 2, "<path>" }, @@ -363,6 +378,15 @@ static const struct cmdmap_s g_cmdmap[] = # endif #endif +#if defined(CONFIG_NETUTILS_CODECS) && defined(CONFIG_CODECS_URLCODE) +# ifndef CONFIG_NSH_DISABLE_URLDECODE + { "urldecode", cmd_urldecode, 2, 3, "[-f] <string or filepath>" }, +# endif +# ifndef CONFIG_NSH_DISABLE_URLENCODE + { "urlencode", cmd_urlencode, 2, 3, "[-f] <string or filepath>" }, +# endif +#endif + #ifndef CONFIG_DISABLE_SIGNALS # ifndef CONFIG_NSH_DISABLE_USLEEP { "usleep", cmd_usleep, 2, 2, "<usec>" }, @@ -378,6 +402,7 @@ static const struct cmdmap_s g_cmdmap[] = #ifndef CONFIG_NSH_DISABLE_XD { "xd", cmd_xd, 3, 3, "<hex-address> <byte-count>" }, #endif + { NULL, NULL, 1, 1, NULL } }; |