SFTP server. More...
#include "ssh/ssh.h"#include "sftp/sftp_server.h"#include "sftp/sftp_server_misc.h"#include "path.h"#include "debug.h"Go to the source code of this file.
Macros | |
| #define | TRACE_LEVEL SFTP_TRACE_LEVEL |
Functions | |
| void | sftpServerGetDefaultSettings (SftpServerSettings *settings) |
| Initialize settings with default values. More... | |
| error_t | sftpServerInit (SftpServerContext *context, const SftpServerSettings *settings) |
| Initialize SFTP server context. More... | |
| error_t | sftpServerStart (SftpServerContext *context) |
| Start SFTP server. More... | |
| error_t | sftpServerStop (SftpServerContext *context) |
| Stop SFTP server. More... | |
| error_t | sftpServerSetRootDir (SftpServerSession *session, const char_t *rootDir) |
| Set user's root directory. More... | |
| error_t | sftpServerSetHomeDir (SftpServerSession *session, const char_t *homeDir) |
| Set user's home directory. More... | |
| void | sftpServerTask (void *param) |
| SFTP server task. More... | |
| void | sftpServerDeinit (SftpServerContext *context) |
| Release SFTP server context. More... | |
Detailed Description
SFTP server.
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 sftp_server.c.
Macro Definition Documentation
◆ TRACE_LEVEL
| #define TRACE_LEVEL SFTP_TRACE_LEVEL |
Definition at line 32 of file sftp_server.c.
Function Documentation
◆ sftpServerDeinit()
| void sftpServerDeinit | ( | SftpServerContext * | context | ) |
Release SFTP server context.
- Parameters
-
[in] context Pointer to the SFTP server context
Definition at line 457 of file sftp_server.c.
◆ sftpServerGetDefaultSettings()
| void sftpServerGetDefaultSettings | ( | SftpServerSettings * | settings | ) |
Initialize settings with default values.
- Parameters
-
[out] settings Structure that contains SFTP server settings
Definition at line 50 of file sftp_server.c.
◆ sftpServerInit()
| error_t sftpServerInit | ( | SftpServerContext * | context, |
| const SftpServerSettings * | settings | ||
| ) |
Initialize SFTP server context.
- Parameters
-
[in] context Pointer to the SFTP server context [in] settings SFTP server specific settings
- Returns
- Error code
Definition at line 85 of file sftp_server.c.
◆ sftpServerSetHomeDir()
| error_t sftpServerSetHomeDir | ( | SftpServerSession * | session, |
| const char_t * | homeDir | ||
| ) |
Set user's home directory.
- Parameters
-
[in] session Handle referencing an SFTP session [in] homeDir NULL-terminated string specifying the home directory
- Returns
- Error code
Definition at line 331 of file sftp_server.c.
◆ sftpServerSetRootDir()
| error_t sftpServerSetRootDir | ( | SftpServerSession * | session, |
| const char_t * | rootDir | ||
| ) |
Set user's root directory.
- Parameters
-
[in] session Handle referencing an SFTP session [in] rootDir NULL-terminated string specifying the root directory
- Returns
- Error code
Definition at line 297 of file sftp_server.c.
◆ sftpServerStart()
| error_t sftpServerStart | ( | SftpServerContext * | context | ) |
Start SFTP server.
- Parameters
-
[in] context Pointer to the SFTP server context
- Returns
- Error code
Definition at line 183 of file sftp_server.c.
◆ sftpServerStop()
| error_t sftpServerStop | ( | SftpServerContext * | context | ) |
Stop SFTP server.
- Parameters
-
[in] context Pointer to the SFTP server context
- Returns
- Error code
Definition at line 242 of file sftp_server.c.
◆ sftpServerTask()
| void sftpServerTask | ( | void * | param | ) |
SFTP server task.
- Parameters
-
[in] param Pointer to the SFTP server context
Definition at line 360 of file sftp_server.c.
