1CURLOPT_FTP_USE_EPSV(3)    curl_easy_setopt options    CURLOPT_FTP_USE_EPSV(3)
2
3
4

NAME

6       CURLOPT_FTP_USE_EPSV - enable/disable use of EPSV
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode   curl_easy_setopt(CURL  *handle,  CURLOPT_FTP_USE_EPSV,  long
12       epsv);
13

DESCRIPTION

15       Pass epsv as a long. If the value is 1, it tells curl to use  the  EPSV
16       command  when  doing  passive FTP downloads (which it does by default).
17       Using EPSV means that it will first attempt to use  EPSV  before  using
18       PASV,  but if you pass zero to this option, it will not try using EPSV,
19       only plain PASV.
20
21       If the server is an IPv6 host, this option will have no  effect  as  of
22       7.12.3.
23

DEFAULT

25       1
26

PROTOCOLS

28       FTP
29

EXAMPLE

31       CURL *curl = curl_easy_init();
32       if(curl) {
33         curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/old-server/file.txt");
34
35         /* let's shut off this modern feature */
36         curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, 0L);
37
38         ret = curl_easy_perform(curl);
39
40         curl_easy_cleanup(curl);
41       }
42

AVAILABILITY

44       Along with FTP
45

RETURN VALUE

47       Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not.
48

SEE ALSO

50       CURLOPT_FTP_USE_EPRT(3), CURLOPT_FTPPORT(3),
51
52
53
54libcurl 7.61.1                   May 05, 2017          CURLOPT_FTP_USE_EPSV(3)
Impressum