SCP server. More...
#include "ssh/ssh.h"
#include "scp/scp_server.h"
#include "scp/scp_server_misc.h"
#include "path.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL SCP_TRACE_LEVEL |
Functions | |
void | scpServerGetDefaultSettings (ScpServerSettings *settings) |
Initialize settings with default values. More... | |
error_t | scpServerInit (ScpServerContext *context, const ScpServerSettings *settings) |
Initialize SCP server context. More... | |
error_t | scpServerStart (ScpServerContext *context) |
Start SCP server. More... | |
error_t | scpServerStop (ScpServerContext *context) |
Stop SCP server. More... | |
error_t | scpServerSetRootDir (ScpServerSession *session, const char_t *rootDir) |
Set user's root directory. More... | |
error_t | scpServerSetHomeDir (ScpServerSession *session, const char_t *homeDir) |
Set user's home directory. More... | |
void | scpServerTask (void *param) |
SCP server task. More... | |
void | scpServerDeinit (ScpServerContext *context) |
Release SCP server context. More... | |
Detailed Description
SCP server.
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 scp_server.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL SCP_TRACE_LEVEL |
Definition at line 32 of file scp_server.c.
Function Documentation
◆ scpServerDeinit()
void scpServerDeinit | ( | ScpServerContext * | context | ) |
Release SCP server context.
- Parameters
-
[in] context Pointer to the SCP server context
Definition at line 438 of file scp_server.c.
◆ scpServerGetDefaultSettings()
void scpServerGetDefaultSettings | ( | ScpServerSettings * | settings | ) |
Initialize settings with default values.
- Parameters
-
[out] settings Structure that contains SCP server settings
Definition at line 50 of file scp_server.c.
◆ scpServerInit()
error_t scpServerInit | ( | ScpServerContext * | context, |
const ScpServerSettings * | settings | ||
) |
Initialize SCP server context.
- Parameters
-
[in] context Pointer to the SCP server context [in] settings SCP server specific settings
- Returns
- Error code
Definition at line 81 of file scp_server.c.
◆ scpServerSetHomeDir()
error_t scpServerSetHomeDir | ( | ScpServerSession * | session, |
const char_t * | homeDir | ||
) |
Set user's home directory.
- Parameters
-
[in] session Handle referencing an SCP session [in] homeDir NULL-terminated string specifying the home directory
- Returns
- Error code
Definition at line 312 of file scp_server.c.
◆ scpServerSetRootDir()
error_t scpServerSetRootDir | ( | ScpServerSession * | session, |
const char_t * | rootDir | ||
) |
Set user's root directory.
- Parameters
-
[in] session Handle referencing an SCP session [in] rootDir NULL-terminated string specifying the root directory
- Returns
- Error code
Definition at line 278 of file scp_server.c.
◆ scpServerStart()
error_t scpServerStart | ( | ScpServerContext * | context | ) |
Start SCP server.
- Parameters
-
[in] context Pointer to the SCP server context
- Returns
- Error code
Definition at line 164 of file scp_server.c.
◆ scpServerStop()
error_t scpServerStop | ( | ScpServerContext * | context | ) |
Stop SCP server.
- Parameters
-
[in] context Pointer to the SCP server context
- Returns
- Error code
Definition at line 223 of file scp_server.c.
◆ scpServerTask()
void scpServerTask | ( | void * | param | ) |
SCP server task.
- Parameters
-
[in] param Pointer to the SCP server context
Definition at line 341 of file scp_server.c.