1CURLOPT_FTP_USE_EPRT(3)             libcurl            CURLOPT_FTP_USE_EPRT(3)
2
3
4

NAME

6       CURLOPT_FTP_USE_EPRT - use EPRT for FTP
7

SYNOPSIS

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

DESCRIPTION

14       Pass  a  long. If the value is 1, it tells curl to use the EPRT command
15       when doing active FTP  downloads  (which  is  enabled  by  CURLOPT_FTP‐
16       PORT(3)).  Using  EPRT means that it will first attempt to use EPRT be‐
17       fore using PORT, but if you pass zero to this option, it will  not  try
18       using EPRT, only plain PORT.
19
20       If  the server is an IPv6 host, this option will have no effect as EPRT
21       is necessary then.
22

DEFAULT

PROTOCOLS

EXAMPLE

26       CURL *curl = curl_easy_init();
27       if(curl) {
28         curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
29
30         /* contact us back, aka "active" FTP */
31         curl_easy_setopt(curl, CURLOPT_FTPPORT, "-");
32
33         /* FTP the way the neanderthals did it */
34         curl_easy_setopt(curl, CURLOPT_FTP_USE_EPRT, 0L);
35
36         ret = curl_easy_perform(curl);
37
38         curl_easy_cleanup(curl);
39       }
40

AVAILABILITY

42       Added in 7.10.5
43

RETURN VALUE

45       Returns CURLE_OK
46

SEE ALSO

48       CURLOPT_FTP_USE_EPSV(3), CURLOPT_FTPPORT(3),
49
50
51
52ibcurl 8.2.1                    April 26, 2023         CURLOPT_FTP_USE_EPRT(3)
Impressum