ftp_server_data.c
Path manipulation helper functions.
error_t socketBind(Socket *socket, const IpAddr *localIpAddr, uint16_t localPort)
Associate a local address with a socket.
Definition: socket.c:1316
FTP data connection.
size_t ftpServerFormatDirEntry(const FsDirEntry *dirEntry, uint_t perm, char_t *buffer)
Format a directory entry in UNIX-style format.
Definition: ftp_server_misc.c:233
error_t ftpServerOpenDataChannel(FtpClientConnection *connection)
Open data connection.
Definition: ftp_server_data.c:269
char_t * ipAddrToString(const IpAddr *ipAddr, char_t *str)
Convert a binary IP address to a string representation.
Definition: ip.c:805
Transport protocol abstraction layer.
error_t socketGetRemoteAddr(Socket *socket, IpAddr *remoteIpAddr, uint16_t *remotePort)
Retrieve the address of the peer to which a socket is connected.
Definition: socket.c:1985
Helper functions for FTP server.
error_t socketSetTxBufferSize(Socket *socket, size_t size)
Specify the size of the TCP send buffer.
Definition: socket.c:1201
error_t fsReadFile(FsFile *file, void *data, size_t size, size_t *length)
Read data from the specified file.
Definition: fs_port_fatfs.c:590
void ftpServerReadDataChannel(FtpClientConnection *connection)
Read data from the data connection.
Definition: ftp_server_data.c:647
error_t socketSetRxBufferSize(Socket *socket, size_t size)
Specify the size of the TCP receive buffer.
Definition: socket.c:1237
void ftpServerCloseDataChannel(FtpClientConnection *connection)
Close data connection.
Definition: ftp_server_data.c:756
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 ftpServerRegisterDataChannelEvents(FtpClientConnection *connection, SocketEventDesc *eventDesc)
Register data connection events.
Definition: ftp_server_data.c:52
error_t fsReadDir(FsDir *dir, FsDirEntry *dirEntry)
Read an entry from the specified directory stream.
Definition: fs_port_fatfs.c:859
#define FTP_SERVER_MAX_TLS_RX_BUFFER_SIZE
Definition: ftp_server.h:165
bool_t tlsIsTxReady(TlsContext *context)
Check whether some data is ready for transmission.
Definition: tls.c:2228
void ftpServerCloseConnection(FtpClientConnection *connection)
Close client connection properly.
Definition: ftp_server_misc.c:398
error_t ftpServerEstablishSecureChannel(FtpServerChannel *channel)
Establish secure connection.
Definition: ftp_server_transport.c:124
error_t socketConnect(Socket *socket, const IpAddr *remoteIpAddr, uint16_t remotePort)
Establish a connection to a specified socket.
Definition: socket.c:1349
error_t socketShutdown(Socket *socket, uint_t how)
Disable reception, transmission, or both.
Definition: socket.c:2020
Socket * socketOpen(uint_t type, uint_t protocol)
Create a socket (UDP or TCP)
Definition: socket.c:125
error_t ftpServerOpenSecureChannel(FtpServerContext *context, FtpServerChannel *channel, size_t txBufferSize, size_t rxBufferSize)
Open secure connection.
Definition: ftp_server_transport.c:53
Socket * socketAccept(Socket *socket, IpAddr *clientIpAddr, uint16_t *clientPort)
Permit an incoming connection attempt on a socket.
Definition: socket.c:1451
bool_t tlsIsRxReady(TlsContext *context)
Check whether some data is available in the receive buffer.
Definition: tls.c:2262
uint_t ftpServerGetFilePermissions(FtpClientConnection *connection, const char_t *path)
Get permissions for the specified file or directory.
Definition: ftp_server_misc.c:182
error_t fsWriteFile(FsFile *file, void *data, size_t length)
Write data to the specified file.
Definition: fs_port_fatfs.c:539
error_t ftpServerReadChannel(FtpServerChannel *channel, void *data, size_t size, size_t *received, uint_t flags)
Receive data using the relevant transport protocol.
Definition: ftp_server_transport.c:180
FTP server (File Transfer Protocol)
#define FTP_SERVER_MIN_TLS_RX_BUFFER_SIZE
Definition: ftp_server.h:158
error_t ftpServerWriteChannel(FtpServerChannel *channel, const void *data, size_t length, size_t *written, uint_t flags)
Send data using the relevant transport protocol.
Definition: ftp_server_transport.c:146
void ftpServerAcceptDataChannel(FtpClientConnection *connection)
Accept data connection.
Definition: ftp_server_data.c:364
error_t socketSetTimeout(Socket *socket, systime_t timeout)
Set timeout value for blocking operations.
Definition: socket.c:148
void ftpServerProcessDataChannelEvents(FtpClientConnection *connection, uint_t eventFlags)
Data connection event handler.
Definition: ftp_server_data.c:137
Debugging facilities.
void pathCombine(char_t *path, const char_t *more, size_t maxLen)
Concatenate two paths.
Definition: path.c:394
void ftpServerWriteDataChannel(FtpClientConnection *connection)
Write data to the data connection.
Definition: ftp_server_data.c:453