123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- #ifndef HEADER_CURL_FTP_H
- #define HEADER_CURL_FTP_H
- #include "pingpong.h"
- #ifndef CURL_DISABLE_FTP
- extern const struct Curl_handler Curl_handler_ftp;
- #ifdef USE_SSL
- extern const struct Curl_handler Curl_handler_ftps;
- #endif
- CURLcode Curl_ftpsend(struct connectdata *, const char *cmd);
- CURLcode Curl_GetFTPResponse(ssize_t *nread, struct connectdata *conn,
- int *ftpcode);
- #endif
- typedef enum {
- FTP_STOP,
- FTP_WAIT220,
- FTP_AUTH,
- FTP_USER,
- FTP_PASS,
- FTP_ACCT,
- FTP_PBSZ,
- FTP_PROT,
- FTP_CCC,
- FTP_PWD,
- FTP_SYST,
- FTP_NAMEFMT,
- FTP_QUOTE,
- FTP_RETR_PREQUOTE,
- FTP_STOR_PREQUOTE,
- FTP_POSTQUOTE,
- FTP_CWD,
- FTP_MKD,
- FTP_MDTM,
- FTP_TYPE,
- FTP_LIST_TYPE,
- FTP_RETR_TYPE,
- FTP_STOR_TYPE,
- FTP_SIZE,
- FTP_RETR_SIZE,
- FTP_STOR_SIZE,
- FTP_REST,
- FTP_RETR_REST,
- FTP_PORT,
- FTP_PRET,
- FTP_PASV,
- FTP_LIST,
- FTP_RETR,
- FTP_STOR,
- FTP_QUIT,
- FTP_LAST
- } ftpstate;
- struct ftp_parselist_data;
- struct ftp_wc {
- struct ftp_parselist_data *parser;
- struct {
- curl_write_callback write_function;
- FILE *file_descriptor;
- } backup;
- };
- typedef enum {
- FTPFILE_MULTICWD = 1,
- FTPFILE_NOCWD = 2,
- FTPFILE_SINGLECWD = 3
- } curl_ftpfile;
- struct FTP {
- curl_off_t *bytecountp;
- char *user;
- char *passwd;
-
- curl_pp_transfer transfer;
- curl_off_t downloadsize;
- };
- struct ftp_conn {
- struct pingpong pp;
- char *entrypath;
- char **dirs;
- int dirdepth;
- int diralloc;
- char *file;
- bool dont_check;
- bool ctl_valid;
- bool cwddone;
- int cwdcount;
- bool cwdfail;
- bool wait_data_conn;
- char *prevpath;
- curl_ftpfile prevmethod;
- char transfertype;
- int count1;
- int count2;
- int count3;
- ftpstate state;
- ftpstate state_saved;
- curl_off_t retr_size_saved;
- char *server_os;
- curl_off_t known_filesize;
-
- char *newhost;
- unsigned short newport;
- };
- #define DEFAULT_ACCEPT_TIMEOUT 60000
- #endif
|