SSH channel management. More...
#include "ssh/ssh.h"Go to the source code of this file.
| Functions | |
| SshChannel * | sshGetChannel (SshConnection *connection, uint32_t localChannelNum) | 
| Get the channel that matches the specified channel number.  More... | |
| uint32_t | sshAllocateLocalChannelNum (SshConnection *connection) | 
| Generate a local channel number.  More... | |
| bool_t | sshCheckRemoteChannelNum (SshConnection *connection, uint32_t remoteChannelNum) | 
| Check remote channel number.  More... | |
| void | sshRegisterChannelEvents (SshChannel *channel, SocketEventDesc *eventDesc) | 
| Register channel events.  More... | |
| error_t | sshProcessChannelEvents (SshChannel *channel) | 
| Channel event handler.  More... | |
| uint_t | sshWaitForChannelEvents (SshChannel *channel, uint_t eventMask, systime_t timeout) | 
| Wait for a particular SSH channel event.  More... | |
| void | sshUpdateChannelEvents (SshChannel *channel) | 
| Update SSH channel related events.  More... | |
| error_t | sshProcessChannelData (SshChannel *channel, const uint8_t *data, size_t length) | 
| Process incoming data.  More... | |
| error_t | sshProcessChannelExtendedData (SshChannel *channel, uint32_t type, const uint8_t *data, size_t length) | 
| Process incoming extended data.  More... | |
| error_t | sshUpdateChannelWindow (SshChannel *channel, uint32_t windowSizeInc) | 
| Update channel flow-control window.  More... | |
Detailed Description
SSH channel management.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2019-2025 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.5.4
Definition in file ssh_channel.h.
Function Documentation
◆ sshAllocateLocalChannelNum()
| uint32_t sshAllocateLocalChannelNum | ( | SshConnection * | connection | ) | 
Generate a local channel number.
- Parameters
- 
  [in] connection Pointer to the SSH connection 
- Returns
- Channel number
Definition at line 92 of file ssh_channel.c.
◆ sshCheckRemoteChannelNum()
| bool_t sshCheckRemoteChannelNum | ( | SshConnection * | connection, | 
| uint32_t | remoteChannelNum | ||
| ) | 
Check remote channel number.
- Parameters
- 
  [in] connection Pointer to the SSH connection [in] remoteChannelNum Remote channel number 
- Returns
- TRUE if the channel number is valid, else FALSE
Definition at line 141 of file ssh_channel.c.
◆ sshGetChannel()
| SshChannel* sshGetChannel | ( | SshConnection * | connection, | 
| uint32_t | localChannelNum | ||
| ) | 
Get the channel that matches the specified channel number.
- Parameters
- 
  [in] connection Pointer to the SSH connection [in] localChannelNum Local channel number 
- Returns
- Handle referencing an SSH channel
Definition at line 53 of file ssh_channel.c.
◆ sshProcessChannelData()
| error_t sshProcessChannelData | ( | SshChannel * | channel, | 
| const uint8_t * | data, | ||
| size_t | length | ||
| ) | 
Process incoming data.
- Parameters
- 
  [in] channel Pointer to the SSH channel [in] data Pointer to the payload data [in] length Length of the payload data, in bytes 
- Returns
- Error code
Definition at line 466 of file ssh_channel.c.
◆ sshProcessChannelEvents()
| error_t sshProcessChannelEvents | ( | SshChannel * | channel | ) | 
Channel event handler.
- Parameters
- 
  [in] channel Handle referencing an SSH channel 
- Returns
- Error code
Definition at line 232 of file ssh_channel.c.
◆ sshProcessChannelExtendedData()
| error_t sshProcessChannelExtendedData | ( | SshChannel * | channel, | 
| uint32_t | type, | ||
| const uint8_t * | data, | ||
| size_t | length | ||
| ) | 
Process incoming extended data.
- Parameters
- 
  [in] channel Pointer to the SSH channel [in] type Extended data type [in] data Pointer to the extended data [in] length Length of the extended data, in bytes 
- Returns
- Error code
Definition at line 541 of file ssh_channel.c.
◆ sshRegisterChannelEvents()
| void sshRegisterChannelEvents | ( | SshChannel * | channel, | 
| SocketEventDesc * | eventDesc | ||
| ) | 
Register channel events.
- Parameters
- 
  [in] channel Handle referencing an SSH channel [in] eventDesc SSH channel events to be registered 
Definition at line 185 of file ssh_channel.c.
◆ sshUpdateChannelEvents()
| void sshUpdateChannelEvents | ( | SshChannel * | channel | ) | 
Update SSH channel related events.
- Parameters
- 
  [in] channel Pointer to the SSH channel 
Definition at line 386 of file ssh_channel.c.
◆ sshUpdateChannelWindow()
| error_t sshUpdateChannelWindow | ( | SshChannel * | channel, | 
| uint32_t | windowSizeInc | ||
| ) | 
Update channel flow-control window.
- Parameters
- 
  [in] channel Pointer to the SSH channel [in] windowSizeInc Window size increment 
- Returns
- Error code
Definition at line 577 of file ssh_channel.c.
◆ sshWaitForChannelEvents()
| uint_t sshWaitForChannelEvents | ( | SshChannel * | channel, | 
| uint_t | eventMask, | ||
| systime_t | timeout | ||
| ) | 
Wait for a particular SSH channel event.
- Parameters
- 
  [in] channel Pointer to the SSH channel [in] eventMask Logic OR of all the events that will complete the wait [in] timeout Maximum time to wait 
- Returns
- Logic OR of all the events that satisfied the wait
Definition at line 345 of file ssh_channel.c.
