shell_client_misc.c File Reference

Helper functions for SSH secure shell client. More...

#include "ssh/ssh.h"
#include "ssh/ssh_connection.h"
#include "ssh/ssh_request.h"
#include "ssh/ssh_misc.h"
#include "shell/shell_client.h"
#include "shell/shell_client_misc.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   SHELL_TRACE_LEVEL
 

Functions

void shellClientChangeState (ShellClientContext *context, ShellClientState newState)
 Update Shell client state. More...
 
error_t shellClientChannelRequestCallback (SshChannel *channel, const SshString *type, const uint8_t *data, size_t length, void *param)
 SSH channel request callback. More...
 
error_t shellClientOpenConnection (ShellClientContext *context)
 Open SSH connection. More...
 
error_t shellClientEstablishConnection (ShellClientContext *context)
 Establish SSH connection. More...
 
void shellClientCloseConnection (ShellClientContext *context)
 Close SSH connection. More...
 
error_t shellClientProcessEvents (ShellClientContext *context)
 Process shell client events. More...
 
error_t shellClientCheckTimeout (ShellClientContext *context)
 Determine whether a timeout error has occurred. More...
 

Detailed Description

Helper functions for SSH secure shell client.

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_client_misc.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   SHELL_TRACE_LEVEL

Definition at line 32 of file shell_client_misc.c.

Function Documentation

◆ shellClientChangeState()

void shellClientChangeState ( ShellClientContext context,
ShellClientState  newState 
)

Update Shell client state.

Parameters
[in]contextPointer to the shell client context
[in]newStateNew state to switch to

Definition at line 53 of file shell_client_misc.c.

◆ shellClientChannelRequestCallback()

error_t shellClientChannelRequestCallback ( SshChannel channel,
const SshString type,
const uint8_t *  data,
size_t  length,
void *  param 
)

SSH channel request callback.

Parameters
[in]channelHandle referencing an SSH channel
[in]typeRequest type
[in]dataRequest-specific data
[in]lengthLength of the request-specific data, in bytes
[in]paramPointer to the shell client context
Returns
Error code

Definition at line 74 of file shell_client_misc.c.

◆ shellClientCheckTimeout()

error_t shellClientCheckTimeout ( ShellClientContext context)

Determine whether a timeout error has occurred.

Parameters
[in]contextPointer to the shell client context
Returns
Error code

Definition at line 333 of file shell_client_misc.c.

◆ shellClientCloseConnection()

void shellClientCloseConnection ( ShellClientContext context)

Close SSH connection.

Parameters
[in]contextPointer to the shell client context

Definition at line 239 of file shell_client_misc.c.

◆ shellClientEstablishConnection()

error_t shellClientEstablishConnection ( ShellClientContext context)

Establish SSH connection.

Parameters
[in]contextPointer to the shell client context
Returns
Error code

Definition at line 206 of file shell_client_misc.c.

◆ shellClientOpenConnection()

error_t shellClientOpenConnection ( ShellClientContext context)

Open SSH connection.

Parameters
[in]contextPointer to the shell client context
Returns
Error code

Definition at line 130 of file shell_client_misc.c.

◆ shellClientProcessEvents()

error_t shellClientProcessEvents ( ShellClientContext context)

Process shell client events.

Parameters
[in]contextPointer to the shell client context
Returns
Error code

Definition at line 259 of file shell_client_misc.c.