summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorarmink <[email protected]>2017-08-18 11:52:12 +0800
committerarmink <[email protected]>2017-08-18 11:53:11 +0800
commit871297747a1aea9c0f3868640856aab97377eea5 (patch)
treef1c816895a9730226f7f29c3f4e6df7c15d59a2c /components
parent5910ae4170e2ebaca9fc05ee87aef167b533d586 (diff)
[LWIP] Move net apps to `LwIP/src/apps`.
Diffstat (limited to 'components')
-rw-r--r--components/net/lwip-2.0.2/src/apps/README.md6
-rw-r--r--components/net/lwip-2.0.2/src/apps/ping/ping.c (renamed from components/net/lwip-2.0.2/apps/ping.c)0
-rw-r--r--components/net/lwip-2.0.2/src/apps/tftp/tftp_port.c (renamed from components/net/lwip-2.0.2/apps/tftp_server.c)10
3 files changed, 13 insertions, 3 deletions
diff --git a/components/net/lwip-2.0.2/src/apps/README.md b/components/net/lwip-2.0.2/src/apps/README.md
new file mode 100644
index 0000000000..26670858c5
--- /dev/null
+++ b/components/net/lwip-2.0.2/src/apps/README.md
@@ -0,0 +1,6 @@
+Some net apps for current version LwIP.
+
+The RT-Thread develop team ported apps. It's easy to use it on finsh/msh.
+
+- ping
+- tftp
diff --git a/components/net/lwip-2.0.2/apps/ping.c b/components/net/lwip-2.0.2/src/apps/ping/ping.c
index 4b934f0cac..4b934f0cac 100644
--- a/components/net/lwip-2.0.2/apps/ping.c
+++ b/components/net/lwip-2.0.2/src/apps/ping/ping.c
diff --git a/components/net/lwip-2.0.2/apps/tftp_server.c b/components/net/lwip-2.0.2/src/apps/tftp/tftp_port.c
index f5667ef0ad..129cc7da17 100644
--- a/components/net/lwip-2.0.2/apps/tftp_server.c
+++ b/components/net/lwip-2.0.2/src/apps/tftp/tftp_port.c
@@ -1,5 +1,5 @@
/*
- * File : tftp_server.c
+ * File : tftp_port.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2017, RT-Thread Development Team
*
@@ -59,7 +59,7 @@ static int tftp_write(void* handle, struct pbuf* p)
return write(fd, p->payload, p->len);
}
-#if defined(RT_USING_FINSH) && defined(FINSH_USING_MSH)
+#if defined(RT_USING_FINSH)
#include <finsh.h>
static void tftp_server(uint8_t argc, char **argv)
@@ -78,6 +78,10 @@ static void tftp_server(uint8_t argc, char **argv)
rt_kprintf("TFTP server start failed.\n");
}
}
+FINSH_FUNCTION_EXPORT(tftp_server, start tftp server.);
+
+#if defined(FINSH_USING_MSH)
MSH_CMD_EXPORT(tftp_server, start tftp server.);
+#endif /* defined(FINSH_USING_MSH) */
-#endif /* defined(RT_USING_FINSH) && defined(FINSH_USING_MSH) */
+#endif /* defined(RT_USING_FINSH) */