DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
ftp.h File Reference

FTP client wire codec (RFC 959 + RFC 2428 + RFC 3659), DETWS_ENABLE_FTP. More...

#include "ServerConfig.h"

Go to the source code of this file.

Detailed Description

FTP client wire codec (RFC 959 + RFC 2428 + RFC 3659), DETWS_ENABLE_FTP.

The pure protocol layer of an FTP client: build control-channel commands, parse the (possibly multiline) 3-digit reply, and decode the PASV / EPSV data-channel address the server hands back. A device can then push/pull files - e.g. drip a .nc program to a CNC controller's FTP program store (Fanuc / Haas / Mazak / Heidenhain all expose one), fetch a config, or archive a log. No heap, no stdlib; the two sockets (control + data) are the application's - this is only the bytes on the wire, so it is fully host-testable.

FTP replies (RFC 959 sec 4.2): a single line is NNN<SP>text<CRLF>; a multiline reply is NNN-text<CRLF> continuation lines ... <CRLF> and a final NNN<SP>text<CRLF> (the same code followed by a space marks the end). Passive mode: 227 ...(h1,h2,h3,h4,p1,p2) gives the data address (ip = h1.h2.h3.h4, port = p1*256+p2); extended passive 229 ...(|||port|) (RFC 2428) gives just the port on the control host.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file ftp.h.