ftp_server_control.c
FTP server (command processing)
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.
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 ftpServerAcceptControlChannel(FtpServerContext *context)
Accept control connection.
Definition: ftp_server_control.c:277
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 socketShutdown(Socket *socket, uint_t how)
Disable reception, transmission, or both.
Definition: socket.c:2020
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
void ftpServerProcessCommand(FtpClientConnection *connection)
FTP command processing.
Definition: ftp_server_commands.c:54
NetInterface * socketGetInterface(Socket *socket)
Retrieve the underlying interface.
Definition: socket.c:1293
void ftpServerCloseControlChannel(FtpClientConnection *connection)
Close control connection.
Definition: ftp_server_control.c:417
void ftpServerRegisterControlChannelEvents(FtpClientConnection *connection, SocketEventDesc *eventDesc)
Register control connection events.
Definition: ftp_server_control.c:52
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
error_t socketSetTimeout(Socket *socket, systime_t timeout)
Set timeout value for blocking operations.
Definition: socket.c:148
FTP control connection.
Debugging facilities.
void ftpServerProcessControlChannelEvents(FtpClientConnection *connection, uint_t eventFlags)
Control connection event handler.
Definition: ftp_server_control.c:143