1 | /* |
---|
2 | * Author: Fernando RUIZ CASAS (fernando.ruiz@ctv.es) |
---|
3 | * May 2001 |
---|
4 | * |
---|
5 | * This program is distributed in the hope that it will be useful, |
---|
6 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
7 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
---|
8 | * |
---|
9 | * $Id$ |
---|
10 | */ |
---|
11 | |
---|
12 | #if HAVE_CONFIG_H |
---|
13 | #include "config.h" |
---|
14 | #endif |
---|
15 | |
---|
16 | #include <rtems/shell.h> |
---|
17 | #include <rtems/rtems_bsdnet.h> |
---|
18 | |
---|
19 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
20 | static int main_inet(int argc,char * argv[]) { |
---|
21 | rtems_bsdnet_show_inet_routes (); |
---|
22 | return 0; |
---|
23 | } |
---|
24 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
25 | static int main_mbuf(int argc,char * argv[]) { |
---|
26 | rtems_bsdnet_show_mbuf_stats (); |
---|
27 | return 0; |
---|
28 | } |
---|
29 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
30 | static int main_if(int argc,char * argv[]) { |
---|
31 | rtems_bsdnet_show_if_stats (); |
---|
32 | return 0; |
---|
33 | } |
---|
34 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
35 | static int main_ip(int argc,char * argv[]) { |
---|
36 | rtems_bsdnet_show_ip_stats (); |
---|
37 | return 0; |
---|
38 | } |
---|
39 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
40 | static int main_icmp(int argc,char * argv[]) { |
---|
41 | rtems_bsdnet_show_icmp_stats (); |
---|
42 | return 0; |
---|
43 | } |
---|
44 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
45 | static int main_tcp(int argc,char * argv[]) { |
---|
46 | rtems_bsdnet_show_tcp_stats (); |
---|
47 | return 0; |
---|
48 | } |
---|
49 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
50 | static int main_udp(int argc,char * argv[]) { |
---|
51 | rtems_bsdnet_show_udp_stats (); |
---|
52 | return 0; |
---|
53 | } |
---|
54 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
55 | |
---|
56 | void _rtems_telnetd_register_icmds(void) { |
---|
57 | rtems_shell_add_cmd("inet" ,"net","inet routes" ,main_inet); |
---|
58 | rtems_shell_add_cmd("mbuf" ,"net","mbuf stats" ,main_mbuf); |
---|
59 | rtems_shell_add_cmd("if" ,"net","if stats" ,main_if ); |
---|
60 | rtems_shell_add_cmd("ip" ,"net","ip stats" ,main_ip ); |
---|
61 | rtems_shell_add_cmd("icmp" ,"net","icmp stats" ,main_icmp); |
---|
62 | rtems_shell_add_cmd("tcp" ,"net","tcp stats" ,main_tcp ); |
---|
63 | rtems_shell_add_cmd("udp" ,"net","udp stats" ,main_udp ); |
---|
64 | } |
---|