summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorMurphyZhao <[email protected]>2018-06-29 14:51:59 +0800
committerMurphyZhao <[email protected]>2018-07-02 09:32:52 +0800
commit6856a8b5e6459e6153396c6be3375411a024910e (patch)
tree80cc45d3450c4670099676cf47c7041205fc04ea /components
parent0f3820f1b671c56143e8417d4e332b035a7da176 (diff)
[finsh] update netstat
Signed-off-by: MurphyZhao <[email protected]>
Diffstat (limited to 'components')
-rw-r--r--components/finsh/msh_cmd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/components/finsh/msh_cmd.c b/components/finsh/msh_cmd.c
index 71dca15976..47ca031065 100644
--- a/components/finsh/msh_cmd.c
+++ b/components/finsh/msh_cmd.c
@@ -381,14 +381,19 @@ int cmd_dns(int argc, char **argv)
FINSH_FUNCTION_EXPORT_ALIAS(cmd_dns, __cmd_dns, list the information of dns);
#endif
-#ifdef RT_LWIP_TCP
+#if defined (RT_LWIP_TCP) || defined (RT_LWIP_UDP)
int cmd_netstat(int argc, char **argv)
{
extern void list_tcps(void);
extern void list_udps(void);
+#ifdef RT_LWIP_TCP
list_tcps();
+#endif
+#ifdef RT_LWIP_UDP
list_udps();
+#endif
+
return 0;
}
FINSH_FUNCTION_EXPORT_ALIAS(cmd_netstat, __cmd_netstat, list the information of TCP / IP);