shell_server_pty.c File Reference

Pseudo-terminal emulation. More...

#include "ssh/ssh.h"
#include "shell/shell_server.h"
#include "shell/shell_server_pty.h"
#include "shell/shell_server_misc.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   SHELL_TRACE_LEVEL
 

Functions

error_t shellServerProcessWindowResize (ShellServerSession *session)
 Process window resize event. More...
 
error_t shellServerProcessChar (ShellServerSession *session)
 Process received character. More...
 
error_t shellServerInsertChar (ShellServerSession *session, char_t c)
 Insert character at current position. More...
 
error_t shellServerProcessBackspaceKey (ShellServerSession *session)
 Process backspace key. More...
 
error_t shellServerProcessDeleteKey (ShellServerSession *session)
 Process delete key. More...
 
error_t shellServerProcessLeftKey (ShellServerSession *session)
 Process left key. More...
 
error_t shellServerProcessRightKey (ShellServerSession *session)
 Process right key. More...
 
error_t shellServerProcessUpKey (ShellServerSession *session)
 Process up key. More...
 
error_t shellServerProcessDownKey (ShellServerSession *session)
 Process down key. More...
 
error_t shellServerProcessPageUpKey (ShellServerSession *session)
 Process page up key. More...
 
error_t shellServerProcessPageDownKey (ShellServerSession *session)
 Process page down key. More...
 
error_t shellClearCommandLine (ShellServerSession *session)
 Clear command line. More...
 
error_t shellRestoreCommandLine (ShellServerSession *session, const char_t *commandLine, size_t length)
 Restore command line. More...
 

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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file shell_server_pty.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   SHELL_TRACE_LEVEL

Definition at line 32 of file shell_server_pty.c.

Function Documentation

◆ shellClearCommandLine()

error_t shellClearCommandLine ( ShellServerSession session)

Clear command line.

Parameters
[in]sessionHandle 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]sessionHandle referencing an shell session
[in]commandLinePointer to the command line
[in]lengthLength 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]sessionHandle referencing an shell session
[in]cCharacter 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]sessionHandle 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]sessionHandle 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]sessionHandle 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]sessionHandle 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]sessionHandle 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]sessionHandle 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]sessionHandle 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]sessionHandle 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]sessionHandle 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]sessionHandle referencing an shell session
Returns
Error code

Definition at line 51 of file shell_server_pty.c.