source: rtems/cpukit/telnetd/icmds.c @ 2aa8014

4.104.115
Last change on this file since 2aa8014 was 1ff9922, checked in by Chris Johns <chrisj@…>, on 12/22/07 at 08:27:18

2007-12-22 Chris Johns <chrisj@…>

  • configure.ac: fixed bug that always enabled strict order mutexes.
  • score/inline/rtems/score/coremutex.inl: Fixed coding standard.
  • score/src/coremutex.c: Add the holder's thread to the lock_mutex list if the mutex is initialised locked.
  • libnetworking/rtems/rtems_glue.c: Changed semaphore error message to show the error is an rtems-net error.
  • libmisc/monitor/mon-network.c: Removed warnings.
  • telnetd/icmds.c: Changed shell_* to rtems_shell_*.
  • score/Makefile.am: Fixed typo that stopped 'make tags' working.
  • libmisc/shell/err.c, libmisc/shell/err.h, libmisc/shell/errx.c, libmisc/shell/extern-cp.h, libmisc/shell/fts.c, libmisc/shell/fts.h, libmisc/shell/main_cp.c, libmisc/shell/utils-cp.c, libmisc/shell/verr.c, libmisc/shell/verrx.c, libmisc/shell/vwarn.c, libmisc/shell/vwarnx.c, libmisc/shell/warn.c, libmisc/shell/warnx.c: New. Ported from BSD.
  • libmisc/shell/shellconfig.h: Add the cp command.
  • libmisc/Makefile.am: Add the new files to the shell.
  • libmisc/shell/shell.c, libmisc/shell/shell.h: Add scripting support.
  • libblock/src/flashdisk.c: Fixed disk drive count size setting bug.
  • 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 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}
Note: See TracBrowser for help on using the repository browser.