From 426dc74b959df16ea2c63ddefb07aa874a17a367 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 2 Feb 2012 16:04:09 +0000 Subject: NSH now uses the new Telnet daemon and built-in tasks started by NSH can be used over Telnet git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4361 42af7a65-404d-4744-a932-0658087f49c3 --- apps/include/nsh.h | 50 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 13 deletions(-) (limited to 'apps/include') diff --git a/apps/include/nsh.h b/apps/include/nsh.h index 6977e44bd..15f35963c 100644 --- a/apps/include/nsh.h +++ b/apps/include/nsh.h @@ -67,27 +67,51 @@ extern "C" { * Public Function Prototypes ****************************************************************************/ -/* Interfaces needed to initialize and execute the NuttShell (NSH). +/**************************************************************************** + * Name: nsh_initialize * - * nsh_initialize() - This function function should be called one during - * application start-up prior to executing nsh_consolemain() or - * nsh_telnetmain(). - */ + * Description: + * This nterfaces is used to initialize the NuttShell (NSH). + * nsh_initialize() should be called one during application start-up prior + * to executing either nsh_consolemain() or nsh_telnetstart(). + * + * Input Parameters: + * None + * + * Returned Value: + * None + * + ****************************************************************************/ EXTERN void nsh_initialize(void); -/* The following interfaces maybe to called or started with task_start to - * start an NSH instance. +/**************************************************************************** + * Name: nsh_consolemain * - * nsh_consolemain() starts NSH on the console (/dev/console). - * nsh_telnetmain() starts a telnet daemon that will allow multiple - * connections via telnet. + * Description: + * This interfaces maybe to called or started with task_start to start a + * single an NSH instance that operates on stdin and stdout (/dev/console). + * This function does not return. * - * These functions do not return. - */ + * Input Parameters: + * Standard task start-up arguements. These are not used. argc may be + * zero and argv may be NULL. + * + * Returned Values: + * This function does not normally return. exit() is usually called to + * terminate the NSH session. This function will return in the event of + * an error. In that case, a nonzero value is returned (1). + * + ****************************************************************************/ EXTERN int nsh_consolemain(int argc, char *argv[]); -EXTERN int nsh_telnetmain(int argc, char *argv[]); + +/* nsh_telnetstart() starts a telnet daemon that will allow multiple + * NSH connections via telnet. This function returns immediately after + * the daemon has been started. + */ + +EXTERN int nsh_telnetstart(void); #undef EXTERN #ifdef __cplusplus -- cgit v1.2.3