#include "setup.h"#include <stdio.h>#include <string.h>#include <stdlib.h>#include <stdarg.h>#include <ctype.h>#include <curl/curl.h>#include "urldata.h"#include "sendf.h"#include "easyif.h"#include "if2ip.h"#include "hostip.h"#include "progress.h"#include "transfer.h"#include "escape.h"#include "http.h"#include "socks.h"#include "ftp.h"#include "strtoofft.h"#include "strequal.h"#include "sslgen.h"#include "connect.h"#include "strerror.h"#include "memory.h"#include "inet_ntop.h"#include "select.h"#include "parsedate.h"#include "sockaddr.h"#include "multiif.h"#include <curl/mprintf.h>Go to the source code of this file.
| #define FTPSENDF | ( | x, | |||
| y, | |||||
| z | ) |
Value:
if ((result = Curl_ftpsendf(x,y,z)) != CURLE_OK) \ return result
Definition at line 138 of file ftp.c.
Referenced by ftp_sendquote().
| #define lastline | ( | line | ) |
Value:
Definition at line 278 of file ftp.c.
Referenced by Curl_GetFTPResponse(), and ftp_readresp().
| #define NBFTPSENDF | ( | x, | |||
| y, | |||||
| z | ) |
Value:
if ((result = Curl_nbftpsendf(x,y,z)) != CURLE_OK) \ return result
Definition at line 140 of file ftp.c.
Referenced by ftp_nb_type(), ftp_quit(), ftp_state_cwd(), ftp_state_loggedin(), ftp_state_pasv_resp(), ftp_state_post_cwd(), ftp_state_post_listtype(), ftp_state_post_retr_size(), ftp_state_post_size(), ftp_state_post_type(), ftp_state_pwd(), ftp_state_quote(), ftp_state_rest_resp(), ftp_state_ul_setup(), ftp_state_user(), ftp_state_user_resp(), and ftp_statemach_act().
| #define NEWHOST_BUFSIZE 48 |
Referenced by ftp_state_pasv_resp().
| #define NIFLAGS NI_NUMERICHOST | NI_NUMERICSERV |
| #define SBUF_SIZE 1024 |
Referenced by Curl_ftpsendf(), and Curl_nbftpsendf().
| static CURLcode AllowServerConnect | ( | struct connectdata * | conn | ) | [static] |
Definition at line 185 of file ftp.c.
References asio::detail::socket_ops::accept(), UserDefined::connecttimeout, Curl_nonblock(), CURL_SOCKET_BAD, Curl_socket_ready(), Curl_tvdiff, Curl_tvnow, CURLE_FTP_PORT_FAILED, CURLE_OK, CURLE_OPERATION_TIMEDOUT, connectdata::data, failf, asio::detail::socket_ops::getsockname(), infof, connectdata::now, simple_client::s, sclose, SECONDARYSOCKET, SessionHandle::set, connectdata::sock, socklen_t, UserDefined::timeout, and TRUE.
Referenced by ftp_state_get_resp(), and ftp_state_stor_resp().
| CURLcode Curl_ftp | ( | struct connectdata * | conn, | |
| bool * | done | |||
| ) |
Definition at line 3478 of file ftp.c.
References CURLE_OK, FALSE, ftp_init(), ftp_parse_url_path(), and ftp_regular_transfer().
Referenced by CreateConnection().
| CURLcode Curl_ftp_connect | ( | struct connectdata * | conn, | |
| bool * | done | |||
| ) |
Definition at line 2942 of file ftp.c.
References connectdata::bits, ConnectBits::close, Curl_ftp_disconnect(), Curl_ftp_multi_statemach(), Curl_proxyCONNECT(), Curl_ssl_connect(), Curl_tvnow, CURLE_OK, connectdata::data, FALSE, FIRSTSOCKET, free, HandleData::ftp, ftp_easy_statemach(), ftp_init(), ftp_respinit(), FTP_WAIT220, connectdata::ftpc, connectdata::host, HandleData::http, ConnectBits::httpproxy, hostname::name, NULL, PROT_FTPS, HandleData::proto, connectdata::proto, connectdata::protocol, connectdata::remote_port, SessionHandle::reqdata, ftp_conn::response, ftp_conn::response_time, SessionHandle::state, state(), TRUE, ConnectBits::tunnel_proxy, and UrlState::used_interface.
Referenced by CreateConnection().
| CURLcode Curl_ftp_disconnect | ( | struct connectdata * | conn | ) |
Definition at line 3675 of file ftp.c.
References ftp_conn::cache, CURLE_OK, connectdata::data, ftp_conn::entrypath, free, freedirs(), HandleData::ftp, ftp_quit(), connectdata::ftpc, UrlState::most_recent_ftp_entrypath, NULL, ftp_conn::prevpath, HandleData::proto, connectdata::proto, SessionHandle::reqdata, and SessionHandle::state.
Referenced by CreateConnection(), and Curl_ftp_connect().
| CURLcode Curl_ftp_doing | ( | struct connectdata * | conn, | |
| bool * | dophase_done | |||
| ) |
Definition at line 3907 of file ftp.c.
References Curl_ftp_multi_statemach(), connectdata::data, DEBUGF, FALSE, ftp_dophase_done(), and infof.
Referenced by CreateConnection().
| CURLcode Curl_ftp_done | ( | struct connectdata * | conn, | |
| CURLcode | status, | |||
| bool | premature | |||
| ) |
Definition at line 3031 of file ftp.c.
References connectdata::bits, FTP::bytecountp, ConnectBits::close, UserDefined::crlf, UrlState::crlf_conversions, ftp_conn::ctl_valid, CURL_DO_LINEEND_CONV, curl_easy_unescape(), Curl_GetFTPResponse(), Curl_sec_fflush_fd(), CURL_SOCKET_BAD, CURLE_BAD_DOWNLOAD_RESUME, CURLE_FILESIZE_EXCEEDED, CURLE_FTP_ACCESS_DENIED, CURLE_FTP_COULDNT_RETR_FILE, CURLE_FTP_COULDNT_SET_BINARY, CURLE_FTP_COULDNT_STOR_FILE, CURLE_FTP_PORT_FAILED, CURLE_FTP_WEIRD_PASV_REPLY, CURLE_OK, CURLE_OPERATION_TIMEDOUT, CURLE_PARTIAL_FILE, ftp_conn::cwdfail, connectdata::data, ftp_conn::dont_check, failf, FALSE, FTP::file, FORMAT_OFF_T, free, freedirs(), HandleData::ftp, ftp_sendquote(), connectdata::ftpc, UserDefined::infilesize, infof, HandleData::keep, Curl_transfer_keeper::maxdownload, FTP::no_transfer, NULL, HandleData::path, UserDefined::postquote, ftp_conn::prevpath, connectdata::proto, HandleData::proto, SessionHandle::reqdata, ftp_conn::response_time, sclose, SECONDARYSOCKET, SessionHandle::set, asio::detail::socket_ops::shutdown(), Curl_transfer_keeper::size, connectdata::sock, ssize_t, SessionHandle::state, TRUE, and UserDefined::upload.
Referenced by CreateConnection().
| int Curl_ftp_getsock | ( | struct connectdata * | conn, | |
| curl_socket_t * | socks, | |||
| int | numsocks | |||
| ) |
Definition at line 777 of file ftp.c.
References FIRSTSOCKET, connectdata::ftpc, GETSOCK_BLANK, GETSOCK_READSOCK, GETSOCK_WRITESOCK, connectdata::proto, ftp_conn::sendleft, and connectdata::sock.
Referenced by CreateConnection().
| CURLcode Curl_ftp_multi_statemach | ( | struct connectdata * | conn, | |
| bool * | done | |||
| ) |
Definition at line 2833 of file ftp.c.
References CURL_SOCKET_BAD, Curl_socket_ready(), CURLE_OK, CURLE_OPERATION_TIMEDOUT, CURLE_OUT_OF_MEMORY, connectdata::data, failf, FALSE, FIRSTSOCKET, ftp_state_timeout(), ftp_statemach_act(), FTP_STOP, connectdata::ftpc, connectdata::proto, ftp_conn::sendleft, connectdata::sock, and ftp_conn::state.
Referenced by CreateConnection(), Curl_ftp_connect(), Curl_ftp_doing(), and ftp_perform().
| CURLcode Curl_ftp_nextconnect | ( | struct connectdata * | conn | ) |
Definition at line 3366 of file ftp.c.
References Curl_setup_transfer(), CURLE_OK, connectdata::data, DEBUGF, FTP::downloadsize, FALSE, FTP::file, HandleData::ftp, ftp_easy_statemach(), UserDefined::ftp_list_only, FTP_LIST_TYPE, ftp_nb_type(), ftp_range(), FTP_RETR_TYPE, FTP_STOR_TYPE, infof, FTP::no_transfer, NULL, UserDefined::prefer_ascii, HandleData::proto, SessionHandle::reqdata, SessionHandle::set, and UserDefined::upload.
Referenced by CreateConnection(), and ftp_dophase_done().
| CURLcode Curl_ftpsendf | ( | struct connectdata * | conn, | |
| const char * | fmt, | |||
| ... | ||||
| ) |
Definition at line 3586 of file ftp.c.
References Curl_convert_to_network(), Curl_debug(), Curl_write(), CURLE_OK, CURLINFO_HEADER_OUT, connectdata::data, FIRSTSOCKET, simple_client::s, SBUF_SIZE, SessionHandle::set, connectdata::sock, ssize_t, and UserDefined::verbose.
| CURLcode Curl_GetFTPResponse | ( | ssize_t * | nreadp, | |
| struct connectdata * | conn, | |||
| int * | ftpcode | |||
| ) |
BANG
Definition at line 464 of file ftp.c.
References UrlState::buffer, BUFSIZE, ftp_conn::cache, ftp_conn::cache_size, CLIENTWRITE_HEADER, Curl_client_write(), Curl_convert_from_network(), Curl_debug(), Curl_pgrsUpdate(), Curl_read(), Curl_sec_read_msg(), CURL_SOCKET_BAD, Curl_socket_ready(), Curl_tvdiff, Curl_tvnow, CURLE_ABORTED_BY_CALLBACK, CURLE_OK, CURLE_OPERATION_TIMEDOUT, CURLE_OUT_OF_MEMORY, CURLE_RECV_ERROR, CURLINFO_HEADER_IN, connectdata::data, failf, FALSE, FIRSTSOCKET, free, UserDefined::ftp_response_timeout, connectdata::ftpc, Curl_transfer_keeper::headerbytecount, PureInfo::httpcode, SessionHandle::info, HandleData::keep, lastline, malloc, n, connectdata::now, NULL, connectdata::proto, SessionHandle::reqdata, ftp_conn::response_time, connectdata::sec_complete, SessionHandle::set, connectdata::sock, SOCKERRNO, ssize_t, SessionHandle::state, UserDefined::timeout, TRUE, and UserDefined::verbose.
Referenced by Curl_ftp_done(), and ftp_sendquote().
| CURLcode Curl_nbftpsendf | ( | struct connectdata * | conn, | |
| const char * | fmt, | |||
| ... | ||||
| ) |
Definition at line 3514 of file ftp.c.
References Curl_convert_to_network(), Curl_debug(), Curl_tvnow, Curl_write(), CURLE_OK, CURLE_OUT_OF_MEMORY, CURLINFO_HEADER_OUT, connectdata::data, failf, FIRSTSOCKET, ftp_respinit(), connectdata::ftpc, malloc, connectdata::proto, ftp_conn::response, simple_client::s, SBUF_SIZE, ftp_conn::sendleft, ftp_conn::sendsize, ftp_conn::sendthis, SessionHandle::set, connectdata::sock, ssize_t, and UserDefined::verbose.
Referenced by ftp_state_use_pasv(), ftp_state_use_port(), and ftp_statemach_act().
| static void freedirs | ( | struct connectdata * | conn | ) | [static] |
Definition at line 143 of file ftp.c.
References connectdata::data, ftp_conn::dirdepth, ftp_conn::dirs, FTP::file, free, HandleData::ftp, connectdata::ftpc, NULL, HandleData::proto, connectdata::proto, and SessionHandle::reqdata.
Referenced by Curl_ftp_disconnect(), Curl_ftp_done(), ftp_parse_url_path(), and ftp_regular_transfer().
| static CURLcode ftp_dophase_done | ( | struct connectdata * | conn, | |
| bool | connected | |||
| ) | [static] |
Definition at line 3877 of file ftp.c.
References connectdata::bits, ftp_conn::ctl_valid, Curl_ftp_nextconnect(), Curl_setup_transfer(), CURL_SOCKET_BAD, CURLE_OK, connectdata::data, ConnectBits::do_more, FALSE, HandleData::ftp, connectdata::ftpc, FTP::no_transfer, NULL, connectdata::proto, HandleData::proto, SessionHandle::reqdata, sclose, SECONDARYSOCKET, connectdata::sock, and TRUE.
Referenced by Curl_ftp_doing(), and ftp_regular_transfer().
| static CURLcode ftp_easy_statemach | ( | struct connectdata * | conn | ) | [static] |
Definition at line 2867 of file ftp.c.
References CURL_SOCKET_BAD, Curl_socket_ready(), CURLE_OK, CURLE_OPERATION_TIMEDOUT, CURLE_OUT_OF_MEMORY, connectdata::data, failf, FIRSTSOCKET, ftp_state_timeout(), ftp_statemach_act(), FTP_STOP, connectdata::ftpc, connectdata::proto, ftp_conn::sendleft, connectdata::sock, and ftp_conn::state.
Referenced by Curl_ftp_connect(), Curl_ftp_nextconnect(), ftp_perform(), and ftp_quit().
| static CURLcode ftp_init | ( | struct connectdata * | conn | ) | [static] |
Definition at line 2909 of file ftp.c.
References Curl_transfer_keeper::bytecount, FTP::bytecountp, calloc, CURLE_OK, CURLE_OUT_OF_MEMORY, CURLE_URL_MALFORMAT, connectdata::data, HandleData::ftp, isBadFtpString(), HandleData::keep, connectdata::passwd, FTP::passwd, HandleData::proto, SessionHandle::reqdata, connectdata::user, and FTP::user.
Referenced by Curl_ftp(), and Curl_ftp_connect().
| static CURLcode ftp_nb_type | ( | struct connectdata * | conn, | |
| bool | ascii, | |||
| ftpstate | state | |||
| ) | [static] |
Definition at line 3260 of file ftp.c.
References CURLE_OK, ftp_state_type_resp(), connectdata::ftpc, NBFTPSENDF, connectdata::proto, state(), and ftp_conn::transfertype.
Referenced by Curl_ftp_nextconnect(), and ftp_state_post_mdtm().
| static int ftp_need_type | ( | struct connectdata * | conn, | |
| bool | ascii | |||
| ) | [static] |
Definition at line 3246 of file ftp.c.
References connectdata::ftpc, connectdata::proto, and ftp_conn::transfertype.
Referenced by ftp_state_post_mdtm().
| static CURLcode ftp_parse_url_path | ( | struct connectdata * | conn | ) | [static] |
Definition at line 3718 of file ftp.c.
References calloc, ftp_conn::ctl_valid, curl_easy_unescape(), curl_strnequal(), CURLE_OK, CURLE_OUT_OF_MEMORY, CURLE_URL_MALFORMAT, ftp_conn::cwddone, ftp_conn::cwdfail, connectdata::data, ftp_conn::diralloc, ftp_conn::dirdepth, ftp_conn::dirs, failf, FALSE, FTP::file, free, freedirs(), HandleData::ftp, UserDefined::ftp_filemethod, connectdata::ftpc, FTPFILE_MULTICWD, FTPFILE_NOCWD, FTPFILE_SINGLECWD, infof, isBadFtpString(), FTP::no_transfer, NULL, HandleData::path, ftp_conn::prevpath, connectdata::proto, HandleData::proto, realloc, SessionHandle::reqdata, SessionHandle::set, strdup, strequal, TRUE, and UserDefined::upload.
Referenced by Curl_ftp().
| static void ftp_pasv_verbose | ( | struct connectdata * | conn, | |
| Curl_addrinfo * | ai, | |||
| char * | newhost, | |||
| int | port | |||
| ) | [static] |
Definition at line 3291 of file ftp.c.
References Curl_printable_address(), connectdata::data, and infof.
Referenced by ftp_state_pasv_resp().
| static CURLcode ftp_perform | ( | struct connectdata * | conn, | |
| bool * | connected, | |||
| bool * | dophase_done | |||
| ) | [static] |
Definition at line 3431 of file ftp.c.
References connectdata::bits, Curl_ftp_multi_statemach(), CURLE_OK, connectdata::data, DEBUGF, FALSE, HandleData::ftp, ftp_easy_statemach(), FTP_QUOTE, ftp_state_quote(), infof, ConnectBits::no_body, FTP::no_transfer, HandleData::proto, SessionHandle::reqdata, SessionHandle::state, ConnectBits::tcpconnect, TRUE, and UrlState::used_interface.
Referenced by ftp_regular_transfer().
| static CURLcode ftp_quit | ( | struct connectdata * | conn | ) | [static] |
Definition at line 3654 of file ftp.c.
References ftp_conn::ctl_valid, CURLE_OK, ftp_easy_statemach(), FTP_QUIT, connectdata::ftpc, NBFTPSENDF, NULL, connectdata::proto, and state().
Referenced by Curl_ftp_disconnect().
| static CURLcode ftp_range | ( | struct connectdata * | conn | ) | [static] |
Definition at line 3307 of file ftp.c.
References CURLE_OK, curlx_strtoofft, connectdata::data, DEBUGF, ftp_conn::dont_check, FORMAT_OFF_T, connectdata::ftpc, infof, ISSPACE, HandleData::maxdownload, connectdata::proto, HandleData::range, SessionHandle::reqdata, HandleData::resume_from, TRUE, and HandleData::use_range.
Referenced by Curl_ftp_nextconnect().
| static CURLcode ftp_readresp | ( | curl_socket_t | sockfd, | |
| struct connectdata * | conn, | |||
| int * | ftpcode, | |||
| size_t * | size | |||
| ) | [static] |
BANG
Definition at line 281 of file ftp.c.
References UrlState::buffer, BUFSIZE, ftp_conn::cache, ftp_conn::cache_size, CLIENTWRITE_HEADER, Curl_client_write(), Curl_convert_from_network(), Curl_debug(), Curl_read(), Curl_sec_read_msg(), CURLE_OK, CURLE_OUT_OF_MEMORY, CURLE_RECV_ERROR, CURLINFO_HEADER_IN, connectdata::data, failf, FALSE, free, connectdata::ftpc, Curl_transfer_keeper::headerbytecount, PureInfo::httpcode, SessionHandle::info, HandleData::keep, lastline, ftp_conn::linestart_resp, malloc, n, ftp_conn::nread_resp, NULL, connectdata::proto, SessionHandle::reqdata, connectdata::sec_complete, SessionHandle::set, ssize_t, SessionHandle::state, TRUE, and UserDefined::verbose.
Referenced by ftp_statemach_act().
| static CURLcode ftp_regular_transfer | ( | struct connectdata * | conn, | |
| bool * | done | |||
| ) | [static] |
Definition at line 3934 of file ftp.c.
References ftp_conn::ctl_valid, Curl_pgrsSetDownloadCounter(), Curl_pgrsSetDownloadSize(), Curl_pgrsSetUploadCounter(), Curl_pgrsSetUploadSize(), CURLE_OK, connectdata::data, freedirs(), ftp_dophase_done(), ftp_perform(), connectdata::ftpc, connectdata::proto, SessionHandle::reqdata, HandleData::size, and TRUE.
Referenced by Curl_ftp().
| static void ftp_respinit | ( | struct connectdata * | conn | ) | [static] |
Definition at line 270 of file ftp.c.
References UrlState::buffer, connectdata::data, connectdata::ftpc, ftp_conn::linestart_resp, ftp_conn::nread_resp, connectdata::proto, and SessionHandle::state.
Referenced by Curl_ftp_connect(), and Curl_nbftpsendf().
| static CURLcode ftp_sendquote | ( | struct connectdata * | conn, | |
| struct curl_slist * | quote | |||
| ) | [static] |
Definition at line 3212 of file ftp.c.
References Curl_GetFTPResponse(), CURLE_FTP_QUOTE_ERROR, CURLE_OK, connectdata::data, curl_slist::data, failf, FTPSENDF, curl_slist::next, and ssize_t.
Referenced by Curl_ftp_done().
| static CURLcode ftp_state_acct_resp | ( | struct connectdata * | conn, | |
| int | ftpcode | |||
| ) | [static] |
Definition at line 2419 of file ftp.c.
References CURLE_FTP_WEIRD_PASS_REPLY, CURLE_OK, connectdata::data, failf, and ftp_state_loggedin().
Referenced by ftp_statemach_act().
| static CURLcode ftp_state_cwd | ( | struct connectdata * | conn | ) | [static] |
Definition at line 803 of file ftp.c.
References connectdata::bits, ftp_conn::count1, ftp_conn::count2, CURLE_OK, ftp_conn::cwddone, ftp_conn::dirdepth, ftp_conn::dirs, ftp_conn::entrypath, FTP_CWD, ftp_state_post_cwd(), connectdata::ftpc, NBFTPSENDF, connectdata::proto, ConnectBits::reuse, and state().
Referenced by ftp_state_quote().
| static CURLcode ftp_state_get_resp | ( | struct connectdata * | conn, | |
| int | ftpcode, | |||
| ftpstate | instate | |||
| ) | [static] |
Definition at line 2196 of file ftp.c.
References AllowServerConnect(), UrlState::buffer, FTP::bytecountp, Curl_setup_transfer(), Curl_ssl_connect(), CURLE_FTP_COULDNT_RETR_FILE, CURLE_OK, curlx_strtoofft, connectdata::data, FTP::downloadsize, failf, FALSE, FORMAT_OFF_T, HandleData::ftp, FTP_LIST, FTP_STOP, UserDefined::ftp_use_port, infof, ISDIGIT, HandleData::maxdownload, FTP::no_transfer, NULL, UserDefined::prefer_ascii, HandleData::proto, SessionHandle::reqdata, SECONDARYSOCKET, SessionHandle::set, HandleData::size, connectdata::ssl, state(), SessionHandle::state, TRUE, and ssl_connect_data::use.
Referenced by ftp_statemach_act().
| static CURLcode ftp_state_loggedin | ( | struct connectdata * | conn | ) | [static] |
Definition at line 2322 of file ftp.c.
References Curl_krb_kauth(), CURLE_OK, connectdata::data, FIRSTSOCKET, FTP_PBSZ, ftp_state_pwd(), UserDefined::krb, NBFTPSENDF, connectdata::passwd, SessionHandle::set, connectdata::ssl, state(), and ssl_connect_data::use.
Referenced by ftp_state_acct_resp(), and ftp_state_user_resp().
| static CURLcode ftp_state_mdtm_resp | ( | struct connectdata * | conn, | |
| int | ftpcode | |||
| ) | [static] |
Definition at line 1872 of file ftp.c.
References connectdata::bits, asio::buffer(), UrlState::buffer, BUFSIZE, CLIENTWRITE_BOTH, Curl_client_write(), curl_getdate(), Curl_month, CURL_TIMECOND_IFMODSINCE, CURL_TIMECOND_IFUNMODSINCE, Curl_wkday, CURLE_FTP_COULDNT_RETR_FILE, CURLE_OK, connectdata::data, failf, FTP::file, PureInfo::filetime, HandleData::ftp, ftp_state_post_mdtm(), FTP_STOP, UserDefined::get_filetime, HAVE_GMTIME_R, UserDefined::include_header, SessionHandle::info, infof, ConnectBits::no_body, FTP::no_transfer, NULL, HandleData::proto, SessionHandle::reqdata, SessionHandle::set, state(), SessionHandle::state, UserDefined::timecondition, UserDefined::timevalue, and TRUE.
Referenced by ftp_statemach_act().
| static CURLcode ftp_state_pasv_resp | ( | struct connectdata * | conn, | |
| int | ftpcode | |||
| ) | [static] |
Definition at line 1591 of file ftp.c.
References Curl_dns_entry::addr, connectdata::bits, UrlState::buffer, ftp_conn::count1, Curl_connecthost(), Curl_proxyCONNECT(), Curl_resolv(), Curl_resolv_unlock(), Curl_SOCKS4(), Curl_SOCKS5(), Curl_wait_for_resolv(), CURLE_COULDNT_CONNECT, CURLE_FTP_CANT_GET_HOST, CURLE_FTP_WEIRD_227_FORMAT, CURLE_FTP_WEIRD_PASV_REPLY, CURLE_OK, CURLPROXY_HTTP, CURLPROXY_SOCKS4, CURLPROXY_SOCKS5, CURLRESOLV_PENDING, connectdata::data, UrlState::errorbuf, failf, FALSE, HandleData::ftp, ftp_pasv_verbose(), UserDefined::ftp_skip_ip, FTP_STOP, ConnectBits::ftp_use_epsv, connectdata::ftpc, connectdata::host, HandleData::http, ConnectBits::httpproxy, infof, ip, connectdata::ip_addr_str, hostname::name, NBFTPSENDF, NEWHOST_BUFSIZE, NULL, connectdata::port, HandleData::proto, connectdata::proto, connectdata::proxy, UserDefined::proxy, connectdata::proxypasswd, UserDefined::proxytype, connectdata::proxyuser, SessionHandle::reqdata, SECONDARYSOCKET, SessionHandle::set, connectdata::sock, state(), SessionHandle::state, ConnectBits::tcpconnect, ConnectBits::tunnel_proxy, and UserDefined::verbose.
Referenced by ftp_statemach_act().
| static CURLcode ftp_state_port_resp | ( | struct connectdata * | conn, | |
| int | ftpcode | |||
| ) | [static] |
Definition at line 1839 of file ftp.c.
References connectdata::bits, ftp_conn::count1, CURLE_FTP_PORT_FAILED, CURLE_OK, connectdata::data, DONE, EPRT, failf, FALSE, ftp_state_use_port(), FTP_STOP, ConnectBits::ftp_use_eprt, connectdata::ftpc, infof, connectdata::proto, and state().
Referenced by ftp_statemach_act().
| static CURLcode ftp_state_post_cwd | ( | struct connectdata * | conn | ) | [static] |
Definition at line 1410 of file ftp.c.
References CURLE_OK, connectdata::data, FTP::file, HandleData::ftp, FTP_MDTM, ftp_state_post_mdtm(), UserDefined::get_filetime, NBFTPSENDF, HandleData::proto, SessionHandle::reqdata, SessionHandle::set, state(), and UserDefined::timecondition.
Referenced by ftp_state_cwd(), and ftp_statemach_act().
| static CURLcode ftp_state_post_listtype | ( | struct connectdata * | conn | ) | [static] |
Definition at line 1338 of file ftp.c.
References CURLE_OK, UserDefined::customrequest, connectdata::data, FTP_LIST, UserDefined::ftp_list_only, NBFTPSENDF, SessionHandle::set, and state().
Referenced by ftp_state_type_resp().
| static CURLcode ftp_state_post_mdtm | ( | struct connectdata * | conn | ) | [static] |
Definition at line 1379 of file ftp.c.
References connectdata::bits, CURLE_OK, connectdata::data, FTP::file, HandleData::ftp, ftp_nb_type(), ftp_need_type(), ftp_state_post_type(), FTP_TYPE, UserDefined::include_header, ConnectBits::no_body, FTP::no_transfer, UserDefined::prefer_ascii, HandleData::proto, SessionHandle::reqdata, SessionHandle::set, and TRUE.
Referenced by ftp_state_mdtm_resp(), and ftp_state_post_cwd().
| static CURLcode ftp_state_post_rest | ( | struct connectdata * | conn | ) | [static] |
Definition at line 1275 of file ftp.c.
References CURLE_OK, connectdata::data, EPRT, HandleData::ftp, FTP_RETR_PREQUOTE, ftp_state_quote(), ftp_state_use_pasv(), ftp_state_use_port(), UserDefined::ftp_use_port, FTP::no_transfer, HandleData::proto, SessionHandle::reqdata, SessionHandle::set, state(), and TRUE.
Referenced by ftp_state_post_size(), and ftp_state_rest_resp().
| static CURLcode ftp_state_post_retr_size | ( | struct connectdata * | conn, | |
| curl_off_t | filesize | |||
| ) | [static] |
Definition at line 2002 of file ftp.c.
References Curl_setup_transfer(), CURLE_BAD_DOWNLOAD_RESUME, CURLE_FILESIZE_EXCEEDED, CURLE_OK, connectdata::data, FTP::downloadsize, failf, FALSE, FTP::file, FORMAT_OFF_T, HandleData::ftp, FTP_RETR, FTP_RETR_REST, FTP_STOP, infof, UserDefined::max_filesize, NBFTPSENDF, FTP::no_transfer, NULL, HandleData::proto, SessionHandle::reqdata, HandleData::resume_from, SessionHandle::set, state(), and TRUE.
Referenced by ftp_state_size_resp().
| static CURLcode ftp_state_post_retrtype | ( | struct connectdata * | conn | ) | [static] |
Definition at line 1357 of file ftp.c.
References CURLE_OK, FTP_RETR_PREQUOTE, ftp_state_quote(), and TRUE.
Referenced by ftp_state_type_resp().
| static CURLcode ftp_state_post_size | ( | struct connectdata * | conn | ) | [static] |
Definition at line 1299 of file ftp.c.
References CURLE_OK, connectdata::data, HandleData::ftp, FTP_REST, ftp_state_post_rest(), NBFTPSENDF, FTP::no_transfer, HandleData::proto, SessionHandle::reqdata, and state().
Referenced by ftp_state_post_type(), and ftp_state_size_resp().
| static CURLcode ftp_state_post_stortype | ( | struct connectdata * | conn | ) | [static] |
Definition at line 1368 of file ftp.c.
References CURLE_OK, ftp_state_quote(), FTP_STOR_PREQUOTE, and TRUE.
Referenced by ftp_state_type_resp().
| static CURLcode ftp_state_post_type | ( | struct connectdata * | conn | ) | [static] |
Definition at line 1319 of file ftp.c.
References CURLE_OK, connectdata::data, FTP::file, HandleData::ftp, FTP_SIZE, ftp_state_post_size(), NBFTPSENDF, FTP::no_transfer, HandleData::proto, SessionHandle::reqdata, and state().
Referenced by ftp_state_post_mdtm(), and ftp_state_type_resp().
| static CURLcode ftp_state_pwd | ( | struct connectdata * | conn | ) | [static] |
Definition at line 765 of file ftp.c.
References CURLE_OK, FTP_PWD, NBFTPSENDF, NULL, and state().
Referenced by ftp_state_loggedin(), and ftp_statemach_act().
| static CURLcode ftp_state_quote | ( | struct connectdata * | conn, | |
| bool | init, | |||
| ftpstate | instate | |||
| ) | [static] |
Definition at line 1520 of file ftp.c.
References ftp_conn::count1, CURLE_OK, curl_slist::data, connectdata::data, FALSE, FTP::file, HandleData::ftp, FTP_POSTQUOTE, FTP_QUOTE, FTP_RETR_PREQUOTE, FTP_RETR_SIZE, ftp_state_cwd(), ftp_state_ul_setup(), FTP_STOP, FTP_STOR_PREQUOTE, connectdata::ftpc, NBFTPSENDF, curl_slist::next, FTP::no_transfer, UserDefined::postquote, UserDefined::prequote, connectdata::proto, HandleData::proto, UserDefined::quote, SessionHandle::reqdata, SessionHandle::set, state(), and TRUE.
Referenced by ftp_perform(), ftp_state_post_rest(), ftp_state_post_retrtype(), ftp_state_post_stortype(), and ftp_statemach_act().
| static CURLcode ftp_state_rest_resp | ( | struct connectdata * | conn, | |
| int | ftpcode, | |||
| ftpstate | instate | |||
| ) | [static] |
Definition at line 2115 of file ftp.c.
References CLIENTWRITE_BOTH, Curl_client_write(), CURLE_FTP_COULDNT_USE_REST, CURLE_OK, connectdata::data, failf, FTP::file, HandleData::ftp, FTP_REST, FTP_RETR, FTP_RETR_REST, ftp_state_post_rest(), NBFTPSENDF, HandleData::proto, SessionHandle::reqdata, and state().
Referenced by ftp_statemach_act().
| static CURLcode ftp_state_size_resp | ( | struct connectdata * | conn, | |
| int | ftpcode, | |||
| ftpstate | instate | |||
| ) | [static] |
Definition at line 2083 of file ftp.c.
References UrlState::buffer, CLIENTWRITE_BOTH, Curl_client_write(), CURLE_OK, curlx_strtoofft, connectdata::data, FORMAT_OFF_T, FTP_RETR_SIZE, FTP_SIZE, ftp_state_post_retr_size(), ftp_state_post_size(), ftp_state_ul_setup(), FTP_STOR_SIZE, NULL, SessionHandle::reqdata, HandleData::resume_from, SessionHandle::state, and TRUE.
Referenced by ftp_statemach_act().
| static CURLcode ftp_state_stor_resp | ( | struct connectdata * | conn, | |
| int | ftpcode | |||
| ) | [static] |
Definition at line 2150 of file ftp.c.
References AllowServerConnect(), FTP::bytecountp, Curl_pgrsSetUploadSize(), Curl_setup_transfer(), Curl_ssl_connect(), CURLE_FTP_COULDNT_STOR_FILE, CURLE_OK, connectdata::data, failf, FALSE, HandleData::ftp, FTP_STOP, UserDefined::ftp_use_port, UserDefined::infilesize, infof, NULL, HandleData::proto, SessionHandle::reqdata, SECONDARYSOCKET, SessionHandle::set, connectdata::ssl, state(), and ssl_connect_data::use.
Referenced by ftp_statemach_act().
| static long ftp_state_timeout | ( | struct connectdata * | conn | ) | [static] |
Definition at line 2805 of file ftp.c.
References Curl_tvdiff, Curl_tvnow, connectdata::data, UserDefined::ftp_response_timeout, connectdata::ftpc, connectdata::now, connectdata::proto, ftp_conn::response, ftp_conn::response_time, SessionHandle::set, and UserDefined::timeout.
Referenced by Curl_ftp_multi_statemach(), and ftp_easy_statemach().
| static CURLcode ftp_state_type_resp | ( | struct connectdata * | conn, | |
| int | ftpcode, | |||
| ftpstate | instate | |||
| ) | [static] |
Definition at line 1972 of file ftp.c.
References CURLE_FTP_COULDNT_SET_BINARY, CURLE_OK, connectdata::data, failf, FTP_LIST_TYPE, FTP_RETR_TYPE, ftp_state_post_listtype(), ftp_state_post_retrtype(), ftp_state_post_stortype(), ftp_state_post_type(), FTP_STOR_TYPE, FTP_TYPE, and infof.
Referenced by ftp_nb_type(), and ftp_statemach_act().
| static CURLcode ftp_state_ul_setup | ( | struct connectdata * | conn, | |
| bool | sizechecked | |||
| ) | [static] |
Definition at line 1433 of file ftp.c.
References UrlState::buffer, BUFSIZE, Curl_setup_transfer(), CURLE_FTP_COULDNT_USE_REST, CURLE_OK, connectdata::data, failf, FALSE, FTP::file, FORMAT_OFF_T, connectdata::fread, connectdata::fread_in, HandleData::ftp, UserDefined::ftp_append, FTP_STOP, FTP_STOR, FTP_STOR_SIZE, UserDefined::infilesize, infof, NBFTPSENDF, FTP::no_transfer, NULL, HandleData::proto, SessionHandle::reqdata, HandleData::resume_from, SessionHandle::set, SessionHandle::state, state(), and TRUE.
Referenced by ftp_state_quote(), and ftp_state_size_resp().
| static CURLcode ftp_state_use_pasv | ( | struct connectdata * | conn | ) | [static] |
Definition at line 1231 of file ftp.c.
References connectdata::bits, ftp_conn::count1, Curl_nbftpsendf(), CURLE_OK, connectdata::data, FTP_PASV, ConnectBits::ftp_use_epsv, connectdata::ftpc, infof, ConnectBits::ipv6, NULL, connectdata::proto, state(), and TRUE.
Referenced by ftp_state_post_rest().
| static CURLcode ftp_state_use_port | ( | struct connectdata * | conn, | |
| ftpport | fcmd | |||
| ) | [static] |
Definition at line 845 of file ftp.c.
References Curl_dns_entry::addr, Curl_addrinfo::ai_addr, asio::detail::socket_ops::bind(), connectdata::bits, ftp_conn::count1, Curl_freeaddrinfo(), Curl_if2ip(), CURL_INADDR_NONE, Curl_inet_ntop(), Curl_ip2addr(), Curl_nbftpsendf(), Curl_printable_address(), Curl_resolv(), Curl_resolv_unlock(), CURL_SOCKET_BAD, Curl_strerror(), Curl_wait_for_resolv(), CURLE_FTP_PORT_FAILED, CURLE_OK, CURLRESOLV_PENDING, connectdata::data, DONE, EPRT, libtorrent::dht::messages::error, failf, FALSE, FIRSTSOCKET, FTP_PORT, ConnectBits::ftp_use_eprt, connectdata::ftpc, UserDefined::ftpport, asio::detail::socket_ops::getnameinfo(), asio::detail::socket_ops::getsockname(), simple_client::h, in_addr_t, infof, ip, ConnectBits::ipv6, asio::detail::socket_ops::listen(), NIFLAGS, NULL, PORT, connectdata::proto, sclose, SECONDARYSOCKET, SessionHandle::set, connectdata::sock, SOCKERRNO, asio::detail::socket_ops::socket(), socklen_t, connectdata::socktype, state(), ConnectBits::tcpconnect, and TRUE.
Referenced by ftp_state_port_resp(), and ftp_state_post_rest().
| static CURLcode ftp_state_user | ( | struct connectdata * | conn | ) | [static] |
Definition at line 752 of file ftp.c.
References CURLE_OK, connectdata::data, FALSE, HandleData::ftp, UrlState::ftp_trying_alternative, FTP_USER, NBFTPSENDF, HandleData::proto, SessionHandle::reqdata, SessionHandle::state, state(), and FTP::user.
Referenced by ftp_statemach_act().
| static CURLcode ftp_state_user_resp | ( | struct connectdata * | conn, | |
| int | ftpcode, | |||
| ftpstate | instate | |||
| ) | [static] |
Definition at line 2364 of file ftp.c.
References CURLE_LOGIN_DENIED, CURLE_OK, connectdata::data, failf, HandleData::ftp, UserDefined::ftp_account, FTP_ACCT, UserDefined::ftp_alternative_to_user, FTP_PASS, ftp_state_loggedin(), UrlState::ftp_trying_alternative, FTP_USER, connectdata::ftpc, NBFTPSENDF, FTP::passwd, connectdata::proto, HandleData::proto, SessionHandle::reqdata, SessionHandle::set, SessionHandle::state, state(), ftp_conn::state, and TRUE.
Referenced by ftp_statemach_act().
| static CURLcode ftp_statemach_act | ( | struct connectdata * | conn | ) | [static] |
Definition at line 2435 of file ftp.c.
References UrlState::buffer, ftp_conn::count1, ftp_conn::count2, ftp_conn::count3, Curl_nbftpsendf(), Curl_sec_login(), Curl_sec_request_prot(), Curl_ssl_connect(), Curl_ssl_shutdown(), Curl_tvnow, Curl_write(), CURLE_FAILED_INIT, CURLE_FTP_ACCESS_DENIED, CURLE_FTP_QUOTE_ERROR, CURLE_FTP_SSL_FAILED, CURLE_FTP_WEIRD_SERVER_REPLY, CURLE_OK, CURLE_OUT_OF_MEMORY, CURLFTPAUTH_DEFAULT, CURLFTPAUTH_SSL, CURLFTPAUTH_TLS, CURLFTPSSL_CONTROL, CURLFTPSSL_TRY, ftp_conn::cwdfail, connectdata::data, DEBUGF, ftp_conn::dirdepth, ftp_conn::dirs, ftp_conn::entrypath, failf, FALSE, FIRSTSOCKET, free, FTP_ACCT, FTP_AUTH, FTP_CCC, UserDefined::ftp_ccc, UserDefined::ftp_create_missing_dirs, FTP_CWD, FTP_LIST, FTP_LIST_TYPE, FTP_MDTM, FTP_MKD, FTP_PASS, FTP_PASV, FTP_PBSZ, FTP_PORT, FTP_POSTQUOTE, FTP_PROT, FTP_PWD, FTP_QUIT, FTP_QUOTE, ftp_readresp(), FTP_REST, FTP_RETR, FTP_RETR_PREQUOTE, FTP_RETR_REST, FTP_RETR_SIZE, FTP_RETR_TYPE, FTP_SIZE, UserDefined::ftp_ssl, ftp_state_acct_resp(), ftp_state_get_resp(), ftp_state_mdtm_resp(), ftp_state_pasv_resp(), ftp_state_port_resp(), ftp_state_post_cwd(), ftp_state_pwd(), ftp_state_quote(), ftp_state_rest_resp(), ftp_state_size_resp(), ftp_state_stor_resp(), ftp_state_type_resp(), ftp_state_user(), ftp_state_user_resp(), FTP_STOP, FTP_STOR, FTP_STOR_PREQUOTE, FTP_STOR_SIZE, FTP_STOR_TYPE, FTP_TYPE, FTP_USER, FTP_WAIT220, connectdata::ftpc, UserDefined::ftpsslauth, infof, UserDefined::krb, UserDefined::krb_level, malloc, UrlState::most_recent_ftp_entrypath, NBFTPSENDF, NULL, PROT_FTPS, connectdata::proto, connectdata::protocol, ftp_conn::response, SECONDARYSOCKET, ftp_conn::sendleft, ftp_conn::sendsize, ftp_conn::sendthis, SessionHandle::set, connectdata::sock, ssize_t, connectdata::ssl, SessionHandle::state, state(), ftp_conn::state, TRUE, and ssl_connect_data::use.
Referenced by Curl_ftp_multi_statemach(), and ftp_easy_statemach().
| static bool isBadFtpString | ( | const char * | string | ) | [static] |
Definition at line 171 of file ftp.c.
References NULL.
Referenced by ftp_init(), and ftp_parse_url_path().
| static void state | ( | struct connectdata * | conn, | |
| ftpstate | state | |||
| ) | [static] |
Definition at line 703 of file ftp.c.
References connectdata::data, connectdata::ftpc, infof, connectdata::proto, and ftp_conn::state.
Referenced by bind_torrent_status(), CBaseStreamControl::CheckStreamState(), fsInternetDownloader::CreateAdditionalSection(), Curl_ftp_connect(), Curl_parsenetrc(), Curl_tftp(), Curl_tftp_connect(), libtorrent::torrent::filter_pieces(), ftp_nb_type(), ftp_quit(), ftp_state_cwd(), ftp_state_get_resp(), ftp_state_loggedin(), ftp_state_mdtm_resp(), ftp_state_pasv_resp(), ftp_state_port_resp(), ftp_state_post_cwd(), ftp_state_post_listtype(), ftp_state_post_rest(), ftp_state_post_retr_size(), ftp_state_post_size(), ftp_state_post_type(), ftp_state_pwd(), ftp_state_quote(), ftp_state_rest_resp(), ftp_state_stor_resp(), ftp_state_ul_setup(), ftp_state_use_pasv(), ftp_state_use_port(), ftp_state_user(), ftp_state_user_resp(), ftp_statemach_act(), fsInternetDownloader::GetDoneSectionCount(), fsInternetDownloader::GetDownloadingSectionCount(), fsInternetDownloader::GetStoppedSectionCount(), inflate(), inflate_fast(), inflateBack(), inflateBackInit_(), inflateCopy(), inflateEnd(), inflateGetHeader(), inflateInit2_(), inflatePrime(), inflateReset(), inflateSetDictionary(), inflateSync(), inflateSyncPoint(), fsInternetDownloader::IsAllSectionsOk(), fsInternetDownloader::IsDone(), fsInternetDownloader::IsDownloading(), fsInternetDownloader::LaunchOneMoreSection(), multi_runsingle(), CListCtrlEx::OnParentNotify(), CChildView::OnUpdatePluginCommand(), fsInternetDownloader::RemoveMirror(), fsDownloadMgr::SaveState(), and updatewindow().
1.5.6