source: rtems/cpukit/telnetd/icmds.c @ 081583c

4.104.114.95
Last change on this file since 081583c was 081583c, checked in by Joel Sherrill <joel.sherrill@…>, on 11/06/07 at 20:50:10

2007-11-06 Joel Sherrill <joel.sherrill@…>

  • telnetd/icmds.c, telnetd/pty.c, telnetd/telnetd.c, telnetd/telnetd.h: Fix headers and formatting.
  • Property mode set to 100644
File size: 2.0 KB
Line 
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/*+++++++++++++++++++++++++++++++++++++++++++++*/
20static int main_inet(int argc,char * argv[]) {
21 rtems_bsdnet_show_inet_routes ();
22 return 0;
23}
24/*+++++++++++++++++++++++++++++++++++++++++++++*/
25static int main_mbuf(int argc,char * argv[]) {
26 rtems_bsdnet_show_mbuf_stats ();
27 return 0;
28}
29/*+++++++++++++++++++++++++++++++++++++++++++++*/
30static int main_if(int argc,char * argv[]) {
31 rtems_bsdnet_show_if_stats ();
32 return 0;
33}
34/*+++++++++++++++++++++++++++++++++++++++++++++*/
35static int main_ip(int argc,char * argv[]) {
36 rtems_bsdnet_show_ip_stats ();
37 return 0;
38}
39/*+++++++++++++++++++++++++++++++++++++++++++++*/
40static int main_icmp(int argc,char * argv[]) {
41 rtems_bsdnet_show_icmp_stats ();
42 return 0;
43}
44/*+++++++++++++++++++++++++++++++++++++++++++++*/
45static int main_tcp(int argc,char * argv[]) {
46 rtems_bsdnet_show_tcp_stats ();
47 return 0;
48}
49/*+++++++++++++++++++++++++++++++++++++++++++++*/
50static int main_udp(int argc,char * argv[]) {
51 rtems_bsdnet_show_udp_stats ();
52 return 0;
53}
54/*+++++++++++++++++++++++++++++++++++++++++++++*/
55
56void _rtems_telnetd_register_icmds(void) {
57 shell_add_cmd("inet"    ,"net","inet routes"               ,main_inet);   
58 shell_add_cmd("mbuf"    ,"net","mbuf stats"                ,main_mbuf);   
59 shell_add_cmd("if"      ,"net","if   stats"                ,main_if  );   
60 shell_add_cmd("ip"      ,"net","ip   stats"                ,main_ip  );   
61 shell_add_cmd("icmp"    ,"net","icmp stats"                ,main_icmp);   
62 shell_add_cmd("tcp"     ,"net","tcp  stats"                ,main_tcp );   
63 shell_add_cmd("udp"     ,"net","udp  stats"                ,main_udp );   
64}
Note: See TracBrowser for help on using the repository browser.