1CURLOPT_FTP_SKIP_PASV_IP(3)curl_easy_setopt optionsCURLOPT_FTP_SKIP_PASV_IP(3)
2
3
4

NAME

6       CURLOPT_FTP_SKIP_PASV_IP - ignore the IP address in the PASV response
7

SYNOPSIS

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

DESCRIPTION

15       Pass a long. If skip is set to 1, it instructs libcurl to not  use  the
16       IP  address  the  server suggests in its 227-response to libcurl's PASV
17       command when libcurl connects the data connection. Instead libcurl will
18       re-use  the same IP address it already uses for the control connection.
19       But it will use the port number from the 227-response.
20
21       This option thus allows libcurl to work around broken server  installa‐
22       tions  that  due to NATs, firewalls or incompetence report the wrong IP
23       address back.
24
25       This option has no effect if PORT, EPRT or  EPSV  is  used  instead  of
26       PASV.
27

DEFAULT

29       0
30

PROTOCOLS

32       FTP
33

EXAMPLE

35       CURL *curl = curl_easy_init();
36       if(curl) {
37         curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
38
39         /* please ignore the IP in the PASV response */
40         curl_easy_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, 1L);
41         ret = curl_easy_perform(curl);
42
43         curl_easy_cleanup(curl);
44       }
45

AVAILABILITY

47       Added in 7.14.2
48

RETURN VALUE

50       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
51       if not.
52

SEE ALSO

54       CURLOPT_FTPPORT(3), CURLOPT_FTP_USE_EPRT(3),
55
56
57
58libcurl 7.61.1                   May 05, 2017      CURLOPT_FTP_SKIP_PASV_IP(3)
Impressum