ftp_server.c File Reference

FTP server (File Transfer Protocol) More...

#include "ftp/ftp_server.h"
#include "ftp/ftp_server_control.h"
#include "ftp/ftp_server_data.h"
#include "ftp/ftp_server_misc.h"
#include "path.h"
#include "debug.h"

Go to the source code of this file.




void ftpServerGetDefaultSettings (FtpServerSettings *settings)
 Initialize settings with default values. More...
error_t ftpServerInit (FtpServerContext *context, const FtpServerSettings *settings)
 FTP server initialization. More...
error_t ftpServerStart (FtpServerContext *context)
 Start FTP server. More...
error_t ftpServerSetHomeDir (FtpClientConnection *connection, const char_t *homeDir)
 Set home directory. More...
void ftpServerTask (FtpServerContext *context)
 FTP server task. More...
void ftpServerDeinit (FtpServerContext *context)
 Release FTP server context. More...

Detailed Description

FTP server (File Transfer Protocol)


SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2019 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP 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.


File Transfer Protocol (FTP) is a standard network protocol used to transfer files from one host to another host over a TCP-based network. Refer to the following RFCs for complete details:

  • RFC 959: File Transfer Protocol (FTP)
  • RFC 3659: Extensions to FTP
  • RFC 2428: FTP Extensions for IPv6 and NATs
Oryx Embedded SARL (www.oryx-embedded.com)

Definition in file ftp_server.c.

Macro Definition Documentation



Definition at line 41 of file ftp_server.c.

Function Documentation

◆ ftpServerDeinit()

void ftpServerDeinit ( FtpServerContext context)

Release FTP server context.

[in]contextPointer to the FTP server context

Definition at line 442 of file ftp_server.c.

◆ ftpServerGetDefaultSettings()

void ftpServerGetDefaultSettings ( FtpServerSettings settings)

Initialize settings with default values.

[out]settingsStructure that contains FTP server settings

Definition at line 60 of file ftp_server.c.

◆ ftpServerInit()

error_t ftpServerInit ( FtpServerContext context,
const FtpServerSettings settings 

FTP server initialization.

[in]contextPointer to the FTP server context
[in]settingsFTP server specific settings
Error code

Definition at line 115 of file ftp_server.c.

◆ ftpServerSetHomeDir()

error_t ftpServerSetHomeDir ( FtpClientConnection connection,
const char_t homeDir 

Set home directory.

[in]connectionPointer to the client connection
[in]homeDirNULL-terminated string specifying the home directory
Error code

Definition at line 283 of file ftp_server.c.

◆ ftpServerStart()

error_t ftpServerStart ( FtpServerContext context)

Start FTP server.

[in]contextPointer to the FTP server context
Error code

Definition at line 252 of file ftp_server.c.

◆ ftpServerTask()

void ftpServerTask ( FtpServerContext context)

FTP server task.

[in]contextPointer to the FTP server context

Definition at line 310 of file ftp_server.c.