ftp_client_misc.h
Go to the documentation of this file.
1 /**
2  * @file ftp_client_misc.h
3  * @brief Helper functions for FTP client
4  *
5  * @section License
6  *
7  * Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.
8  *
9  * This file is part of CycloneTCP Open.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  *
25  * @author Oryx Embedded SARL (www.oryx-embedded.com)
26  * @version 1.9.0
27  **/
28 
29 #ifndef _FTP_CLIENT_MISC_H
30 #define _FTP_CLIENT_MISC_H
31 
32 //Dependencies
33 #include "core/net.h"
34 #include "ftp_client.h"
35 
36 //C++ guard
37 #ifdef __cplusplus
38  extern "C" {
39 #endif
40 
41 //FTP client related functions
43 
45 
47  const char_t *command, const char_t *argument);
48 
50  const IpAddr *ipAddr, uint16_t port);
51 
54 
56  size_t maxLen);
57 
59 
62 
64 
65 //C++ guard
66 #ifdef __cplusplus
67  }
68 #endif
69 
70 #endif
error_t ftpClientParsePwdReply(FtpClientContext *context, char_t *path, size_t maxLen)
Parse PWD response.
char char_t
Definition: compiler_port.h:41
TCP/IP stack core.
error_t ftpClientFormatPortCommand(FtpClientContext *context, const IpAddr *ipAddr, uint16_t port)
Format PORT or EPRT command.
error_t ftpClientParsePasvReply(FtpClientContext *context, uint16_t *port)
Parse PASV or EPSV response.
error_t ftpClientSendCommand(FtpClientContext *context)
Send FTP command and wait for a reply.
#define FtpClientContext
Definition: ftp_client.h:121
IP network address.
Definition: ip.h:57
error_t ftpClientFormatCommand(FtpClientContext *context, const char_t *command, const char_t *argument)
Format FTP command.
FtpClientState
FTP client states.
Definition: ftp_client.h:186
uint8_t ipAddr[4]
Definition: mib_common.h:185
error_t ftpClientInitDataTransfer(FtpClientContext *context, bool_t direction)
Initiate data transfer.
FTP client (File Transfer Protocol)
error_t
Error codes.
Definition: error.h:40
error_t ftpClientCheckTimeout(FtpClientContext *context)
Determine whether a timeout error has occurred.
Directory entry.
Definition: ftp_client.h:266
uint16_t port
Definition: dns_common.h:221
error_t ftpClientTerminateDataTransfer(FtpClientContext *context)
Terminate data transfer.
void ftpClientChangeState(FtpClientContext *context, FtpClientState newState)
Update FTP client state.
int bool_t
Definition: compiler_port.h:47
error_t ftpClientFormatPasvCommand(FtpClientContext *context)
Format PASV or EPSV command.
error_t ftpClientParseDirEntry(char_t *line, FtpDirEntry *dirEntry)
Parse directory entry.