1CURLOPT_FTP_USE_EPRT(3)    curl_easy_setopt options    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 en‐
12       abled);
13

DESCRIPTION

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

DEFAULT

PROTOCOLS

EXAMPLE

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

AVAILABILITY

43       Added in 7.10.5
44

RETURN VALUE

46       Returns CURLE_OK
47

SEE ALSO

49       CURLOPT_FTP_USE_EPSV(3), CURLOPT_FTPPORT(3),
50
51
52
53libcurl 7.79.1                September 08, 2021       CURLOPT_FTP_USE_EPRT(3)
Impressum