Pseudo-terminal emulation. More...
#include "shell/shell_server.h"
Go to the source code of this file.
Detailed Description
Pseudo-terminal emulation.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2019-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneSSH Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
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. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file shell_server_pty.h.
Macro Definition Documentation
◆ VT100_BACKSPACE
#define VT100_BACKSPACE "\x08" |
Definition at line 43 of file shell_server_pty.h.
◆ VT100_BS_CODE
#define VT100_BS_CODE 0x08 |
Definition at line 38 of file shell_server_pty.h.
◆ VT100_CLEAR_ENTIRE_LINE
#define VT100_CLEAR_ENTIRE_LINE VT100_ESC "[2K" |
Definition at line 50 of file shell_server_pty.h.
◆ VT100_CLEAR_ENTIRE_SCREEN
#define VT100_CLEAR_ENTIRE_SCREEN VT100_ESC "[2J" |
Definition at line 47 of file shell_server_pty.h.
◆ VT100_CLEAR_LINE_LEFT
#define VT100_CLEAR_LINE_LEFT VT100_ESC "[1K" |
Definition at line 49 of file shell_server_pty.h.
◆ VT100_CLEAR_LINE_RIGHT
#define VT100_CLEAR_LINE_RIGHT VT100_ESC "[K" |
Definition at line 48 of file shell_server_pty.h.
◆ VT100_CLEAR_SCREEN_DOWN
#define VT100_CLEAR_SCREEN_DOWN VT100_ESC "[J" |
Definition at line 45 of file shell_server_pty.h.
◆ VT100_CLEAR_SCREEN_UP
#define VT100_CLEAR_SCREEN_UP VT100_ESC "[1J" |
Definition at line 46 of file shell_server_pty.h.
◆ VT100_DEL_CODE
#define VT100_DEL_CODE 0x7F |
Definition at line 40 of file shell_server_pty.h.
◆ VT100_DELETE
#define VT100_DELETE VT100_ESC "[3~" |
Definition at line 62 of file shell_server_pty.h.
◆ VT100_END
#define VT100_END VT100_ESC "[F" |
Definition at line 66 of file shell_server_pty.h.
◆ VT100_ESC
#define VT100_ESC "\x1b" |
Definition at line 44 of file shell_server_pty.h.
◆ VT100_ESC_CODE
#define VT100_ESC_CODE 0x1B |
Definition at line 39 of file shell_server_pty.h.
◆ VT100_F1
#define VT100_F1 VT100_ESC "OP" |
Definition at line 67 of file shell_server_pty.h.
◆ VT100_F10
#define VT100_F10 VT100_ESC "[21~" |
Definition at line 76 of file shell_server_pty.h.
◆ VT100_F11
#define VT100_F11 VT100_ESC "[23~" |
Definition at line 77 of file shell_server_pty.h.
◆ VT100_F12
#define VT100_F12 VT100_ESC "[24~" |
Definition at line 78 of file shell_server_pty.h.
◆ VT100_F2
#define VT100_F2 VT100_ESC "OQ" |
Definition at line 68 of file shell_server_pty.h.
◆ VT100_F3
#define VT100_F3 VT100_ESC "OR" |
Definition at line 69 of file shell_server_pty.h.
◆ VT100_F4
#define VT100_F4 VT100_ESC "OS" |
Definition at line 70 of file shell_server_pty.h.
◆ VT100_F5
#define VT100_F5 VT100_ESC "[15~" |
Definition at line 71 of file shell_server_pty.h.
◆ VT100_F6
#define VT100_F6 VT100_ESC "[17~" |
Definition at line 72 of file shell_server_pty.h.
◆ VT100_F7
#define VT100_F7 VT100_ESC "[18~" |
Definition at line 73 of file shell_server_pty.h.
◆ VT100_F8
#define VT100_F8 VT100_ESC "[19~" |
Definition at line 74 of file shell_server_pty.h.
◆ VT100_F9
#define VT100_F9 VT100_ESC "[20~" |
Definition at line 75 of file shell_server_pty.h.
◆ VT100_HOME
#define VT100_HOME VT100_ESC "[H" |
Definition at line 65 of file shell_server_pty.h.
◆ VT100_INSERT
#define VT100_INSERT VT100_ESC "[2~" |
Definition at line 61 of file shell_server_pty.h.
◆ VT100_MOVE_CURSOR_DOWN
#define VT100_MOVE_CURSOR_DOWN VT100_ESC "[B" |
Definition at line 53 of file shell_server_pty.h.
◆ VT100_MOVE_CURSOR_DOWN_N
#define VT100_MOVE_CURSOR_DOWN_N VT100_ESC "[%uB" |
Definition at line 54 of file shell_server_pty.h.
◆ VT100_MOVE_CURSOR_LEFT
#define VT100_MOVE_CURSOR_LEFT VT100_ESC "[D" |
Definition at line 57 of file shell_server_pty.h.
◆ VT100_MOVE_CURSOR_LEFT_N
#define VT100_MOVE_CURSOR_LEFT_N VT100_ESC "[%uD" |
Definition at line 58 of file shell_server_pty.h.
◆ VT100_MOVE_CURSOR_RIGHT
#define VT100_MOVE_CURSOR_RIGHT VT100_ESC "[C" |
Definition at line 55 of file shell_server_pty.h.
◆ VT100_MOVE_CURSOR_RIGHT_N
#define VT100_MOVE_CURSOR_RIGHT_N VT100_ESC "[%uC" |
Definition at line 56 of file shell_server_pty.h.
◆ VT100_MOVE_CURSOR_UP
#define VT100_MOVE_CURSOR_UP VT100_ESC "[A" |
Definition at line 51 of file shell_server_pty.h.
◆ VT100_MOVE_CURSOR_UP_N
#define VT100_MOVE_CURSOR_UP_N VT100_ESC "[%uA" |
Definition at line 52 of file shell_server_pty.h.
◆ VT100_PAGE_DOWN
#define VT100_PAGE_DOWN VT100_ESC "[6~" |
Definition at line 64 of file shell_server_pty.h.
◆ VT100_PAGE_UP
#define VT100_PAGE_UP VT100_ESC "[5~" |
Definition at line 63 of file shell_server_pty.h.
◆ VT100_RESTORE_CURSOR_POS
#define VT100_RESTORE_CURSOR_POS VT100_ESC "[u" |
Definition at line 60 of file shell_server_pty.h.
◆ VT100_SAVE_CURSOR_POS
#define VT100_SAVE_CURSOR_POS VT100_ESC "[s" |
Definition at line 59 of file shell_server_pty.h.
Enumeration Type Documentation
◆ ShellTermModes
enum ShellTermModes |
Encoded terminal modes.
Definition at line 90 of file shell_server_pty.h.
Function Documentation
◆ shellClearCommandLine()
error_t shellClearCommandLine | ( | ShellServerSession * | session | ) |
Clear command line.
- Parameters
-
[in] session Handle referencing an shell session
- Returns
- error code
Definition at line 803 of file shell_server_pty.c.
◆ shellRestoreCommandLine()
error_t shellRestoreCommandLine | ( | ShellServerSession * | session, |
const char_t * | commandLine, | ||
size_t | length | ||
) |
Restore command line.
- Parameters
-
[in] session Handle referencing an shell session [in] commandLine Pointer to the command line [in] length Length of the command line
- Returns
- error code
Definition at line 853 of file shell_server_pty.c.
◆ shellServerInsertChar()
error_t shellServerInsertChar | ( | ShellServerSession * | session, |
char_t | c | ||
) |
Insert character at current position.
- Parameters
-
[in] session Handle referencing an shell session [in] c Character to be inserted
- Returns
- Error code
Definition at line 353 of file shell_server_pty.c.
◆ shellServerProcessBackspaceKey()
error_t shellServerProcessBackspaceKey | ( | ShellServerSession * | session | ) |
Process backspace key.
- Parameters
-
[in] session Handle referencing an shell session
- Returns
- Error code
Definition at line 434 of file shell_server_pty.c.
◆ shellServerProcessChar()
error_t shellServerProcessChar | ( | ShellServerSession * | session | ) |
Process received character.
- Parameters
-
[in] session Handle referencing an shell session
- Returns
- Error code
Definition at line 214 of file shell_server_pty.c.
◆ shellServerProcessDeleteKey()
error_t shellServerProcessDeleteKey | ( | ShellServerSession * | session | ) |
Process delete key.
- Parameters
-
[in] session Handle referencing an shell session
- Returns
- Error code
Definition at line 514 of file shell_server_pty.c.
◆ shellServerProcessDownKey()
error_t shellServerProcessDownKey | ( | ShellServerSession * | session | ) |
Process down key.
- Parameters
-
[in] session Handle referencing an shell session
- Returns
- Error code
Definition at line 692 of file shell_server_pty.c.
◆ shellServerProcessLeftKey()
error_t shellServerProcessLeftKey | ( | ShellServerSession * | session | ) |
Process left key.
- Parameters
-
[in] session Handle referencing an shell session
- Returns
- Error code
Definition at line 568 of file shell_server_pty.c.
◆ shellServerProcessPageDownKey()
error_t shellServerProcessPageDownKey | ( | ShellServerSession * | session | ) |
Process page down key.
- Parameters
-
[in] session Handle referencing an shell session
- Returns
- Error code
Definition at line 766 of file shell_server_pty.c.
◆ shellServerProcessPageUpKey()
error_t shellServerProcessPageUpKey | ( | ShellServerSession * | session | ) |
Process page up key.
- Parameters
-
[in] session Handle referencing an shell session
- Returns
- Error code
Definition at line 729 of file shell_server_pty.c.
◆ shellServerProcessRightKey()
error_t shellServerProcessRightKey | ( | ShellServerSession * | session | ) |
Process right key.
- Parameters
-
[in] session Handle referencing an shell session
- Returns
- Error code
Definition at line 612 of file shell_server_pty.c.
◆ shellServerProcessUpKey()
error_t shellServerProcessUpKey | ( | ShellServerSession * | session | ) |
Process up key.
- Parameters
-
[in] session Handle referencing an shell session
- Returns
- Error code
Definition at line 655 of file shell_server_pty.c.
◆ shellServerProcessWindowResize()
error_t shellServerProcessWindowResize | ( | ShellServerSession * | session | ) |
Process window resize event.
- Parameters
-
[in] session Handle referencing an shell session
- Returns
- Error code
Definition at line 51 of file shell_server_pty.c.