ftp_client_misc.c
char_t * ipv6AddrToString(const Ipv6Addr *ipAddr, char_t *str)
Convert a binary IPv6 address to a string representation.
Definition: ipv6.c:2329
error_t ftpClientOpenChannel(FtpClientContext *context, FtpClientChannel *channel, size_t txBufferSize, size_t rxBufferSize)
Open network connection.
Definition: ftp_client_transport.c:53
String manipulation helper functions.
error_t ftpClientReadChannel(FtpClientChannel *channel, void *data, size_t size, size_t *received, uint_t flags)
Receive data using the relevant transport protocol.
Definition: ftp_client_transport.c:293
error_t ftpClientCheckTimeout(FtpClientContext *context)
Determine whether a timeout error has occurred.
Definition: ftp_client_misc.c:1176
error_t ftpClientFormatPasvCommand(FtpClientContext *context)
Format PASV or EPSV command.
Definition: ftp_client_misc.c:300
void strRemoveTrailingSpace(char_t *s)
Removes all trailing whitespace from a string.
Definition: str.c:119
error_t ftpClientShutdownChannel(FtpClientChannel *channel)
Shutdown network connection.
Definition: ftp_client_transport.c:192
Helper functions for FTP client.
#define FTP_CLIENT_MIN_TLS_RX_BUFFER_SIZE
Definition: ftp_client.h:89
error_t ftpClientTerminateDataTransfer(FtpClientContext *context)
Terminate data transfer.
Definition: ftp_client_misc.c:1079
int_t socket(int_t family, int_t type, int_t protocol)
Create a socket that is bound to a specific transport service provider.
Definition: bsd_socket.c:65
void strReplaceChar(char_t *s, char_t oldChar, char_t newChar)
Replace all occurrences of the specified character.
Definition: str.c:149
error_t ftpClientWriteChannel(FtpClientChannel *channel, const void *data, size_t length, size_t *written, uint_t flags)
Send data using the relevant transport protocol.
Definition: ftp_client_transport.c:259
error_t socketConnect(Socket *socket, const IpAddr *remoteIpAddr, uint16_t remotePort)
Establish a connection to a specified socket.
Definition: socket.c:1349
Socket * socketAccept(Socket *socket, IpAddr *clientIpAddr, uint16_t *clientPort)
Permit an incoming connection attempt on a socket.
Definition: socket.c:1451
error_t ftpClientInitDataTransfer(FtpClientContext *context, bool_t direction)
Initiate data transfer.
Definition: ftp_client_misc.c:723
#define FTP_CLIENT_MAX_TLS_RX_BUFFER_SIZE
Definition: ftp_client.h:96
FTP client (File Transfer Protocol)
error_t ftpClientEstablishSecureChannel(FtpClientChannel *channel)
Establish secure connection.
Definition: ftp_client_transport.c:174
error_t socketGetLocalAddr(Socket *socket, IpAddr *localIpAddr, uint16_t *localPort)
Retrieve the local address for a given socket.
Definition: socket.c:1953
error_t ftpClientParseDirEntry(char_t *line, FtpDirEntry *dirEntry)
Parse directory entry.
Definition: ftp_client_misc.c:486
Transport protocol abstraction layer.
void ftpClientChangeState(FtpClientContext *context, FtpClientState newState)
Update FTP client state.
Definition: ftp_client_misc.c:53
error_t ftpClientFormatPortCommand(FtpClientContext *context, const IpAddr *ipAddr, uint16_t port)
Format PORT or EPRT command.
Definition: ftp_client_misc.c:223
error_t ftpClientParsePasvReply(FtpClientContext *context, uint16_t *port)
Parse PASV or EPSV response.
Definition: ftp_client_misc.c:357
error_t ftpClientFormatCommand(FtpClientContext *context, const char_t *command, const char_t *argument)
Format FTP command.
Definition: ftp_client_misc.c:185
error_t ftpClientSendCommand(FtpClientContext *context)
Send FTP command and wait for a reply.
Definition: ftp_client_misc.c:69
error_t ftpClientOpenSecureChannel(FtpClientContext *context, FtpClientChannel *channel, size_t txBufferSize, size_t rxBufferSize)
Open secure connection.
Definition: ftp_client_transport.c:102
char_t * ipv4AddrToString(Ipv4Addr ipAddr, char_t *str)
Convert a binary IPv4 address to dot-decimal notation.
Definition: ipv4.c:1457
error_t ftpClientParsePwdReply(FtpClientContext *context, char_t *path, size_t maxLen)
Parse PWD response.
Definition: ftp_client_misc.c:443
error_t socketSetTimeout(Socket *socket, systime_t timeout)
Set timeout value for blocking operations.
Definition: socket.c:148
Debugging facilities.
void ftpClientCloseChannel(FtpClientChannel *channel)
Close network connection.
Definition: ftp_client_transport.c:229
error_t socketListen(Socket *socket, uint_t backlog)
Place a socket in the listening state.
Definition: socket.c:1413