aboutsummaryrefslogtreecommitdiff
path: root/apps/nshlib/nsh_parse.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-31 14:36:00 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-10-31 14:36:00 +0000
commit26cbab4570e466f88221e3f459aa3273386cd9ea (patch)
treebbc2662360f180653bb42c54b921dec07135b648 /apps/nshlib/nsh_parse.c
parent20ede8d196a4c555505b2628a756e8382739b067 (diff)
downloadpx4-firmware-26cbab4570e466f88221e3f459aa3273386cd9ea.tar.gz
px4-firmware-26cbab4570e466f88221e3f459aa3273386cd9ea.tar.bz2
px4-firmware-26cbab4570e466f88221e3f459aa3273386cd9ea.zip
Add apps/netutils/codecs and associated NSH commands from Darcy Gong
git-svn-id: http://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.c25
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 }
};