summaryrefslogtreecommitdiff
path: root/nuttx/examples/nsh/nsh_main.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-02 23:04:10 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-02 23:04:10 +0000
commit9f60d09c6faaac732a62a188228a88321aad7368 (patch)
tree4404ee0e25d63abaad5e23b9aa8dce9ed6a9c8e9 /nuttx/examples/nsh/nsh_main.c
parent8a2d54981a1c1ee6563f3444cffc1d2d4784156e (diff)
downloadnuttx-9f60d09c6faaac732a62a188228a88321aad7368.tar.gz
nuttx-9f60d09c6faaac732a62a188228a88321aad7368.tar.bz2
nuttx-9f60d09c6faaac732a62a188228a88321aad7368.zip
Add NSH ping command
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@870 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/nsh/nsh_main.c')
-rw-r--r--nuttx/examples/nsh/nsh_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nuttx/examples/nsh/nsh_main.c b/nuttx/examples/nsh/nsh_main.c
index a70d2176d..ba7ad389f 100644
--- a/nuttx/examples/nsh/nsh_main.c
+++ b/nuttx/examples/nsh/nsh_main.c
@@ -146,7 +146,7 @@ static const struct cmdmap_s g_cmdmap[] =
{ "exec", cmd_exec, 2, 3, "<hex-address>" },
{ "exit", cmd_exit, 1, 1, NULL },
{ "help", cmd_help, 1, 1, NULL },
-#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
+#ifdef CONFIG_NET
{ "ifconfig", cmd_ifconfig, 1, 1, NULL },
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
@@ -169,6 +169,10 @@ static const struct cmdmap_s g_cmdmap[] =
#endif
{ "mw", cmd_mw, 2, 3, "<hex-address>[=<hex-value>][ <hex-byte-count>]" },
{ "ps", cmd_ps, 1, 1, NULL },
+#if defined(CONFIG_NET) && defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING) && \
+ !defined(CONFIG_DISABLE_CLOCK) && !defined(CONFIG_DISABLE_SIGNALS)
+ { "ping", cmd_ping, 2, 6, "[-c <count>] [-i <interval>] <ip-address>" },
+#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON)
{ "pwd", cmd_pwd, 1, 1, NULL },
#endif