1CURLOPT_FTP_USE_EPSV(3) curl_easy_setopt options CURLOPT_FTP_USE_EPSV(3)
2
3
4
6 CURLOPT_FTP_USE_EPSV - use EPSV for FTP
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_EPSV, long epsv);
12
14 Pass epsv as a long. If the value is 1, it tells curl to use the EPSV
15 command when doing passive FTP downloads (which it does by default).
16 Using EPSV means that it will first attempt to use EPSV before using
17 PASV, but if you pass zero to this option, it will not try using EPSV,
18 only plain PASV.
19
20 If the server is an IPv6 host, this option will have no effect as of
21 7.12.3.
22
24 1
25
27 FTP
28
30 CURL *curl = curl_easy_init();
31 if(curl) {
32 curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/old-server/file.txt");
33
34 /* let's shut off this modern feature */
35 curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, 0L);
36
37 ret = curl_easy_perform(curl);
38
39 curl_easy_cleanup(curl);
40 }
41
43 Along with FTP
44
46 Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not.
47
49 CURLOPT_FTP_USE_EPRT(3), CURLOPT_FTPPORT(3),
50
51
52
53libcurl 7.85.0 May 17, 2022 CURLOPT_FTP_USE_EPSV(3)