Files
rtems/cpukit/telnetd/icmds.c
Chris Johns 1ff9922df0 2007-12-22 Chris Johns <chrisj@rtems.org>
* 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.
2007-12-22 08:27:18 +00:00

65 lines
2.0 KiB
C

/*
* Author: Fernando RUIZ CASAS (fernando.ruiz@ctv.es)
* May 2001
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/shell.h>
#include <rtems/rtems_bsdnet.h>
/*+++++++++++++++++++++++++++++++++++++++++++++*/
static int main_inet(int argc,char * argv[]) {
rtems_bsdnet_show_inet_routes ();
return 0;
}
/*+++++++++++++++++++++++++++++++++++++++++++++*/
static int main_mbuf(int argc,char * argv[]) {
rtems_bsdnet_show_mbuf_stats ();
return 0;
}
/*+++++++++++++++++++++++++++++++++++++++++++++*/
static int main_if(int argc,char * argv[]) {
rtems_bsdnet_show_if_stats ();
return 0;
}
/*+++++++++++++++++++++++++++++++++++++++++++++*/
static int main_ip(int argc,char * argv[]) {
rtems_bsdnet_show_ip_stats ();
return 0;
}
/*+++++++++++++++++++++++++++++++++++++++++++++*/
static int main_icmp(int argc,char * argv[]) {
rtems_bsdnet_show_icmp_stats ();
return 0;
}
/*+++++++++++++++++++++++++++++++++++++++++++++*/
static int main_tcp(int argc,char * argv[]) {
rtems_bsdnet_show_tcp_stats ();
return 0;
}
/*+++++++++++++++++++++++++++++++++++++++++++++*/
static int main_udp(int argc,char * argv[]) {
rtems_bsdnet_show_udp_stats ();
return 0;
}
/*+++++++++++++++++++++++++++++++++++++++++++++*/
void _rtems_telnetd_register_icmds(void) {
rtems_shell_add_cmd("inet" ,"net","inet routes" ,main_inet);
rtems_shell_add_cmd("mbuf" ,"net","mbuf stats" ,main_mbuf);
rtems_shell_add_cmd("if" ,"net","if stats" ,main_if );
rtems_shell_add_cmd("ip" ,"net","ip stats" ,main_ip );
rtems_shell_add_cmd("icmp" ,"net","icmp stats" ,main_icmp);
rtems_shell_add_cmd("tcp" ,"net","tcp stats" ,main_tcp );
rtems_shell_add_cmd("udp" ,"net","udp stats" ,main_udp );
}