ftp_server_transport.c File Reference

Transport protocol abstraction layer. More...

#include "core/net.h"
#include "ftp/ftp_server.h"
#include "ftp/ftp_server_transport.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   FTP_TRACE_LEVEL
 

Functions

error_t ftpServerOpenSecureChannel (FtpServerContext *context, FtpServerChannel *channel, size_t txBufferSize, size_t rxBufferSize)
 Open secure connection. More...
 
error_t ftpServerEstablishSecureChannel (FtpServerChannel *channel)
 Establish secure connection. More...
 
error_t ftpServerWriteChannel (FtpServerChannel *channel, const void *data, size_t length, size_t *written, uint_t flags)
 Send data using the relevant transport protocol. More...
 
error_t ftpServerReadChannel (FtpServerChannel *channel, void *data, size_t size, size_t *received, uint_t flags)
 Receive data using the relevant transport protocol. More...
 

Detailed Description

Transport protocol abstraction layer.

License

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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.6

Definition in file ftp_server_transport.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   FTP_TRACE_LEVEL

Definition at line 32 of file ftp_server_transport.c.

Function Documentation

◆ ftpServerEstablishSecureChannel()

error_t ftpServerEstablishSecureChannel ( FtpServerChannel channel)

Establish secure connection.

Parameters
[in]channelControl or data channel
Returns
Error code

Definition at line 118 of file ftp_server_transport.c.

◆ ftpServerOpenSecureChannel()

error_t ftpServerOpenSecureChannel ( FtpServerContext context,
FtpServerChannel channel,
size_t  txBufferSize,
size_t  rxBufferSize 
)

Open secure connection.

Parameters
[in]contextPointer to the FTP server context
[in]channelControl or data channel
[in]txBufferSizeTX buffer size
[in]rxBufferSizeRX buffer size
Returns
Error code

Definition at line 53 of file ftp_server_transport.c.

◆ ftpServerReadChannel()

error_t ftpServerReadChannel ( FtpServerChannel channel,
void *  data,
size_t  size,
size_t *  received,
uint_t  flags 
)

Receive data using the relevant transport protocol.

Parameters
[in]channelControl or data channel
[out]dataBuffer into which received data will be placed
[in]sizeMaximum number of bytes that can be received
[out]receivedNumber of bytes that have been received
[in]flagsSet of flags that influences the behavior of this function
Returns
Error code

Definition at line 177 of file ftp_server_transport.c.

◆ ftpServerWriteChannel()

error_t ftpServerWriteChannel ( FtpServerChannel channel,
const void *  data,
size_t  length,
size_t *  written,
uint_t  flags 
)

Send data using the relevant transport protocol.

Parameters
[in]channelControl or data channel
[in]dataPointer to a buffer containing the data to be transmitted
[in]lengthNumber of bytes to be transmitted
[out]writtenActual number of bytes written (optional parameter)
[in]flagsSet of flags that influences the behavior of this function
Returns
Error code

Definition at line 143 of file ftp_server_transport.c.