25#ifndef DETERMINISTICESPASYNCWEBSERVER_FTP_H
26#define DETERMINISTICESPASYNCWEBSERVER_FTP_H
45size_t ftp_build_command(
char *buf,
size_t cap,
const char *verb,
const char *arg);
51size_t ftp_build_port(
char *buf,
size_t cap,
const uint8_t ip[4], uint16_t port);
59size_t ftp_build_eprt(
char *buf,
size_t cap,
const char *ip_str,
bool ipv6, uint16_t port);
71bool ftp_parse_reply(
const char *buf,
size_t len,
int *code,
size_t *consumed);
81bool ftp_parse_pasv(
const char *buf,
size_t len, uint8_t ip[4], uint16_t *port);
90bool ftp_parse_epsv(
const char *buf,
size_t len, uint16_t *port);
93static inline int ftp_reply_class(
int code)
95 return (code >= 100 && code <= 599) ? code / 100 : 0;
99static inline bool ftp_reply_ok(
int code)
101 return ftp_reply_class(code) == 2;
User-facing configuration for DeterministicESPAsyncWebServer.