Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

ftp_server_misc.c File Reference

ftp_server_misc.c File Reference

FTP server (miscellaneous functions) More...

Go to the source code of this file.

Functions

uint16_t ftpServerGetPassivePort (FtpServerContext *context)
 Get a passive port number.
void ftpServerCloseConnection (FtpServerContext *context, FtpClientConnection *connection)
 Close client connection properly.
FtpClientConnectionftpServerAcceptControlConnection (FtpServerContext *context)
 Accept control connection.
void ftpServerCloseControlConnection (FtpClientConnection *connection)
 Close control connection.
error_t ftpServerOpenDataConnection (FtpServerContext *context, FtpClientConnection *connection)
 Open data connection.
void ftpServerAcceptDataConnection (FtpClientConnection *connection)
 Accept data connection.
void ftpServerCloseDataConnection (FtpClientConnection *connection)
 Close data connection.
error_t ftpServerGetPath (FtpClientConnection *connection, const char_t *inputPath, char_t *outputPath, size_t maxLen)
 Retrieve the full pathname.
uint_t ftpServerGetFilePermissions (FtpServerContext *context, FtpClientConnection *connection, const char_t *path)
 Get permissions for the specified file or directory.
const char_t * ftpServerStripRootDir (FtpServerContext *context, const char_t *path)
 Strip root dir from specified pathname.
const char_t * ftpServerStripHomeDir (FtpClientConnection *connection, const char_t *path)
 Strip home directory from specified pathname.

Detailed Description

FTP server (miscellaneous functions)

License

Copyright (C) 2010-2017 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.7.6

Definition in file ftp_server_misc.c.


Function Documentation

FtpClientConnection* ftpServerAcceptControlConnection ( FtpServerContext context )

Accept control connection.

Parameters:
[in]contextPointer to the FTP server context
Returns:
Pointer to the connection

Definition at line 136 of file ftp_server_misc.c.

void ftpServerAcceptDataConnection ( FtpClientConnection connection )

Accept data connection.

Parameters:
[in]connectionPointer to the client connection

Definition at line 362 of file ftp_server_misc.c.

void ftpServerCloseConnection ( FtpServerContext context,
FtpClientConnection connection 
)

Close client connection properly.

Parameters:
[in]contextPointer to the FTP server context
[in]connectionPointer to the client connection to be closed

Definition at line 91 of file ftp_server_misc.c.

void ftpServerCloseControlConnection ( FtpClientConnection connection )

Close control connection.

Parameters:
[in]connectionPointer to the client connection

Definition at line 240 of file ftp_server_misc.c.

void ftpServerCloseDataConnection ( FtpClientConnection connection )

Close data connection.

Parameters:
[in]connectionPointer to the client connection

Definition at line 421 of file ftp_server_misc.c.

uint_t ftpServerGetFilePermissions ( FtpServerContext context,
FtpClientConnection connection,
const char_t *  path 
)

Get permissions for the specified file or directory.

Parameters:
[in]contextPointer to the FTP server context
[in]connectionPointer to the client connection
[in]pathCanonical path of the file
Returns:
Access rights for the specified file

Definition at line 516 of file ftp_server_misc.c.

uint16_t ftpServerGetPassivePort ( FtpServerContext context )

Get a passive port number.

Parameters:
[in]contextPointer to the FTP server context
Returns:
Passive port number

Definition at line 52 of file ftp_server_misc.c.

error_t ftpServerGetPath ( FtpClientConnection connection,
const char_t *  inputPath,
char_t *  outputPath,
size_t  maxLen 
)

Retrieve the full pathname.

Parameters:
[in]connectionPointer to the client connection
[in]inputPathRelative or absolute path
[out]outputPathResulting full path
[in]maxLenMaximum acceptable path length
Returns:
Error code

Definition at line 463 of file ftp_server_misc.c.

error_t ftpServerOpenDataConnection ( FtpServerContext context,
FtpClientConnection connection 
)

Open data connection.

Parameters:
[in]contextPointer to the FTP server context
[in]connectionPointer to the client connection
Returns:
Error code

Definition at line 272 of file ftp_server_misc.c.

const char_t* ftpServerStripHomeDir ( FtpClientConnection connection,
const char_t *  path 
)

Strip home directory from specified pathname.

Parameters:
[in]connectionPointer to the client connection
[in]pathinput pathname
Returns:
Resulting pathname with home directory stripped

Definition at line 592 of file ftp_server_misc.c.

const char_t* ftpServerStripRootDir ( FtpServerContext context,
const char_t *  path 
)

Strip root dir from specified pathname.

Parameters:
[in]contextPointer to the FTP server context
[in]pathinput pathname
Returns:
Resulting pathname with root dir stripped

Definition at line 561 of file ftp_server_misc.c.