netutils: Support telnetd in the kernel mode

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-10-16 19:44:38 +08:00
committed by Masayuki Ishikawa
parent 12863fbd52
commit 36a0c924f7
14 changed files with 201 additions and 451 deletions

View File

@@ -264,16 +264,6 @@
/* If Telnet is selected for the NSH console, then we must configure
* the resources used by the Telnet daemon and by the Telnet clients.
*
* CONFIG_NSH_TELNETD_PORT - The telnet daemon will listen on this.
* port. Default: 23
* CONFIG_NSH_TELNETD_DAEMONPRIO - Priority of the Telnet daemon.
* Default: SCHED_PRIORITY_DEFAULT
* CONFIG_NSH_TELNETD_DAEMONSTACKSIZE - Stack size allocated for the
* Telnet daemon. Default: 2048
* CONFIG_NSH_TELNETD_CLIENTPRIO - Priority of the Telnet client.
* Default: SCHED_PRIORITY_DEFAULT
* CONFIG_NSH_TELNETD_CLIENTSTACKSIZE - Stack size allocated for the
* Telnet client. Default: 2048
* CONFIG_NSH_TELNET_LOGIN - Support a simple Telnet login.
*
* If CONFIG_NSH_TELNET_LOGIN is defined, then these additional
@@ -285,26 +275,6 @@
* Default 3.
*/
#ifndef CONFIG_NSH_TELNETD_PORT
# define CONFIG_NSH_TELNETD_PORT 23
#endif
#ifndef CONFIG_NSH_TELNETD_DAEMONPRIO
# define CONFIG_NSH_TELNETD_DAEMONPRIO SCHED_PRIORITY_DEFAULT
#endif
#ifndef CONFIG_NSH_TELNETD_DAEMONSTACKSIZE
# define CONFIG_NSH_TELNETD_DAEMONSTACKSIZE 2048
#endif
#ifndef CONFIG_NSH_TELNETD_CLIENTPRIO
# define CONFIG_NSH_TELNETD_CLIENTPRIO SCHED_PRIORITY_DEFAULT
#endif
#ifndef CONFIG_NSH_TELNETD_CLIENTSTACKSIZE
# define CONFIG_NSH_TELNETD_CLIENTSTACKSIZE 2048
#endif
#ifdef CONFIG_NSH_TELNET_LOGIN
# ifndef CONFIG_NSH_LOGIN_USERNAME
@@ -447,12 +417,6 @@
# define CONFIG_NSH_LINELEN 80
#endif
/* The following two settings are used only in the telnetd interface */
#ifndef CONFIG_NSH_IOBUFFER_SIZE
# define CONFIG_NSH_IOBUFFER_SIZE 512
#endif
/* The maximum number of nested if-then[-else]-fi sequences that
* are permissible.
*/
@@ -1152,11 +1116,6 @@ int cmd_irqinfo(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv);
# ifndef CONFIG_NSH_DISABLE_ROUTE
int cmd_route(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv);
# endif
# if defined(CONFIG_NSH_TELNET)
# ifndef CONFIG_NSH_DISABLE_TELNETD
int cmd_telnetd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv);
# endif
# endif
#endif /* CONFIG_NET */
#if defined(CONFIG_LIBC_NETDB) && !defined(CONFIG_NSH_DISABLE_NSLOOKUP)