1 | #include <rtems/shell.h> |
---|
2 | #include <rtems/rtems_bsdnet.h> |
---|
3 | |
---|
4 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
5 | static int main_inet(int argc,char * argv[]) { |
---|
6 | rtems_bsdnet_show_inet_routes (); |
---|
7 | return 0; |
---|
8 | } |
---|
9 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
10 | static int main_mbuf(int argc,char * argv[]) { |
---|
11 | rtems_bsdnet_show_mbuf_stats (); |
---|
12 | return 0; |
---|
13 | } |
---|
14 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
15 | static int main_if(int argc,char * argv[]) { |
---|
16 | rtems_bsdnet_show_if_stats (); |
---|
17 | return 0; |
---|
18 | } |
---|
19 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
20 | static int main_ip(int argc,char * argv[]) { |
---|
21 | rtems_bsdnet_show_ip_stats (); |
---|
22 | return 0; |
---|
23 | } |
---|
24 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
25 | static int main_icmp(int argc,char * argv[]) { |
---|
26 | rtems_bsdnet_show_icmp_stats (); |
---|
27 | return 0; |
---|
28 | } |
---|
29 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
30 | static int main_tcp(int argc,char * argv[]) { |
---|
31 | rtems_bsdnet_show_tcp_stats (); |
---|
32 | return 0; |
---|
33 | } |
---|
34 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
35 | static int main_udp(int argc,char * argv[]) { |
---|
36 | rtems_bsdnet_show_udp_stats (); |
---|
37 | return 0; |
---|
38 | } |
---|
39 | /*+++++++++++++++++++++++++++++++++++++++++++++*/ |
---|
40 | |
---|
41 | void _rtems_telnetd_register_icmds(void) { |
---|
42 | shell_add_cmd("inet" ,"net","inet routes" ,main_inet); |
---|
43 | shell_add_cmd("mbuf" ,"net","mbuf stats" ,main_mbuf); |
---|
44 | shell_add_cmd("if" ,"net","if stats" ,main_if ); |
---|
45 | shell_add_cmd("ip" ,"net","ip stats" ,main_ip ); |
---|
46 | shell_add_cmd("icmp" ,"net","icmp stats" ,main_icmp); |
---|
47 | shell_add_cmd("tcp" ,"net","tcp stats" ,main_tcp ); |
---|
48 | shell_add_cmd("udp" ,"net","udp stats" ,main_udp ); |
---|
49 | } |
---|