1 | #ifndef CURLINC_CURL_H
|
---|
2 | #define CURLINC_CURL_H
|
---|
3 | /***************************************************************************
|
---|
4 | * _ _ ____ _
|
---|
5 | * Project ___| | | | _ \| |
|
---|
6 | * / __| | | | |_) | |
|
---|
7 | * | (__| |_| | _ <| |___
|
---|
8 | * \___|\___/|_| \_\_____|
|
---|
9 | *
|
---|
10 | * Copyright (C) Daniel Stenberg, <[email protected]>, et al.
|
---|
11 | *
|
---|
12 | * This software is licensed as described in the file COPYING, which
|
---|
13 | * you should have received as part of this distribution. The terms
|
---|
14 | * are also available at https://curl.se/docs/copyright.html.
|
---|
15 | *
|
---|
16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
---|
17 | * copies of the Software, and permit persons to whom the Software is
|
---|
18 | * furnished to do so, under the terms of the COPYING file.
|
---|
19 | *
|
---|
20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
---|
21 | * KIND, either express or implied.
|
---|
22 | *
|
---|
23 | * SPDX-License-Identifier: curl
|
---|
24 | *
|
---|
25 | ***************************************************************************/
|
---|
26 |
|
---|
27 | /*
|
---|
28 | * If you have libcurl problems, all docs and details are found here:
|
---|
29 | * https://curl.se/libcurl/
|
---|
30 | */
|
---|
31 |
|
---|
32 | #ifdef CURL_NO_OLDIES
|
---|
33 | #define CURL_STRICTER
|
---|
34 | #endif
|
---|
35 |
|
---|
36 | /* Compile-time deprecation macros. */
|
---|
37 | #if defined(__GNUC__) && \
|
---|
38 | ((__GNUC__ > 12) || ((__GNUC__ == 12) && (__GNUC_MINOR__ >= 1 ))) && \
|
---|
39 | !defined(__INTEL_COMPILER) && \
|
---|
40 | !defined(CURL_DISABLE_DEPRECATION) && !defined(BUILDING_LIBCURL)
|
---|
41 | #define CURL_DEPRECATED(version, message) \
|
---|
42 | __attribute__((deprecated("since " # version ". " message)))
|
---|
43 | #define CURL_IGNORE_DEPRECATION(statements) \
|
---|
44 | _Pragma("GCC diagnostic push") \
|
---|
45 | _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
|
---|
46 | statements \
|
---|
47 | _Pragma("GCC diagnostic pop")
|
---|
48 | #else
|
---|
49 | #define CURL_DEPRECATED(version, message)
|
---|
50 | #define CURL_IGNORE_DEPRECATION(statements) statements
|
---|
51 | #endif
|
---|
52 |
|
---|
53 | #include "curlver.h" /* libcurl version defines */
|
---|
54 | #include "system.h" /* determine things run-time */
|
---|
55 |
|
---|
56 | /*
|
---|
57 | * Define CURL_WIN32 when build target is Win32 API
|
---|
58 | */
|
---|
59 |
|
---|
60 | #if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && \
|
---|
61 | !defined(__SYMBIAN32__)
|
---|
62 | #define CURL_WIN32
|
---|
63 | #endif
|
---|
64 |
|
---|
65 | #include <stdio.h>
|
---|
66 | #include <limits.h>
|
---|
67 |
|
---|
68 | #if (defined(__FreeBSD__) && (__FreeBSD__ >= 2)) || defined(__MidnightBSD__)
|
---|
69 | /* Needed for __FreeBSD_version or __MidnightBSD_version symbol definition */
|
---|
70 | #include <osreldate.h>
|
---|
71 | #endif
|
---|
72 |
|
---|
73 | /* The include stuff here below is mainly for time_t! */
|
---|
74 | #include <sys/types.h>
|
---|
75 | #include <time.h>
|
---|
76 |
|
---|
77 | #if defined(CURL_WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
|
---|
78 | #if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \
|
---|
79 | defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H))
|
---|
80 | /* The check above prevents the winsock2 inclusion if winsock.h already was
|
---|
81 | included, since they can't co-exist without problems */
|
---|
82 | # ifdef VBOX
|
---|
83 | # include <iprt/win/winsock2.h>
|
---|
84 | # include <iprt/win/ws2tcpip.h>
|
---|
85 | # else
|
---|
86 | #include <winsock2.h>
|
---|
87 | #include <ws2tcpip.h>
|
---|
88 | # endif
|
---|
89 | #endif
|
---|
90 | #endif
|
---|
91 |
|
---|
92 | /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
|
---|
93 | libc5-based Linux systems. Only include it on systems that are known to
|
---|
94 | require it! */
|
---|
95 | #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
|
---|
96 | defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
|
---|
97 | defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
|
---|
98 | defined(__CYGWIN__) || defined(AMIGA) || defined(__NuttX__) || \
|
---|
99 | (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) || \
|
---|
100 | (defined(__MidnightBSD_version) && (__MidnightBSD_version < 100000)) || \
|
---|
101 | defined(__sun__) || defined(__serenity__)
|
---|
102 | #include <sys/select.h>
|
---|
103 | #endif
|
---|
104 |
|
---|
105 | #if !defined(CURL_WIN32) && !defined(_WIN32_WCE)
|
---|
106 | #include <sys/socket.h>
|
---|
107 | #endif
|
---|
108 |
|
---|
109 | #if !defined(CURL_WIN32)
|
---|
110 | #include <sys/time.h>
|
---|
111 | #endif
|
---|
112 |
|
---|
113 | /* Compatibility for non-Clang compilers */
|
---|
114 | #ifndef __has_declspec_attribute
|
---|
115 | # define __has_declspec_attribute(x) 0
|
---|
116 | #endif
|
---|
117 |
|
---|
118 | #ifdef __cplusplus
|
---|
119 | extern "C" {
|
---|
120 | #endif
|
---|
121 |
|
---|
122 | #if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
|
---|
123 | typedef struct Curl_easy CURL;
|
---|
124 | typedef struct Curl_share CURLSH;
|
---|
125 | #else
|
---|
126 | typedef void CURL;
|
---|
127 | typedef void CURLSH;
|
---|
128 | #endif
|
---|
129 |
|
---|
130 | /*
|
---|
131 | * libcurl external API function linkage decorations.
|
---|
132 | */
|
---|
133 |
|
---|
134 | #ifdef CURL_STATICLIB
|
---|
135 | # define CURL_EXTERN
|
---|
136 | #elif defined(CURL_WIN32) || defined(__SYMBIAN32__) || \
|
---|
137 | (__has_declspec_attribute(dllexport) && \
|
---|
138 | __has_declspec_attribute(dllimport))
|
---|
139 | # if defined(BUILDING_LIBCURL)
|
---|
140 | # define CURL_EXTERN __declspec(dllexport)
|
---|
141 | # else
|
---|
142 | # define CURL_EXTERN __declspec(dllimport)
|
---|
143 | # endif
|
---|
144 | #elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
|
---|
145 | # define CURL_EXTERN CURL_EXTERN_SYMBOL
|
---|
146 | #else
|
---|
147 | # define CURL_EXTERN
|
---|
148 | #endif
|
---|
149 |
|
---|
150 | #ifndef curl_socket_typedef
|
---|
151 | /* socket typedef */
|
---|
152 | #if defined(CURL_WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)
|
---|
153 | typedef SOCKET curl_socket_t;
|
---|
154 | #define CURL_SOCKET_BAD INVALID_SOCKET
|
---|
155 | #else
|
---|
156 | typedef int curl_socket_t;
|
---|
157 | #define CURL_SOCKET_BAD -1
|
---|
158 | #endif
|
---|
159 | #define curl_socket_typedef
|
---|
160 | #endif /* curl_socket_typedef */
|
---|
161 |
|
---|
162 | /* enum for the different supported SSL backends */
|
---|
163 | typedef enum {
|
---|
164 | CURLSSLBACKEND_NONE = 0,
|
---|
165 | CURLSSLBACKEND_OPENSSL = 1,
|
---|
166 | CURLSSLBACKEND_GNUTLS = 2,
|
---|
167 | CURLSSLBACKEND_NSS = 3,
|
---|
168 | CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */
|
---|
169 | CURLSSLBACKEND_GSKIT = 5,
|
---|
170 | CURLSSLBACKEND_POLARSSL CURL_DEPRECATED(7.69.0, "") = 6,
|
---|
171 | CURLSSLBACKEND_WOLFSSL = 7,
|
---|
172 | CURLSSLBACKEND_SCHANNEL = 8,
|
---|
173 | CURLSSLBACKEND_SECURETRANSPORT = 9,
|
---|
174 | CURLSSLBACKEND_AXTLS CURL_DEPRECATED(7.61.0, "") = 10,
|
---|
175 | CURLSSLBACKEND_MBEDTLS = 11,
|
---|
176 | CURLSSLBACKEND_MESALINK CURL_DEPRECATED(7.82.0, "") = 12,
|
---|
177 | CURLSSLBACKEND_BEARSSL = 13,
|
---|
178 | CURLSSLBACKEND_RUSTLS = 14
|
---|
179 | } curl_sslbackend;
|
---|
180 |
|
---|
181 | /* aliases for library clones and renames */
|
---|
182 | #define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL
|
---|
183 | #define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL
|
---|
184 |
|
---|
185 | /* deprecated names: */
|
---|
186 | #define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL
|
---|
187 | #define CURLSSLBACKEND_DARWINSSL CURLSSLBACKEND_SECURETRANSPORT
|
---|
188 |
|
---|
189 | struct curl_httppost {
|
---|
190 | struct curl_httppost *next; /* next entry in the list */
|
---|
191 | char *name; /* pointer to allocated name */
|
---|
192 | long namelength; /* length of name length */
|
---|
193 | char *contents; /* pointer to allocated data contents */
|
---|
194 | long contentslength; /* length of contents field, see also
|
---|
195 | CURL_HTTPPOST_LARGE */
|
---|
196 | char *buffer; /* pointer to allocated buffer contents */
|
---|
197 | long bufferlength; /* length of buffer field */
|
---|
198 | char *contenttype; /* Content-Type */
|
---|
199 | struct curl_slist *contentheader; /* list of extra headers for this form */
|
---|
200 | struct curl_httppost *more; /* if one field name has more than one
|
---|
201 | file, this link should link to following
|
---|
202 | files */
|
---|
203 | long flags; /* as defined below */
|
---|
204 |
|
---|
205 | /* specified content is a file name */
|
---|
206 | #define CURL_HTTPPOST_FILENAME (1<<0)
|
---|
207 | /* specified content is a file name */
|
---|
208 | #define CURL_HTTPPOST_READFILE (1<<1)
|
---|
209 | /* name is only stored pointer do not free in formfree */
|
---|
210 | #define CURL_HTTPPOST_PTRNAME (1<<2)
|
---|
211 | /* contents is only stored pointer do not free in formfree */
|
---|
212 | #define CURL_HTTPPOST_PTRCONTENTS (1<<3)
|
---|
213 | /* upload file from buffer */
|
---|
214 | #define CURL_HTTPPOST_BUFFER (1<<4)
|
---|
215 | /* upload file from pointer contents */
|
---|
216 | #define CURL_HTTPPOST_PTRBUFFER (1<<5)
|
---|
217 | /* upload file contents by using the regular read callback to get the data and
|
---|
218 | pass the given pointer as custom pointer */
|
---|
219 | #define CURL_HTTPPOST_CALLBACK (1<<6)
|
---|
220 | /* use size in 'contentlen', added in 7.46.0 */
|
---|
221 | #define CURL_HTTPPOST_LARGE (1<<7)
|
---|
222 |
|
---|
223 | char *showfilename; /* The file name to show. If not set, the
|
---|
224 | actual file name will be used (if this
|
---|
225 | is a file part) */
|
---|
226 | void *userp; /* custom pointer used for
|
---|
227 | HTTPPOST_CALLBACK posts */
|
---|
228 | curl_off_t contentlen; /* alternative length of contents
|
---|
229 | field. Used if CURL_HTTPPOST_LARGE is
|
---|
230 | set. Added in 7.46.0 */
|
---|
231 | };
|
---|
232 |
|
---|
233 |
|
---|
234 | /* This is a return code for the progress callback that, when returned, will
|
---|
235 | signal libcurl to continue executing the default progress function */
|
---|
236 | #define CURL_PROGRESSFUNC_CONTINUE 0x10000001
|
---|
237 |
|
---|
238 | /* This is the CURLOPT_PROGRESSFUNCTION callback prototype. It is now
|
---|
239 | considered deprecated but was the only choice up until 7.31.0 */
|
---|
240 | typedef int (*curl_progress_callback)(void *clientp,
|
---|
241 | double dltotal,
|
---|
242 | double dlnow,
|
---|
243 | double ultotal,
|
---|
244 | double ulnow);
|
---|
245 |
|
---|
246 | /* This is the CURLOPT_XFERINFOFUNCTION callback prototype. It was introduced
|
---|
247 | in 7.32.0, avoids the use of floating point numbers and provides more
|
---|
248 | detailed information. */
|
---|
249 | typedef int (*curl_xferinfo_callback)(void *clientp,
|
---|
250 | curl_off_t dltotal,
|
---|
251 | curl_off_t dlnow,
|
---|
252 | curl_off_t ultotal,
|
---|
253 | curl_off_t ulnow);
|
---|
254 |
|
---|
255 | #ifndef CURL_MAX_READ_SIZE
|
---|
256 | /* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */
|
---|
257 | #define CURL_MAX_READ_SIZE (10*1024*1024)
|
---|
258 | #endif
|
---|
259 |
|
---|
260 | #ifndef CURL_MAX_WRITE_SIZE
|
---|
261 | /* Tests have proven that 20K is a very bad buffer size for uploads on
|
---|
262 | Windows, while 16K for some odd reason performed a lot better.
|
---|
263 | We do the ifndef check to allow this value to easier be changed at build
|
---|
264 | time for those who feel adventurous. The practical minimum is about
|
---|
265 | 400 bytes since libcurl uses a buffer of this size as a scratch area
|
---|
266 | (unrelated to network send operations). */
|
---|
267 | #define CURL_MAX_WRITE_SIZE 16384
|
---|
268 | #endif
|
---|
269 |
|
---|
270 | #ifndef CURL_MAX_HTTP_HEADER
|
---|
271 | /* The only reason to have a max limit for this is to avoid the risk of a bad
|
---|
272 | server feeding libcurl with a never-ending header that will cause reallocs
|
---|
273 | infinitely */
|
---|
274 | #define CURL_MAX_HTTP_HEADER (100*1024)
|
---|
275 | #endif
|
---|
276 |
|
---|
277 | /* This is a magic return code for the write callback that, when returned,
|
---|
278 | will signal libcurl to pause receiving on the current transfer. */
|
---|
279 | #define CURL_WRITEFUNC_PAUSE 0x10000001
|
---|
280 |
|
---|
281 | /* This is a magic return code for the write callback that, when returned,
|
---|
282 | will signal an error from the callback. */
|
---|
283 | #define CURL_WRITEFUNC_ERROR 0xFFFFFFFF
|
---|
284 |
|
---|
285 | typedef size_t (*curl_write_callback)(char *buffer,
|
---|
286 | size_t size,
|
---|
287 | size_t nitems,
|
---|
288 | void *outstream);
|
---|
289 |
|
---|
290 | /* This callback will be called when a new resolver request is made */
|
---|
291 | typedef int (*curl_resolver_start_callback)(void *resolver_state,
|
---|
292 | void *reserved, void *userdata);
|
---|
293 |
|
---|
294 | /* enumeration of file types */
|
---|
295 | typedef enum {
|
---|
296 | CURLFILETYPE_FILE = 0,
|
---|
297 | CURLFILETYPE_DIRECTORY,
|
---|
298 | CURLFILETYPE_SYMLINK,
|
---|
299 | CURLFILETYPE_DEVICE_BLOCK,
|
---|
300 | CURLFILETYPE_DEVICE_CHAR,
|
---|
301 | CURLFILETYPE_NAMEDPIPE,
|
---|
302 | CURLFILETYPE_SOCKET,
|
---|
303 | CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */
|
---|
304 |
|
---|
305 | CURLFILETYPE_UNKNOWN /* should never occur */
|
---|
306 | } curlfiletype;
|
---|
307 |
|
---|
308 | #define CURLFINFOFLAG_KNOWN_FILENAME (1<<0)
|
---|
309 | #define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1)
|
---|
310 | #define CURLFINFOFLAG_KNOWN_TIME (1<<2)
|
---|
311 | #define CURLFINFOFLAG_KNOWN_PERM (1<<3)
|
---|
312 | #define CURLFINFOFLAG_KNOWN_UID (1<<4)
|
---|
313 | #define CURLFINFOFLAG_KNOWN_GID (1<<5)
|
---|
314 | #define CURLFINFOFLAG_KNOWN_SIZE (1<<6)
|
---|
315 | #define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7)
|
---|
316 |
|
---|
317 | /* Information about a single file, used when doing FTP wildcard matching */
|
---|
318 | struct curl_fileinfo {
|
---|
319 | char *filename;
|
---|
320 | curlfiletype filetype;
|
---|
321 | time_t time; /* always zero! */
|
---|
322 | unsigned int perm;
|
---|
323 | int uid;
|
---|
324 | int gid;
|
---|
325 | curl_off_t size;
|
---|
326 | long int hardlinks;
|
---|
327 |
|
---|
328 | struct {
|
---|
329 | /* If some of these fields is not NULL, it is a pointer to b_data. */
|
---|
330 | char *time;
|
---|
331 | char *perm;
|
---|
332 | char *user;
|
---|
333 | char *group;
|
---|
334 | char *target; /* pointer to the target filename of a symlink */
|
---|
335 | } strings;
|
---|
336 |
|
---|
337 | unsigned int flags;
|
---|
338 |
|
---|
339 | /* used internally */
|
---|
340 | char *b_data;
|
---|
341 | size_t b_size;
|
---|
342 | size_t b_used;
|
---|
343 | };
|
---|
344 |
|
---|
345 | /* return codes for CURLOPT_CHUNK_BGN_FUNCTION */
|
---|
346 | #define CURL_CHUNK_BGN_FUNC_OK 0
|
---|
347 | #define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */
|
---|
348 | #define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */
|
---|
349 |
|
---|
350 | /* if splitting of data transfer is enabled, this callback is called before
|
---|
351 | download of an individual chunk started. Note that parameter "remains" works
|
---|
352 | only for FTP wildcard downloading (for now), otherwise is not used */
|
---|
353 | typedef long (*curl_chunk_bgn_callback)(const void *transfer_info,
|
---|
354 | void *ptr,
|
---|
355 | int remains);
|
---|
356 |
|
---|
357 | /* return codes for CURLOPT_CHUNK_END_FUNCTION */
|
---|
358 | #define CURL_CHUNK_END_FUNC_OK 0
|
---|
359 | #define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */
|
---|
360 |
|
---|
361 | /* If splitting of data transfer is enabled this callback is called after
|
---|
362 | download of an individual chunk finished.
|
---|
363 | Note! After this callback was set then it have to be called FOR ALL chunks.
|
---|
364 | Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC.
|
---|
365 | This is the reason why we don't need "transfer_info" parameter in this
|
---|
366 | callback and we are not interested in "remains" parameter too. */
|
---|
367 | typedef long (*curl_chunk_end_callback)(void *ptr);
|
---|
368 |
|
---|
369 | /* return codes for FNMATCHFUNCTION */
|
---|
370 | #define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */
|
---|
371 | #define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */
|
---|
372 | #define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */
|
---|
373 |
|
---|
374 | /* callback type for wildcard downloading pattern matching. If the
|
---|
375 | string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */
|
---|
376 | typedef int (*curl_fnmatch_callback)(void *ptr,
|
---|
377 | const char *pattern,
|
---|
378 | const char *string);
|
---|
379 |
|
---|
380 | /* These are the return codes for the seek callbacks */
|
---|
381 | #define CURL_SEEKFUNC_OK 0
|
---|
382 | #define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */
|
---|
383 | #define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so
|
---|
384 | libcurl might try other means instead */
|
---|
385 | typedef int (*curl_seek_callback)(void *instream,
|
---|
386 | curl_off_t offset,
|
---|
387 | int origin); /* 'whence' */
|
---|
388 |
|
---|
389 | /* This is a return code for the read callback that, when returned, will
|
---|
390 | signal libcurl to immediately abort the current transfer. */
|
---|
391 | #define CURL_READFUNC_ABORT 0x10000000
|
---|
392 | /* This is a return code for the read callback that, when returned, will
|
---|
393 | signal libcurl to pause sending data on the current transfer. */
|
---|
394 | #define CURL_READFUNC_PAUSE 0x10000001
|
---|
395 |
|
---|
396 | /* Return code for when the trailing headers' callback has terminated
|
---|
397 | without any errors */
|
---|
398 | #define CURL_TRAILERFUNC_OK 0
|
---|
399 | /* Return code for when was an error in the trailing header's list and we
|
---|
400 | want to abort the request */
|
---|
401 | #define CURL_TRAILERFUNC_ABORT 1
|
---|
402 |
|
---|
403 | typedef size_t (*curl_read_callback)(char *buffer,
|
---|
404 | size_t size,
|
---|
405 | size_t nitems,
|
---|
406 | void *instream);
|
---|
407 |
|
---|
408 | typedef int (*curl_trailer_callback)(struct curl_slist **list,
|
---|
409 | void *userdata);
|
---|
410 |
|
---|
411 | typedef enum {
|
---|
412 | CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */
|
---|
413 | CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
|
---|
414 | CURLSOCKTYPE_LAST /* never use */
|
---|
415 | } curlsocktype;
|
---|
416 |
|
---|
417 | /* The return code from the sockopt_callback can signal information back
|
---|
418 | to libcurl: */
|
---|
419 | #define CURL_SOCKOPT_OK 0
|
---|
420 | #define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
|
---|
421 | CURLE_ABORTED_BY_CALLBACK */
|
---|
422 | #define CURL_SOCKOPT_ALREADY_CONNECTED 2
|
---|
423 |
|
---|
424 | typedef int (*curl_sockopt_callback)(void *clientp,
|
---|
425 | curl_socket_t curlfd,
|
---|
426 | curlsocktype purpose);
|
---|
427 |
|
---|
428 | struct curl_sockaddr {
|
---|
429 | int family;
|
---|
430 | int socktype;
|
---|
431 | int protocol;
|
---|
432 | unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it
|
---|
433 | turned really ugly and painful on the systems that
|
---|
434 | lack this type */
|
---|
435 | struct sockaddr addr;
|
---|
436 | };
|
---|
437 |
|
---|
438 | typedef curl_socket_t
|
---|
439 | (*curl_opensocket_callback)(void *clientp,
|
---|
440 | curlsocktype purpose,
|
---|
441 | struct curl_sockaddr *address);
|
---|
442 |
|
---|
443 | typedef int
|
---|
444 | (*curl_closesocket_callback)(void *clientp, curl_socket_t item);
|
---|
445 |
|
---|
446 | typedef enum {
|
---|
447 | CURLIOE_OK, /* I/O operation successful */
|
---|
448 | CURLIOE_UNKNOWNCMD, /* command was unknown to callback */
|
---|
449 | CURLIOE_FAILRESTART, /* failed to restart the read */
|
---|
450 | CURLIOE_LAST /* never use */
|
---|
451 | } curlioerr;
|
---|
452 |
|
---|
453 | typedef enum {
|
---|
454 | CURLIOCMD_NOP, /* no operation */
|
---|
455 | CURLIOCMD_RESTARTREAD, /* restart the read stream from start */
|
---|
456 | CURLIOCMD_LAST /* never use */
|
---|
457 | } curliocmd;
|
---|
458 |
|
---|
459 | typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
|
---|
460 | int cmd,
|
---|
461 | void *clientp);
|
---|
462 |
|
---|
463 | #ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS
|
---|
464 | /*
|
---|
465 | * The following typedef's are signatures of malloc, free, realloc, strdup and
|
---|
466 | * calloc respectively. Function pointers of these types can be passed to the
|
---|
467 | * curl_global_init_mem() function to set user defined memory management
|
---|
468 | * callback routines.
|
---|
469 | */
|
---|
470 | typedef void *(*curl_malloc_callback)(size_t size);
|
---|
471 | typedef void (*curl_free_callback)(void *ptr);
|
---|
472 | typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
|
---|
473 | typedef char *(*curl_strdup_callback)(const char *str);
|
---|
474 | typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
|
---|
475 |
|
---|
476 | #define CURL_DID_MEMORY_FUNC_TYPEDEFS
|
---|
477 | #endif
|
---|
478 |
|
---|
479 | /* the kind of data that is passed to information_callback */
|
---|
480 | typedef enum {
|
---|
481 | CURLINFO_TEXT = 0,
|
---|
482 | CURLINFO_HEADER_IN, /* 1 */
|
---|
483 | CURLINFO_HEADER_OUT, /* 2 */
|
---|
484 | CURLINFO_DATA_IN, /* 3 */
|
---|
485 | CURLINFO_DATA_OUT, /* 4 */
|
---|
486 | CURLINFO_SSL_DATA_IN, /* 5 */
|
---|
487 | CURLINFO_SSL_DATA_OUT, /* 6 */
|
---|
488 | CURLINFO_END
|
---|
489 | } curl_infotype;
|
---|
490 |
|
---|
491 | typedef int (*curl_debug_callback)
|
---|
492 | (CURL *handle, /* the handle/transfer this concerns */
|
---|
493 | curl_infotype type, /* what kind of data */
|
---|
494 | char *data, /* points to the data */
|
---|
495 | size_t size, /* size of the data pointed to */
|
---|
496 | void *userptr); /* whatever the user please */
|
---|
497 |
|
---|
498 | /* This is the CURLOPT_PREREQFUNCTION callback prototype. */
|
---|
499 | typedef int (*curl_prereq_callback)(void *clientp,
|
---|
500 | char *conn_primary_ip,
|
---|
501 | char *conn_local_ip,
|
---|
502 | int conn_primary_port,
|
---|
503 | int conn_local_port);
|
---|
504 |
|
---|
505 | /* Return code for when the pre-request callback has terminated without
|
---|
506 | any errors */
|
---|
507 | #define CURL_PREREQFUNC_OK 0
|
---|
508 | /* Return code for when the pre-request callback wants to abort the
|
---|
509 | request */
|
---|
510 | #define CURL_PREREQFUNC_ABORT 1
|
---|
511 |
|
---|
512 | /* All possible error codes from all sorts of curl functions. Future versions
|
---|
513 | may return other values, stay prepared.
|
---|
514 |
|
---|
515 | Always add new return codes last. Never *EVER* remove any. The return
|
---|
516 | codes must remain the same!
|
---|
517 | */
|
---|
518 |
|
---|
519 | typedef enum {
|
---|
520 | CURLE_OK = 0,
|
---|
521 | CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
|
---|
522 | CURLE_FAILED_INIT, /* 2 */
|
---|
523 | CURLE_URL_MALFORMAT, /* 3 */
|
---|
524 | CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for
|
---|
525 | 7.17.0, reused in April 2011 for 7.21.5] */
|
---|
526 | CURLE_COULDNT_RESOLVE_PROXY, /* 5 */
|
---|
527 | CURLE_COULDNT_RESOLVE_HOST, /* 6 */
|
---|
528 | CURLE_COULDNT_CONNECT, /* 7 */
|
---|
529 | CURLE_WEIRD_SERVER_REPLY, /* 8 */
|
---|
530 | CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server
|
---|
531 | due to lack of access - when login fails
|
---|
532 | this is not returned. */
|
---|
533 | CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for
|
---|
534 | 7.15.4, reused in Dec 2011 for 7.24.0]*/
|
---|
535 | CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */
|
---|
536 | CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server
|
---|
537 | [was obsoleted in August 2007 for 7.17.0,
|
---|
538 | reused in Dec 2011 for 7.24.0]*/
|
---|
539 | CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */
|
---|
540 | CURLE_FTP_WEIRD_227_FORMAT, /* 14 */
|
---|
541 | CURLE_FTP_CANT_GET_HOST, /* 15 */
|
---|
542 | CURLE_HTTP2, /* 16 - A problem in the http2 framing layer.
|
---|
543 | [was obsoleted in August 2007 for 7.17.0,
|
---|
544 | reused in July 2014 for 7.38.0] */
|
---|
545 | CURLE_FTP_COULDNT_SET_TYPE, /* 17 */
|
---|
546 | CURLE_PARTIAL_FILE, /* 18 */
|
---|
547 | CURLE_FTP_COULDNT_RETR_FILE, /* 19 */
|
---|
548 | CURLE_OBSOLETE20, /* 20 - NOT USED */
|
---|
549 | CURLE_QUOTE_ERROR, /* 21 - quote command failure */
|
---|
550 | CURLE_HTTP_RETURNED_ERROR, /* 22 */
|
---|
551 | CURLE_WRITE_ERROR, /* 23 */
|
---|
552 | CURLE_OBSOLETE24, /* 24 - NOT USED */
|
---|
553 | CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */
|
---|
554 | CURLE_READ_ERROR, /* 26 - couldn't open/read from file */
|
---|
555 | CURLE_OUT_OF_MEMORY, /* 27 */
|
---|
556 | CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */
|
---|
557 | CURLE_OBSOLETE29, /* 29 - NOT USED */
|
---|
558 | CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */
|
---|
559 | CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */
|
---|
560 | CURLE_OBSOLETE32, /* 32 - NOT USED */
|
---|
561 | CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */
|
---|
562 | CURLE_HTTP_POST_ERROR, /* 34 */
|
---|
563 | CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */
|
---|
564 | CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */
|
---|
565 | CURLE_FILE_COULDNT_READ_FILE, /* 37 */
|
---|
566 | CURLE_LDAP_CANNOT_BIND, /* 38 */
|
---|
567 | CURLE_LDAP_SEARCH_FAILED, /* 39 */
|
---|
568 | CURLE_OBSOLETE40, /* 40 - NOT USED */
|
---|
569 | CURLE_FUNCTION_NOT_FOUND, /* 41 - NOT USED starting with 7.53.0 */
|
---|
570 | CURLE_ABORTED_BY_CALLBACK, /* 42 */
|
---|
571 | CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */
|
---|
572 | CURLE_OBSOLETE44, /* 44 - NOT USED */
|
---|
573 | CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */
|
---|
574 | CURLE_OBSOLETE46, /* 46 - NOT USED */
|
---|
575 | CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */
|
---|
576 | CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */
|
---|
577 | CURLE_SETOPT_OPTION_SYNTAX, /* 49 - Malformed setopt option */
|
---|
578 | CURLE_OBSOLETE50, /* 50 - NOT USED */
|
---|
579 | CURLE_OBSOLETE51, /* 51 - NOT USED */
|
---|
580 | CURLE_GOT_NOTHING, /* 52 - when this is a specific error */
|
---|
581 | CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */
|
---|
582 | CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as
|
---|
583 | default */
|
---|
584 | CURLE_SEND_ERROR, /* 55 - failed sending network data */
|
---|
585 | CURLE_RECV_ERROR, /* 56 - failure in receiving network data */
|
---|
586 | CURLE_OBSOLETE57, /* 57 - NOT IN USE */
|
---|
587 | CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */
|
---|
588 | CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */
|
---|
589 | CURLE_PEER_FAILED_VERIFICATION, /* 60 - peer's certificate or fingerprint
|
---|
590 | wasn't verified fine */
|
---|
591 | CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */
|
---|
592 | CURLE_OBSOLETE62, /* 62 - NOT IN USE since 7.82.0 */
|
---|
593 | CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */
|
---|
594 | CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */
|
---|
595 | CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind
|
---|
596 | that failed */
|
---|
597 | CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */
|
---|
598 | CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not
|
---|
599 | accepted and we failed to login */
|
---|
600 | CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */
|
---|
601 | CURLE_TFTP_PERM, /* 69 - permission problem on server */
|
---|
602 | CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */
|
---|
603 | CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */
|
---|
604 | CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */
|
---|
605 | CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */
|
---|
606 | CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */
|
---|
607 | CURLE_OBSOLETE75, /* 75 - NOT IN USE since 7.82.0 */
|
---|
608 | CURLE_OBSOLETE76, /* 76 - NOT IN USE since 7.82.0 */
|
---|
609 | CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing
|
---|
610 | or wrong format */
|
---|
611 | CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */
|
---|
612 | CURLE_SSH, /* 79 - error from the SSH layer, somewhat
|
---|
613 | generic so the error message will be of
|
---|
614 | interest when this has happened */
|
---|
615 |
|
---|
616 | CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL
|
---|
617 | connection */
|
---|
618 | CURLE_AGAIN, /* 81 - socket is not ready for send/recv,
|
---|
619 | wait till it's ready and try again (Added
|
---|
620 | in 7.18.2) */
|
---|
621 | CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or
|
---|
622 | wrong format (Added in 7.19.0) */
|
---|
623 | CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in
|
---|
624 | 7.19.0) */
|
---|
625 | CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */
|
---|
626 | CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */
|
---|
627 | CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */
|
---|
628 | CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */
|
---|
629 | CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */
|
---|
630 | CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the
|
---|
631 | session will be queued */
|
---|
632 | CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not
|
---|
633 | match */
|
---|
634 | CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */
|
---|
635 | CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer
|
---|
636 | */
|
---|
637 | CURLE_RECURSIVE_API_CALL, /* 93 - an api function was called from
|
---|
638 | inside a callback */
|
---|
639 | CURLE_AUTH_ERROR, /* 94 - an authentication function returned an
|
---|
640 | error */
|
---|
641 | CURLE_HTTP3, /* 95 - An HTTP/3 layer problem */
|
---|
642 | CURLE_QUIC_CONNECT_ERROR, /* 96 - QUIC connection error */
|
---|
643 | CURLE_PROXY, /* 97 - proxy handshake error */
|
---|
644 | CURLE_SSL_CLIENTCERT, /* 98 - client-side certificate required */
|
---|
645 | CURLE_UNRECOVERABLE_POLL, /* 99 - poll/select returned fatal error */
|
---|
646 | CURL_LAST /* never use! */
|
---|
647 | } CURLcode;
|
---|
648 |
|
---|
649 | #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
|
---|
650 | the obsolete stuff removed! */
|
---|
651 |
|
---|
652 | /* Previously obsolete error code re-used in 7.38.0 */
|
---|
653 | #define CURLE_OBSOLETE16 CURLE_HTTP2
|
---|
654 |
|
---|
655 | /* Previously obsolete error codes re-used in 7.24.0 */
|
---|
656 | #define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED
|
---|
657 | #define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT
|
---|
658 |
|
---|
659 | /* compatibility with older names */
|
---|
660 | #define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
|
---|
661 | #define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY
|
---|
662 |
|
---|
663 | /* The following were added in 7.62.0 */
|
---|
664 | #define CURLE_SSL_CACERT CURLE_PEER_FAILED_VERIFICATION
|
---|
665 |
|
---|
666 | /* The following were added in 7.21.5, April 2011 */
|
---|
667 | #define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
|
---|
668 |
|
---|
669 | /* Added for 7.78.0 */
|
---|
670 | #define CURLE_TELNET_OPTION_SYNTAX CURLE_SETOPT_OPTION_SYNTAX
|
---|
671 |
|
---|
672 | /* The following were added in 7.17.1 */
|
---|
673 | /* These are scheduled to disappear by 2009 */
|
---|
674 | #define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION
|
---|
675 |
|
---|
676 | /* The following were added in 7.17.0 */
|
---|
677 | /* These are scheduled to disappear by 2009 */
|
---|
678 | #define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */
|
---|
679 | #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46
|
---|
680 | #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44
|
---|
681 | #define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10
|
---|
682 | #define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16
|
---|
683 | #define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32
|
---|
684 | #define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29
|
---|
685 | #define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12
|
---|
686 | #define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20
|
---|
687 | #define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40
|
---|
688 | #define CURLE_MALFORMAT_USER CURLE_OBSOLETE24
|
---|
689 | #define CURLE_SHARE_IN_USE CURLE_OBSOLETE57
|
---|
690 | #define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN
|
---|
691 |
|
---|
692 | #define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED
|
---|
693 | #define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE
|
---|
694 | #define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR
|
---|
695 | #define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL
|
---|
696 | #define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS
|
---|
697 | #define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR
|
---|
698 | #define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED
|
---|
699 |
|
---|
700 | /* The following were added earlier */
|
---|
701 |
|
---|
702 | #define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT
|
---|
703 | #define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR
|
---|
704 | #define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED
|
---|
705 | #define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED
|
---|
706 | #define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE
|
---|
707 | #define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME
|
---|
708 | #define CURLE_LDAP_INVALID_URL CURLE_OBSOLETE62
|
---|
709 | #define CURLE_CONV_REQD CURLE_OBSOLETE76
|
---|
710 | #define CURLE_CONV_FAILED CURLE_OBSOLETE75
|
---|
711 |
|
---|
712 | /* This was the error code 50 in 7.7.3 and a few earlier versions, this
|
---|
713 | is no longer used by libcurl but is instead #defined here only to not
|
---|
714 | make programs break */
|
---|
715 | #define CURLE_ALREADY_COMPLETE 99999
|
---|
716 |
|
---|
717 | /* Provide defines for really old option names */
|
---|
718 | #define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */
|
---|
719 | #define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */
|
---|
720 | #define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA
|
---|
721 |
|
---|
722 | /* Since long deprecated options with no code in the lib that does anything
|
---|
723 | with them. */
|
---|
724 | #define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40
|
---|
725 | #define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72
|
---|
726 |
|
---|
727 | #endif /* !CURL_NO_OLDIES */
|
---|
728 |
|
---|
729 | /*
|
---|
730 | * Proxy error codes. Returned in CURLINFO_PROXY_ERROR if CURLE_PROXY was
|
---|
731 | * return for the transfers.
|
---|
732 | */
|
---|
733 | typedef enum {
|
---|
734 | CURLPX_OK,
|
---|
735 | CURLPX_BAD_ADDRESS_TYPE,
|
---|
736 | CURLPX_BAD_VERSION,
|
---|
737 | CURLPX_CLOSED,
|
---|
738 | CURLPX_GSSAPI,
|
---|
739 | CURLPX_GSSAPI_PERMSG,
|
---|
740 | CURLPX_GSSAPI_PROTECTION,
|
---|
741 | CURLPX_IDENTD,
|
---|
742 | CURLPX_IDENTD_DIFFER,
|
---|
743 | CURLPX_LONG_HOSTNAME,
|
---|
744 | CURLPX_LONG_PASSWD,
|
---|
745 | CURLPX_LONG_USER,
|
---|
746 | CURLPX_NO_AUTH,
|
---|
747 | CURLPX_RECV_ADDRESS,
|
---|
748 | CURLPX_RECV_AUTH,
|
---|
749 | CURLPX_RECV_CONNECT,
|
---|
750 | CURLPX_RECV_REQACK,
|
---|
751 | CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED,
|
---|
752 | CURLPX_REPLY_COMMAND_NOT_SUPPORTED,
|
---|
753 | CURLPX_REPLY_CONNECTION_REFUSED,
|
---|
754 | CURLPX_REPLY_GENERAL_SERVER_FAILURE,
|
---|
755 | CURLPX_REPLY_HOST_UNREACHABLE,
|
---|
756 | CURLPX_REPLY_NETWORK_UNREACHABLE,
|
---|
757 | CURLPX_REPLY_NOT_ALLOWED,
|
---|
758 | CURLPX_REPLY_TTL_EXPIRED,
|
---|
759 | CURLPX_REPLY_UNASSIGNED,
|
---|
760 | CURLPX_REQUEST_FAILED,
|
---|
761 | CURLPX_RESOLVE_HOST,
|
---|
762 | CURLPX_SEND_AUTH,
|
---|
763 | CURLPX_SEND_CONNECT,
|
---|
764 | CURLPX_SEND_REQUEST,
|
---|
765 | CURLPX_UNKNOWN_FAIL,
|
---|
766 | CURLPX_UNKNOWN_MODE,
|
---|
767 | CURLPX_USER_REJECTED,
|
---|
768 | CURLPX_LAST /* never use */
|
---|
769 | } CURLproxycode;
|
---|
770 |
|
---|
771 | /* This prototype applies to all conversion callbacks */
|
---|
772 | typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);
|
---|
773 |
|
---|
774 | typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */
|
---|
775 | void *ssl_ctx, /* actually an OpenSSL
|
---|
776 | or WolfSSL SSL_CTX,
|
---|
777 | or an mbedTLS
|
---|
778 | mbedtls_ssl_config */
|
---|
779 | void *userptr);
|
---|
780 |
|
---|
781 | typedef enum {
|
---|
782 | CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use
|
---|
783 | CONNECT HTTP/1.1 */
|
---|
784 | CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT
|
---|
785 | HTTP/1.0 */
|
---|
786 | CURLPROXY_HTTPS = 2, /* added in 7.52.0 */
|
---|
787 | CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
|
---|
788 | in 7.10 */
|
---|
789 | CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
|
---|
790 | CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */
|
---|
791 | CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the
|
---|
792 | host name rather than the IP address. added
|
---|
793 | in 7.18.0 */
|
---|
794 | } curl_proxytype; /* this enum was added in 7.10 */
|
---|
795 |
|
---|
796 | /*
|
---|
797 | * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options:
|
---|
798 | *
|
---|
799 | * CURLAUTH_NONE - No HTTP authentication
|
---|
800 | * CURLAUTH_BASIC - HTTP Basic authentication (default)
|
---|
801 | * CURLAUTH_DIGEST - HTTP Digest authentication
|
---|
802 | * CURLAUTH_NEGOTIATE - HTTP Negotiate (SPNEGO) authentication
|
---|
803 | * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated)
|
---|
804 | * CURLAUTH_NTLM - HTTP NTLM authentication
|
---|
805 | * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour
|
---|
806 | * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper
|
---|
807 | * CURLAUTH_BEARER - HTTP Bearer token authentication
|
---|
808 | * CURLAUTH_ONLY - Use together with a single other type to force no
|
---|
809 | * authentication or just that single type
|
---|
810 | * CURLAUTH_ANY - All fine types set
|
---|
811 | * CURLAUTH_ANYSAFE - All fine types except Basic
|
---|
812 | */
|
---|
813 |
|
---|
814 | #define CURLAUTH_NONE ((unsigned long)0)
|
---|
815 | #define CURLAUTH_BASIC (((unsigned long)1)<<0)
|
---|
816 | #define CURLAUTH_DIGEST (((unsigned long)1)<<1)
|
---|
817 | #define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2)
|
---|
818 | /* Deprecated since the advent of CURLAUTH_NEGOTIATE */
|
---|
819 | #define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE
|
---|
820 | /* Used for CURLOPT_SOCKS5_AUTH to stay terminologically correct */
|
---|
821 | #define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
|
---|
822 | #define CURLAUTH_NTLM (((unsigned long)1)<<3)
|
---|
823 | #define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4)
|
---|
824 | #define CURLAUTH_NTLM_WB (((unsigned long)1)<<5)
|
---|
825 | #define CURLAUTH_BEARER (((unsigned long)1)<<6)
|
---|
826 | #define CURLAUTH_AWS_SIGV4 (((unsigned long)1)<<7)
|
---|
827 | #define CURLAUTH_ONLY (((unsigned long)1)<<31)
|
---|
828 | #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
|
---|
829 | #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
|
---|
830 |
|
---|
831 | #define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */
|
---|
832 | #define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */
|
---|
833 | #define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */
|
---|
834 | #define CURLSSH_AUTH_PASSWORD (1<<1) /* password */
|
---|
835 | #define CURLSSH_AUTH_HOST (1<<2) /* host key files */
|
---|
836 | #define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */
|
---|
837 | #define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */
|
---|
838 | #define CURLSSH_AUTH_GSSAPI (1<<5) /* gssapi (kerberos, ...) */
|
---|
839 | #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
|
---|
840 |
|
---|
841 | #define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */
|
---|
842 | #define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */
|
---|
843 | #define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */
|
---|
844 |
|
---|
845 | #define CURL_ERROR_SIZE 256
|
---|
846 |
|
---|
847 | enum curl_khtype {
|
---|
848 | CURLKHTYPE_UNKNOWN,
|
---|
849 | CURLKHTYPE_RSA1,
|
---|
850 | CURLKHTYPE_RSA,
|
---|
851 | CURLKHTYPE_DSS,
|
---|
852 | CURLKHTYPE_ECDSA,
|
---|
853 | CURLKHTYPE_ED25519
|
---|
854 | };
|
---|
855 |
|
---|
856 | struct curl_khkey {
|
---|
857 | const char *key; /* points to a null-terminated string encoded with base64
|
---|
858 | if len is zero, otherwise to the "raw" data */
|
---|
859 | size_t len;
|
---|
860 | enum curl_khtype keytype;
|
---|
861 | };
|
---|
862 |
|
---|
863 | /* this is the set of return values expected from the curl_sshkeycallback
|
---|
864 | callback */
|
---|
865 | enum curl_khstat {
|
---|
866 | CURLKHSTAT_FINE_ADD_TO_FILE,
|
---|
867 | CURLKHSTAT_FINE,
|
---|
868 | CURLKHSTAT_REJECT, /* reject the connection, return an error */
|
---|
869 | CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now.
|
---|
870 | Causes a CURLE_PEER_FAILED_VERIFICATION error but the
|
---|
871 | connection will be left intact etc */
|
---|
872 | CURLKHSTAT_FINE_REPLACE, /* accept and replace the wrong key */
|
---|
873 | CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */
|
---|
874 | };
|
---|
875 |
|
---|
876 | /* this is the set of status codes pass in to the callback */
|
---|
877 | enum curl_khmatch {
|
---|
878 | CURLKHMATCH_OK, /* match */
|
---|
879 | CURLKHMATCH_MISMATCH, /* host found, key mismatch! */
|
---|
880 | CURLKHMATCH_MISSING, /* no matching host/key found */
|
---|
881 | CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */
|
---|
882 | };
|
---|
883 |
|
---|
884 | typedef int
|
---|
885 | (*curl_sshkeycallback) (CURL *easy, /* easy handle */
|
---|
886 | const struct curl_khkey *knownkey, /* known */
|
---|
887 | const struct curl_khkey *foundkey, /* found */
|
---|
888 | enum curl_khmatch, /* libcurl's view on the keys */
|
---|
889 | void *clientp); /* custom pointer passed with */
|
---|
890 | /* CURLOPT_SSH_KEYDATA */
|
---|
891 |
|
---|
892 | typedef int
|
---|
893 | (*curl_sshhostkeycallback) (void *clientp,/* custom pointer passed */
|
---|
894 | /* with CURLOPT_SSH_HOSTKEYDATA */
|
---|
895 | int keytype, /* CURLKHTYPE */
|
---|
896 | const char *key, /* hostkey to check */
|
---|
897 | size_t keylen); /* length of the key */
|
---|
898 | /* return CURLE_OK to accept */
|
---|
899 | /* or something else to refuse */
|
---|
900 |
|
---|
901 |
|
---|
902 | /* parameter for the CURLOPT_USE_SSL option */
|
---|
903 | typedef enum {
|
---|
904 | CURLUSESSL_NONE, /* do not attempt to use SSL */
|
---|
905 | CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */
|
---|
906 | CURLUSESSL_CONTROL, /* SSL for the control connection or fail */
|
---|
907 | CURLUSESSL_ALL, /* SSL for all communication or fail */
|
---|
908 | CURLUSESSL_LAST /* not an option, never use */
|
---|
909 | } curl_usessl;
|
---|
910 |
|
---|
911 | /* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */
|
---|
912 |
|
---|
913 | /* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the
|
---|
914 | name of improving interoperability with older servers. Some SSL libraries
|
---|
915 | have introduced work-arounds for this flaw but those work-arounds sometimes
|
---|
916 | make the SSL communication fail. To regain functionality with those broken
|
---|
917 | servers, a user can this way allow the vulnerability back. */
|
---|
918 | #define CURLSSLOPT_ALLOW_BEAST (1<<0)
|
---|
919 |
|
---|
920 | /* - NO_REVOKE tells libcurl to disable certificate revocation checks for those
|
---|
921 | SSL backends where such behavior is present. */
|
---|
922 | #define CURLSSLOPT_NO_REVOKE (1<<1)
|
---|
923 |
|
---|
924 | /* - NO_PARTIALCHAIN tells libcurl to *NOT* accept a partial certificate chain
|
---|
925 | if possible. The OpenSSL backend has this ability. */
|
---|
926 | #define CURLSSLOPT_NO_PARTIALCHAIN (1<<2)
|
---|
927 |
|
---|
928 | /* - REVOKE_BEST_EFFORT tells libcurl to ignore certificate revocation offline
|
---|
929 | checks and ignore missing revocation list for those SSL backends where such
|
---|
930 | behavior is present. */
|
---|
931 | #define CURLSSLOPT_REVOKE_BEST_EFFORT (1<<3)
|
---|
932 |
|
---|
933 | /* - CURLSSLOPT_NATIVE_CA tells libcurl to use standard certificate store of
|
---|
934 | operating system. Currently implemented under MS-Windows. */
|
---|
935 | #define CURLSSLOPT_NATIVE_CA (1<<4)
|
---|
936 |
|
---|
937 | /* - CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl to automatically locate and use
|
---|
938 | a client certificate for authentication. (Schannel) */
|
---|
939 | #define CURLSSLOPT_AUTO_CLIENT_CERT (1<<5)
|
---|
940 |
|
---|
941 | /* The default connection attempt delay in milliseconds for happy eyeballs.
|
---|
942 | CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document
|
---|
943 | this value, keep them in sync. */
|
---|
944 | #define CURL_HET_DEFAULT 200L
|
---|
945 |
|
---|
946 | /* The default connection upkeep interval in milliseconds. */
|
---|
947 | #define CURL_UPKEEP_INTERVAL_DEFAULT 60000L
|
---|
948 |
|
---|
949 | #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
|
---|
950 | the obsolete stuff removed! */
|
---|
951 |
|
---|
952 | /* Backwards compatibility with older names */
|
---|
953 | /* These are scheduled to disappear by 2009 */
|
---|
954 |
|
---|
955 | #define CURLFTPSSL_NONE CURLUSESSL_NONE
|
---|
956 | #define CURLFTPSSL_TRY CURLUSESSL_TRY
|
---|
957 | #define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL
|
---|
958 | #define CURLFTPSSL_ALL CURLUSESSL_ALL
|
---|
959 | #define CURLFTPSSL_LAST CURLUSESSL_LAST
|
---|
960 | #define curl_ftpssl curl_usessl
|
---|
961 | #endif /* !CURL_NO_OLDIES */
|
---|
962 |
|
---|
963 | /* parameter for the CURLOPT_FTP_SSL_CCC option */
|
---|
964 | typedef enum {
|
---|
965 | CURLFTPSSL_CCC_NONE, /* do not send CCC */
|
---|
966 | CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */
|
---|
967 | CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */
|
---|
968 | CURLFTPSSL_CCC_LAST /* not an option, never use */
|
---|
969 | } curl_ftpccc;
|
---|
970 |
|
---|
971 | /* parameter for the CURLOPT_FTPSSLAUTH option */
|
---|
972 | typedef enum {
|
---|
973 | CURLFTPAUTH_DEFAULT, /* let libcurl decide */
|
---|
974 | CURLFTPAUTH_SSL, /* use "AUTH SSL" */
|
---|
975 | CURLFTPAUTH_TLS, /* use "AUTH TLS" */
|
---|
976 | CURLFTPAUTH_LAST /* not an option, never use */
|
---|
977 | } curl_ftpauth;
|
---|
978 |
|
---|
979 | /* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */
|
---|
980 | typedef enum {
|
---|
981 | CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */
|
---|
982 | CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD
|
---|
983 | again if MKD succeeded, for SFTP this does
|
---|
984 | similar magic */
|
---|
985 | CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD
|
---|
986 | again even if MKD failed! */
|
---|
987 | CURLFTP_CREATE_DIR_LAST /* not an option, never use */
|
---|
988 | } curl_ftpcreatedir;
|
---|
989 |
|
---|
990 | /* parameter for the CURLOPT_FTP_FILEMETHOD option */
|
---|
991 | typedef enum {
|
---|
992 | CURLFTPMETHOD_DEFAULT, /* let libcurl pick */
|
---|
993 | CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */
|
---|
994 | CURLFTPMETHOD_NOCWD, /* no CWD at all */
|
---|
995 | CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */
|
---|
996 | CURLFTPMETHOD_LAST /* not an option, never use */
|
---|
997 | } curl_ftpmethod;
|
---|
998 |
|
---|
999 | /* bitmask defines for CURLOPT_HEADEROPT */
|
---|
1000 | #define CURLHEADER_UNIFIED 0
|
---|
1001 | #define CURLHEADER_SEPARATE (1<<0)
|
---|
1002 |
|
---|
1003 | /* CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option */
|
---|
1004 | #define CURLALTSVC_READONLYFILE (1<<2)
|
---|
1005 | #define CURLALTSVC_H1 (1<<3)
|
---|
1006 | #define CURLALTSVC_H2 (1<<4)
|
---|
1007 | #define CURLALTSVC_H3 (1<<5)
|
---|
1008 |
|
---|
1009 |
|
---|
1010 | struct curl_hstsentry {
|
---|
1011 | char *name;
|
---|
1012 | size_t namelen;
|
---|
1013 | unsigned int includeSubDomains:1;
|
---|
1014 | char expire[18]; /* YYYYMMDD HH:MM:SS [null-terminated] */
|
---|
1015 | };
|
---|
1016 |
|
---|
1017 | struct curl_index {
|
---|
1018 | size_t index; /* the provided entry's "index" or count */
|
---|
1019 | size_t total; /* total number of entries to save */
|
---|
1020 | };
|
---|
1021 |
|
---|
1022 | typedef enum {
|
---|
1023 | CURLSTS_OK,
|
---|
1024 | CURLSTS_DONE,
|
---|
1025 | CURLSTS_FAIL
|
---|
1026 | } CURLSTScode;
|
---|
1027 |
|
---|
1028 | typedef CURLSTScode (*curl_hstsread_callback)(CURL *easy,
|
---|
1029 | struct curl_hstsentry *e,
|
---|
1030 | void *userp);
|
---|
1031 | typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
|
---|
1032 | struct curl_hstsentry *e,
|
---|
1033 | struct curl_index *i,
|
---|
1034 | void *userp);
|
---|
1035 |
|
---|
1036 | /* CURLHSTS_* are bits for the CURLOPT_HSTS option */
|
---|
1037 | #define CURLHSTS_ENABLE (long)(1<<0)
|
---|
1038 | #define CURLHSTS_READONLYFILE (long)(1<<1)
|
---|
1039 |
|
---|
1040 | /* The CURLPROTO_ defines below are for the **deprecated** CURLOPT_*PROTOCOLS
|
---|
1041 | options. Do not use. */
|
---|
1042 | #define CURLPROTO_HTTP (1<<0)
|
---|
1043 | #define CURLPROTO_HTTPS (1<<1)
|
---|
1044 | #define CURLPROTO_FTP (1<<2)
|
---|
1045 | #define CURLPROTO_FTPS (1<<3)
|
---|
1046 | #define CURLPROTO_SCP (1<<4)
|
---|
1047 | #define CURLPROTO_SFTP (1<<5)
|
---|
1048 | #define CURLPROTO_TELNET (1<<6)
|
---|
1049 | #define CURLPROTO_LDAP (1<<7)
|
---|
1050 | #define CURLPROTO_LDAPS (1<<8)
|
---|
1051 | #define CURLPROTO_DICT (1<<9)
|
---|
1052 | #define CURLPROTO_FILE (1<<10)
|
---|
1053 | #define CURLPROTO_TFTP (1<<11)
|
---|
1054 | #define CURLPROTO_IMAP (1<<12)
|
---|
1055 | #define CURLPROTO_IMAPS (1<<13)
|
---|
1056 | #define CURLPROTO_POP3 (1<<14)
|
---|
1057 | #define CURLPROTO_POP3S (1<<15)
|
---|
1058 | #define CURLPROTO_SMTP (1<<16)
|
---|
1059 | #define CURLPROTO_SMTPS (1<<17)
|
---|
1060 | #define CURLPROTO_RTSP (1<<18)
|
---|
1061 | #define CURLPROTO_RTMP (1<<19)
|
---|
1062 | #define CURLPROTO_RTMPT (1<<20)
|
---|
1063 | #define CURLPROTO_RTMPE (1<<21)
|
---|
1064 | #define CURLPROTO_RTMPTE (1<<22)
|
---|
1065 | #define CURLPROTO_RTMPS (1<<23)
|
---|
1066 | #define CURLPROTO_RTMPTS (1<<24)
|
---|
1067 | #define CURLPROTO_GOPHER (1<<25)
|
---|
1068 | #define CURLPROTO_SMB (1<<26)
|
---|
1069 | #define CURLPROTO_SMBS (1<<27)
|
---|
1070 | #define CURLPROTO_MQTT (1<<28)
|
---|
1071 | #define CURLPROTO_GOPHERS (1<<29)
|
---|
1072 | #define CURLPROTO_ALL (~0) /* enable everything */
|
---|
1073 |
|
---|
1074 | /* long may be 32 or 64 bits, but we should never depend on anything else
|
---|
1075 | but 32 */
|
---|
1076 | #define CURLOPTTYPE_LONG 0
|
---|
1077 | #define CURLOPTTYPE_OBJECTPOINT 10000
|
---|
1078 | #define CURLOPTTYPE_FUNCTIONPOINT 20000
|
---|
1079 | #define CURLOPTTYPE_OFF_T 30000
|
---|
1080 | #define CURLOPTTYPE_BLOB 40000
|
---|
1081 |
|
---|
1082 | /* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the
|
---|
1083 | string options from the header file */
|
---|
1084 |
|
---|
1085 |
|
---|
1086 | #define CURLOPT(na,t,nu) na = t + nu
|
---|
1087 | #define CURLOPTDEPRECATED(na,t,nu,v,m) na CURL_DEPRECATED(v,m) = t + nu
|
---|
1088 |
|
---|
1089 | /* CURLOPT aliases that make no run-time difference */
|
---|
1090 |
|
---|
1091 | /* 'char *' argument to a string with a trailing zero */
|
---|
1092 | #define CURLOPTTYPE_STRINGPOINT CURLOPTTYPE_OBJECTPOINT
|
---|
1093 |
|
---|
1094 | /* 'struct curl_slist *' argument */
|
---|
1095 | #define CURLOPTTYPE_SLISTPOINT CURLOPTTYPE_OBJECTPOINT
|
---|
1096 |
|
---|
1097 | /* 'void *' argument passed untouched to callback */
|
---|
1098 | #define CURLOPTTYPE_CBPOINT CURLOPTTYPE_OBJECTPOINT
|
---|
1099 |
|
---|
1100 | /* 'long' argument with a set of values/bitmask */
|
---|
1101 | #define CURLOPTTYPE_VALUES CURLOPTTYPE_LONG
|
---|
1102 |
|
---|
1103 | /*
|
---|
1104 | * All CURLOPT_* values.
|
---|
1105 | */
|
---|
1106 |
|
---|
1107 | typedef enum {
|
---|
1108 | /* This is the FILE * or void * the regular output should be written to. */
|
---|
1109 | CURLOPT(CURLOPT_WRITEDATA, CURLOPTTYPE_CBPOINT, 1),
|
---|
1110 |
|
---|
1111 | /* The full URL to get/put */
|
---|
1112 | CURLOPT(CURLOPT_URL, CURLOPTTYPE_STRINGPOINT, 2),
|
---|
1113 |
|
---|
1114 | /* Port number to connect to, if other than default. */
|
---|
1115 | CURLOPT(CURLOPT_PORT, CURLOPTTYPE_LONG, 3),
|
---|
1116 |
|
---|
1117 | /* Name of proxy to use. */
|
---|
1118 | CURLOPT(CURLOPT_PROXY, CURLOPTTYPE_STRINGPOINT, 4),
|
---|
1119 |
|
---|
1120 | /* "user:password;options" to use when fetching. */
|
---|
1121 | CURLOPT(CURLOPT_USERPWD, CURLOPTTYPE_STRINGPOINT, 5),
|
---|
1122 |
|
---|
1123 | /* "user:password" to use with proxy. */
|
---|
1124 | CURLOPT(CURLOPT_PROXYUSERPWD, CURLOPTTYPE_STRINGPOINT, 6),
|
---|
1125 |
|
---|
1126 | /* Range to get, specified as an ASCII string. */
|
---|
1127 | CURLOPT(CURLOPT_RANGE, CURLOPTTYPE_STRINGPOINT, 7),
|
---|
1128 |
|
---|
1129 | /* not used */
|
---|
1130 |
|
---|
1131 | /* Specified file stream to upload from (use as input): */
|
---|
1132 | CURLOPT(CURLOPT_READDATA, CURLOPTTYPE_CBPOINT, 9),
|
---|
1133 |
|
---|
1134 | /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
|
---|
1135 | * bytes big. */
|
---|
1136 | CURLOPT(CURLOPT_ERRORBUFFER, CURLOPTTYPE_OBJECTPOINT, 10),
|
---|
1137 |
|
---|
1138 | /* Function that will be called to store the output (instead of fwrite). The
|
---|
1139 | * parameters will use fwrite() syntax, make sure to follow them. */
|
---|
1140 | CURLOPT(CURLOPT_WRITEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 11),
|
---|
1141 |
|
---|
1142 | /* Function that will be called to read the input (instead of fread). The
|
---|
1143 | * parameters will use fread() syntax, make sure to follow them. */
|
---|
1144 | CURLOPT(CURLOPT_READFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 12),
|
---|
1145 |
|
---|
1146 | /* Time-out the read operation after this amount of seconds */
|
---|
1147 | CURLOPT(CURLOPT_TIMEOUT, CURLOPTTYPE_LONG, 13),
|
---|
1148 |
|
---|
1149 | /* If CURLOPT_READDATA is used, this can be used to inform libcurl about
|
---|
1150 | * how large the file being sent really is. That allows better error
|
---|
1151 | * checking and better verifies that the upload was successful. -1 means
|
---|
1152 | * unknown size.
|
---|
1153 | *
|
---|
1154 | * For large file support, there is also a _LARGE version of the key
|
---|
1155 | * which takes an off_t type, allowing platforms with larger off_t
|
---|
1156 | * sizes to handle larger files. See below for INFILESIZE_LARGE.
|
---|
1157 | */
|
---|
1158 | CURLOPT(CURLOPT_INFILESIZE, CURLOPTTYPE_LONG, 14),
|
---|
1159 |
|
---|
1160 | /* POST static input fields. */
|
---|
1161 | CURLOPT(CURLOPT_POSTFIELDS, CURLOPTTYPE_OBJECTPOINT, 15),
|
---|
1162 |
|
---|
1163 | /* Set the referrer page (needed by some CGIs) */
|
---|
1164 | CURLOPT(CURLOPT_REFERER, CURLOPTTYPE_STRINGPOINT, 16),
|
---|
1165 |
|
---|
1166 | /* Set the FTP PORT string (interface name, named or numerical IP address)
|
---|
1167 | Use i.e '-' to use default address. */
|
---|
1168 | CURLOPT(CURLOPT_FTPPORT, CURLOPTTYPE_STRINGPOINT, 17),
|
---|
1169 |
|
---|
1170 | /* Set the User-Agent string (examined by some CGIs) */
|
---|
1171 | CURLOPT(CURLOPT_USERAGENT, CURLOPTTYPE_STRINGPOINT, 18),
|
---|
1172 |
|
---|
1173 | /* If the download receives less than "low speed limit" bytes/second
|
---|
1174 | * during "low speed time" seconds, the operations is aborted.
|
---|
1175 | * You could i.e if you have a pretty high speed connection, abort if
|
---|
1176 | * it is less than 2000 bytes/sec during 20 seconds.
|
---|
1177 | */
|
---|
1178 |
|
---|
1179 | /* Set the "low speed limit" */
|
---|
1180 | CURLOPT(CURLOPT_LOW_SPEED_LIMIT, CURLOPTTYPE_LONG, 19),
|
---|
1181 |
|
---|
1182 | /* Set the "low speed time" */
|
---|
1183 | CURLOPT(CURLOPT_LOW_SPEED_TIME, CURLOPTTYPE_LONG, 20),
|
---|
1184 |
|
---|
1185 | /* Set the continuation offset.
|
---|
1186 | *
|
---|
1187 | * Note there is also a _LARGE version of this key which uses
|
---|
1188 | * off_t types, allowing for large file offsets on platforms which
|
---|
1189 | * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE.
|
---|
1190 | */
|
---|
1191 | CURLOPT(CURLOPT_RESUME_FROM, CURLOPTTYPE_LONG, 21),
|
---|
1192 |
|
---|
1193 | /* Set cookie in request: */
|
---|
1194 | CURLOPT(CURLOPT_COOKIE, CURLOPTTYPE_STRINGPOINT, 22),
|
---|
1195 |
|
---|
1196 | /* This points to a linked list of headers, struct curl_slist kind. This
|
---|
1197 | list is also used for RTSP (in spite of its name) */
|
---|
1198 | CURLOPT(CURLOPT_HTTPHEADER, CURLOPTTYPE_SLISTPOINT, 23),
|
---|
1199 |
|
---|
1200 | /* This points to a linked list of post entries, struct curl_httppost */
|
---|
1201 | CURLOPTDEPRECATED(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24,
|
---|
1202 | 7.56.0, "Use CURLOPT_MIMEPOST"),
|
---|
1203 |
|
---|
1204 | /* name of the file keeping your private SSL-certificate */
|
---|
1205 | CURLOPT(CURLOPT_SSLCERT, CURLOPTTYPE_STRINGPOINT, 25),
|
---|
1206 |
|
---|
1207 | /* password for the SSL or SSH private key */
|
---|
1208 | CURLOPT(CURLOPT_KEYPASSWD, CURLOPTTYPE_STRINGPOINT, 26),
|
---|
1209 |
|
---|
1210 | /* send TYPE parameter? */
|
---|
1211 | CURLOPT(CURLOPT_CRLF, CURLOPTTYPE_LONG, 27),
|
---|
1212 |
|
---|
1213 | /* send linked-list of QUOTE commands */
|
---|
1214 | CURLOPT(CURLOPT_QUOTE, CURLOPTTYPE_SLISTPOINT, 28),
|
---|
1215 |
|
---|
1216 | /* send FILE * or void * to store headers to, if you use a callback it
|
---|
1217 | is simply passed to the callback unmodified */
|
---|
1218 | CURLOPT(CURLOPT_HEADERDATA, CURLOPTTYPE_CBPOINT, 29),
|
---|
1219 |
|
---|
1220 | /* point to a file to read the initial cookies from, also enables
|
---|
1221 | "cookie awareness" */
|
---|
1222 | CURLOPT(CURLOPT_COOKIEFILE, CURLOPTTYPE_STRINGPOINT, 31),
|
---|
1223 |
|
---|
1224 | /* What version to specifically try to use.
|
---|
1225 | See CURL_SSLVERSION defines below. */
|
---|
1226 | CURLOPT(CURLOPT_SSLVERSION, CURLOPTTYPE_VALUES, 32),
|
---|
1227 |
|
---|
1228 | /* What kind of HTTP time condition to use, see defines */
|
---|
1229 | CURLOPT(CURLOPT_TIMECONDITION, CURLOPTTYPE_VALUES, 33),
|
---|
1230 |
|
---|
1231 | /* Time to use with the above condition. Specified in number of seconds
|
---|
1232 | since 1 Jan 1970 */
|
---|
1233 | CURLOPT(CURLOPT_TIMEVALUE, CURLOPTTYPE_LONG, 34),
|
---|
1234 |
|
---|
1235 | /* 35 = OBSOLETE */
|
---|
1236 |
|
---|
1237 | /* Custom request, for customizing the get command like
|
---|
1238 | HTTP: DELETE, TRACE and others
|
---|
1239 | FTP: to use a different list command
|
---|
1240 | */
|
---|
1241 | CURLOPT(CURLOPT_CUSTOMREQUEST, CURLOPTTYPE_STRINGPOINT, 36),
|
---|
1242 |
|
---|
1243 | /* FILE handle to use instead of stderr */
|
---|
1244 | CURLOPT(CURLOPT_STDERR, CURLOPTTYPE_OBJECTPOINT, 37),
|
---|
1245 |
|
---|
1246 | /* 38 is not used */
|
---|
1247 |
|
---|
1248 | /* send linked-list of post-transfer QUOTE commands */
|
---|
1249 | CURLOPT(CURLOPT_POSTQUOTE, CURLOPTTYPE_SLISTPOINT, 39),
|
---|
1250 |
|
---|
1251 | /* OBSOLETE, do not use! */
|
---|
1252 | CURLOPT(CURLOPT_OBSOLETE40, CURLOPTTYPE_OBJECTPOINT, 40),
|
---|
1253 |
|
---|
1254 | /* talk a lot */
|
---|
1255 | CURLOPT(CURLOPT_VERBOSE, CURLOPTTYPE_LONG, 41),
|
---|
1256 |
|
---|
1257 | /* throw the header out too */
|
---|
1258 | CURLOPT(CURLOPT_HEADER, CURLOPTTYPE_LONG, 42),
|
---|
1259 |
|
---|
1260 | /* shut off the progress meter */
|
---|
1261 | CURLOPT(CURLOPT_NOPROGRESS, CURLOPTTYPE_LONG, 43),
|
---|
1262 |
|
---|
1263 | /* use HEAD to get http document */
|
---|
1264 | CURLOPT(CURLOPT_NOBODY, CURLOPTTYPE_LONG, 44),
|
---|
1265 |
|
---|
1266 | /* no output on http error codes >= 400 */
|
---|
1267 | CURLOPT(CURLOPT_FAILONERROR, CURLOPTTYPE_LONG, 45),
|
---|
1268 |
|
---|
1269 | /* this is an upload */
|
---|
1270 | CURLOPT(CURLOPT_UPLOAD, CURLOPTTYPE_LONG, 46),
|
---|
1271 |
|
---|
1272 | /* HTTP POST method */
|
---|
1273 | CURLOPT(CURLOPT_POST, CURLOPTTYPE_LONG, 47),
|
---|
1274 |
|
---|
1275 | /* bare names when listing directories */
|
---|
1276 | CURLOPT(CURLOPT_DIRLISTONLY, CURLOPTTYPE_LONG, 48),
|
---|
1277 |
|
---|
1278 | /* Append instead of overwrite on upload! */
|
---|
1279 | CURLOPT(CURLOPT_APPEND, CURLOPTTYPE_LONG, 50),
|
---|
1280 |
|
---|
1281 | /* Specify whether to read the user+password from the .netrc or the URL.
|
---|
1282 | * This must be one of the CURL_NETRC_* enums below. */
|
---|
1283 | CURLOPT(CURLOPT_NETRC, CURLOPTTYPE_VALUES, 51),
|
---|
1284 |
|
---|
1285 | /* use Location: Luke! */
|
---|
1286 | CURLOPT(CURLOPT_FOLLOWLOCATION, CURLOPTTYPE_LONG, 52),
|
---|
1287 |
|
---|
1288 | /* transfer data in text/ASCII format */
|
---|
1289 | CURLOPT(CURLOPT_TRANSFERTEXT, CURLOPTTYPE_LONG, 53),
|
---|
1290 |
|
---|
1291 | /* HTTP PUT */
|
---|
1292 | CURLOPTDEPRECATED(CURLOPT_PUT, CURLOPTTYPE_LONG, 54,
|
---|
1293 | 7.12.1, "Use CURLOPT_UPLOAD"),
|
---|
1294 |
|
---|
1295 | /* 55 = OBSOLETE */
|
---|
1296 |
|
---|
1297 | /* DEPRECATED
|
---|
1298 | * Function that will be called instead of the internal progress display
|
---|
1299 | * function. This function should be defined as the curl_progress_callback
|
---|
1300 | * prototype defines. */
|
---|
1301 | CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
|
---|
1302 | 7.32.0, "Use CURLOPT_XFERINFOFUNCTION"),
|
---|
1303 |
|
---|
1304 | /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
|
---|
1305 | callbacks */
|
---|
1306 | CURLOPT(CURLOPT_XFERINFODATA, CURLOPTTYPE_CBPOINT, 57),
|
---|
1307 | #define CURLOPT_PROGRESSDATA CURLOPT_XFERINFODATA
|
---|
1308 |
|
---|
1309 | /* We want the referrer field set automatically when following locations */
|
---|
1310 | CURLOPT(CURLOPT_AUTOREFERER, CURLOPTTYPE_LONG, 58),
|
---|
1311 |
|
---|
1312 | /* Port of the proxy, can be set in the proxy string as well with:
|
---|
1313 | "[host]:[port]" */
|
---|
1314 | CURLOPT(CURLOPT_PROXYPORT, CURLOPTTYPE_LONG, 59),
|
---|
1315 |
|
---|
1316 | /* size of the POST input data, if strlen() is not good to use */
|
---|
1317 | CURLOPT(CURLOPT_POSTFIELDSIZE, CURLOPTTYPE_LONG, 60),
|
---|
1318 |
|
---|
1319 | /* tunnel non-http operations through an HTTP proxy */
|
---|
1320 | CURLOPT(CURLOPT_HTTPPROXYTUNNEL, CURLOPTTYPE_LONG, 61),
|
---|
1321 |
|
---|
1322 | /* Set the interface string to use as outgoing network interface */
|
---|
1323 | CURLOPT(CURLOPT_INTERFACE, CURLOPTTYPE_STRINGPOINT, 62),
|
---|
1324 |
|
---|
1325 | /* Set the krb4/5 security level, this also enables krb4/5 awareness. This
|
---|
1326 | * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
|
---|
1327 | * is set but doesn't match one of these, 'private' will be used. */
|
---|
1328 | CURLOPT(CURLOPT_KRBLEVEL, CURLOPTTYPE_STRINGPOINT, 63),
|
---|
1329 |
|
---|
1330 | /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
|
---|
1331 | CURLOPT(CURLOPT_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 64),
|
---|
1332 |
|
---|
1333 | /* The CApath or CAfile used to validate the peer certificate
|
---|
1334 | this option is used only if SSL_VERIFYPEER is true */
|
---|
1335 | CURLOPT(CURLOPT_CAINFO, CURLOPTTYPE_STRINGPOINT, 65),
|
---|
1336 |
|
---|
1337 | /* 66 = OBSOLETE */
|
---|
1338 | /* 67 = OBSOLETE */
|
---|
1339 |
|
---|
1340 | /* Maximum number of http redirects to follow */
|
---|
1341 | CURLOPT(CURLOPT_MAXREDIRS, CURLOPTTYPE_LONG, 68),
|
---|
1342 |
|
---|
1343 | /* Pass a long set to 1 to get the date of the requested document (if
|
---|
1344 | possible)! Pass a zero to shut it off. */
|
---|
1345 | CURLOPT(CURLOPT_FILETIME, CURLOPTTYPE_LONG, 69),
|
---|
1346 |
|
---|
1347 | /* This points to a linked list of telnet options */
|
---|
1348 | CURLOPT(CURLOPT_TELNETOPTIONS, CURLOPTTYPE_SLISTPOINT, 70),
|
---|
1349 |
|
---|
1350 | /* Max amount of cached alive connections */
|
---|
1351 | CURLOPT(CURLOPT_MAXCONNECTS, CURLOPTTYPE_LONG, 71),
|
---|
1352 |
|
---|
1353 | /* OBSOLETE, do not use! */
|
---|
1354 | CURLOPT(CURLOPT_OBSOLETE72, CURLOPTTYPE_LONG, 72),
|
---|
1355 |
|
---|
1356 | /* 73 = OBSOLETE */
|
---|
1357 |
|
---|
1358 | /* Set to explicitly use a new connection for the upcoming transfer.
|
---|
1359 | Do not use this unless you're absolutely sure of this, as it makes the
|
---|
1360 | operation slower and is less friendly for the network. */
|
---|
1361 | CURLOPT(CURLOPT_FRESH_CONNECT, CURLOPTTYPE_LONG, 74),
|
---|
1362 |
|
---|
1363 | /* Set to explicitly forbid the upcoming transfer's connection to be re-used
|
---|
1364 | when done. Do not use this unless you're absolutely sure of this, as it
|
---|
1365 | makes the operation slower and is less friendly for the network. */
|
---|
1366 | CURLOPT(CURLOPT_FORBID_REUSE, CURLOPTTYPE_LONG, 75),
|
---|
1367 |
|
---|
1368 | /* Set to a file name that contains random data for libcurl to use to
|
---|
1369 | seed the random engine when doing SSL connects. */
|
---|
1370 | CURLOPTDEPRECATED(CURLOPT_RANDOM_FILE, CURLOPTTYPE_STRINGPOINT, 76,
|
---|
1371 | 7.84.0, "Serves no purpose anymore"),
|
---|
1372 |
|
---|
1373 | /* Set to the Entropy Gathering Daemon socket pathname */
|
---|
1374 | CURLOPTDEPRECATED(CURLOPT_EGDSOCKET, CURLOPTTYPE_STRINGPOINT, 77,
|
---|
1375 | 7.84.0, "Serves no purpose anymore"),
|
---|
1376 |
|
---|
1377 | /* Time-out connect operations after this amount of seconds, if connects are
|
---|
1378 | OK within this time, then fine... This only aborts the connect phase. */
|
---|
1379 | CURLOPT(CURLOPT_CONNECTTIMEOUT, CURLOPTTYPE_LONG, 78),
|
---|
1380 |
|
---|
1381 | /* Function that will be called to store headers (instead of fwrite). The
|
---|
1382 | * parameters will use fwrite() syntax, make sure to follow them. */
|
---|
1383 | CURLOPT(CURLOPT_HEADERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 79),
|
---|
1384 |
|
---|
1385 | /* Set this to force the HTTP request to get back to GET. Only really usable
|
---|
1386 | if POST, PUT or a custom request have been used first.
|
---|
1387 | */
|
---|
1388 | CURLOPT(CURLOPT_HTTPGET, CURLOPTTYPE_LONG, 80),
|
---|
1389 |
|
---|
1390 | /* Set if we should verify the Common name from the peer certificate in ssl
|
---|
1391 | * handshake, set 1 to check existence, 2 to ensure that it matches the
|
---|
1392 | * provided hostname. */
|
---|
1393 | CURLOPT(CURLOPT_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 81),
|
---|
1394 |
|
---|
1395 | /* Specify which file name to write all known cookies in after completed
|
---|
1396 | operation. Set file name to "-" (dash) to make it go to stdout. */
|
---|
1397 | CURLOPT(CURLOPT_COOKIEJAR, CURLOPTTYPE_STRINGPOINT, 82),
|
---|
1398 |
|
---|
1399 | /* Specify which SSL ciphers to use */
|
---|
1400 | CURLOPT(CURLOPT_SSL_CIPHER_LIST, CURLOPTTYPE_STRINGPOINT, 83),
|
---|
1401 |
|
---|
1402 | /* Specify which HTTP version to use! This must be set to one of the
|
---|
1403 | CURL_HTTP_VERSION* enums set below. */
|
---|
1404 | CURLOPT(CURLOPT_HTTP_VERSION, CURLOPTTYPE_VALUES, 84),
|
---|
1405 |
|
---|
1406 | /* Specifically switch on or off the FTP engine's use of the EPSV command. By
|
---|
1407 | default, that one will always be attempted before the more traditional
|
---|
1408 | PASV command. */
|
---|
1409 | CURLOPT(CURLOPT_FTP_USE_EPSV, CURLOPTTYPE_LONG, 85),
|
---|
1410 |
|
---|
1411 | /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
|
---|
1412 | CURLOPT(CURLOPT_SSLCERTTYPE, CURLOPTTYPE_STRINGPOINT, 86),
|
---|
1413 |
|
---|
1414 | /* name of the file keeping your private SSL-key */
|
---|
1415 | CURLOPT(CURLOPT_SSLKEY, CURLOPTTYPE_STRINGPOINT, 87),
|
---|
1416 |
|
---|
1417 | /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */
|
---|
1418 | CURLOPT(CURLOPT_SSLKEYTYPE, CURLOPTTYPE_STRINGPOINT, 88),
|
---|
1419 |
|
---|
1420 | /* crypto engine for the SSL-sub system */
|
---|
1421 | CURLOPT(CURLOPT_SSLENGINE, CURLOPTTYPE_STRINGPOINT, 89),
|
---|
1422 |
|
---|
1423 | /* set the crypto engine for the SSL-sub system as default
|
---|
1424 | the param has no meaning...
|
---|
1425 | */
|
---|
1426 | CURLOPT(CURLOPT_SSLENGINE_DEFAULT, CURLOPTTYPE_LONG, 90),
|
---|
1427 |
|
---|
1428 | /* Non-zero value means to use the global dns cache */
|
---|
1429 | /* DEPRECATED, do not use! */
|
---|
1430 | CURLOPTDEPRECATED(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91,
|
---|
1431 | 7.11.1, "Use CURLOPT_SHARE"),
|
---|
1432 |
|
---|
1433 | /* DNS cache timeout */
|
---|
1434 | CURLOPT(CURLOPT_DNS_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 92),
|
---|
1435 |
|
---|
1436 | /* send linked-list of pre-transfer QUOTE commands */
|
---|
1437 | CURLOPT(CURLOPT_PREQUOTE, CURLOPTTYPE_SLISTPOINT, 93),
|
---|
1438 |
|
---|
1439 | /* set the debug function */
|
---|
1440 | CURLOPT(CURLOPT_DEBUGFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 94),
|
---|
1441 |
|
---|
1442 | /* set the data for the debug function */
|
---|
1443 | CURLOPT(CURLOPT_DEBUGDATA, CURLOPTTYPE_CBPOINT, 95),
|
---|
1444 |
|
---|
1445 | /* mark this as start of a cookie session */
|
---|
1446 | CURLOPT(CURLOPT_COOKIESESSION, CURLOPTTYPE_LONG, 96),
|
---|
1447 |
|
---|
1448 | /* The CApath directory used to validate the peer certificate
|
---|
1449 | this option is used only if SSL_VERIFYPEER is true */
|
---|
1450 | CURLOPT(CURLOPT_CAPATH, CURLOPTTYPE_STRINGPOINT, 97),
|
---|
1451 |
|
---|
1452 | /* Instruct libcurl to use a smaller receive buffer */
|
---|
1453 | CURLOPT(CURLOPT_BUFFERSIZE, CURLOPTTYPE_LONG, 98),
|
---|
1454 |
|
---|
1455 | /* Instruct libcurl to not use any signal/alarm handlers, even when using
|
---|
1456 | timeouts. This option is useful for multi-threaded applications.
|
---|
1457 | See libcurl-the-guide for more background information. */
|
---|
1458 | CURLOPT(CURLOPT_NOSIGNAL, CURLOPTTYPE_LONG, 99),
|
---|
1459 |
|
---|
1460 | /* Provide a CURLShare for mutexing non-ts data */
|
---|
1461 | CURLOPT(CURLOPT_SHARE, CURLOPTTYPE_OBJECTPOINT, 100),
|
---|
1462 |
|
---|
1463 | /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
|
---|
1464 | CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and
|
---|
1465 | CURLPROXY_SOCKS5. */
|
---|
1466 | CURLOPT(CURLOPT_PROXYTYPE, CURLOPTTYPE_VALUES, 101),
|
---|
1467 |
|
---|
1468 | /* Set the Accept-Encoding string. Use this to tell a server you would like
|
---|
1469 | the response to be compressed. Before 7.21.6, this was known as
|
---|
1470 | CURLOPT_ENCODING */
|
---|
1471 | CURLOPT(CURLOPT_ACCEPT_ENCODING, CURLOPTTYPE_STRINGPOINT, 102),
|
---|
1472 |
|
---|
1473 | /* Set pointer to private data */
|
---|
1474 | CURLOPT(CURLOPT_PRIVATE, CURLOPTTYPE_OBJECTPOINT, 103),
|
---|
1475 |
|
---|
1476 | /* Set aliases for HTTP 200 in the HTTP Response header */
|
---|
1477 | CURLOPT(CURLOPT_HTTP200ALIASES, CURLOPTTYPE_SLISTPOINT, 104),
|
---|
1478 |
|
---|
1479 | /* Continue to send authentication (user+password) when following locations,
|
---|
1480 | even when hostname changed. This can potentially send off the name
|
---|
1481 | and password to whatever host the server decides. */
|
---|
1482 | CURLOPT(CURLOPT_UNRESTRICTED_AUTH, CURLOPTTYPE_LONG, 105),
|
---|
1483 |
|
---|
1484 | /* Specifically switch on or off the FTP engine's use of the EPRT command (
|
---|
1485 | it also disables the LPRT attempt). By default, those ones will always be
|
---|
1486 | attempted before the good old traditional PORT command. */
|
---|
1487 | CURLOPT(CURLOPT_FTP_USE_EPRT, CURLOPTTYPE_LONG, 106),
|
---|
1488 |
|
---|
1489 | /* Set this to a bitmask value to enable the particular authentications
|
---|
1490 | methods you like. Use this in combination with CURLOPT_USERPWD.
|
---|
1491 | Note that setting multiple bits may cause extra network round-trips. */
|
---|
1492 | CURLOPT(CURLOPT_HTTPAUTH, CURLOPTTYPE_VALUES, 107),
|
---|
1493 |
|
---|
1494 | /* Set the ssl context callback function, currently only for OpenSSL or
|
---|
1495 | WolfSSL ssl_ctx, or mbedTLS mbedtls_ssl_config in the second argument.
|
---|
1496 | The function must match the curl_ssl_ctx_callback prototype. */
|
---|
1497 | CURLOPT(CURLOPT_SSL_CTX_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 108),
|
---|
1498 |
|
---|
1499 | /* Set the userdata for the ssl context callback function's third
|
---|
1500 | argument */
|
---|
1501 | CURLOPT(CURLOPT_SSL_CTX_DATA, CURLOPTTYPE_CBPOINT, 109),
|
---|
1502 |
|
---|
1503 | /* FTP Option that causes missing dirs to be created on the remote server.
|
---|
1504 | In 7.19.4 we introduced the convenience enums for this option using the
|
---|
1505 | CURLFTP_CREATE_DIR prefix.
|
---|
1506 | */
|
---|
1507 | CURLOPT(CURLOPT_FTP_CREATE_MISSING_DIRS, CURLOPTTYPE_LONG, 110),
|
---|
1508 |
|
---|
1509 | /* Set this to a bitmask value to enable the particular authentications
|
---|
1510 | methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
|
---|
1511 | Note that setting multiple bits may cause extra network round-trips. */
|
---|
1512 | CURLOPT(CURLOPT_PROXYAUTH, CURLOPTTYPE_VALUES, 111),
|
---|
1513 |
|
---|
1514 | /* Option that changes the timeout, in seconds, associated with getting a
|
---|
1515 | response. This is different from transfer timeout time and essentially
|
---|
1516 | places a demand on the server to acknowledge commands in a timely
|
---|
1517 | manner. For FTP, SMTP, IMAP and POP3. */
|
---|
1518 | CURLOPT(CURLOPT_SERVER_RESPONSE_TIMEOUT, CURLOPTTYPE_LONG, 112),
|
---|
1519 |
|
---|
1520 | /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
|
---|
1521 | tell libcurl to use those IP versions only. This only has effect on
|
---|
1522 | systems with support for more than one, i.e IPv4 _and_ IPv6. */
|
---|
1523 | CURLOPT(CURLOPT_IPRESOLVE, CURLOPTTYPE_VALUES, 113),
|
---|
1524 |
|
---|
1525 | /* Set this option to limit the size of a file that will be downloaded from
|
---|
1526 | an HTTP or FTP server.
|
---|
1527 |
|
---|
1528 | Note there is also _LARGE version which adds large file support for
|
---|
1529 | platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */
|
---|
1530 | CURLOPT(CURLOPT_MAXFILESIZE, CURLOPTTYPE_LONG, 114),
|
---|
1531 |
|
---|
1532 | /* See the comment for INFILESIZE above, but in short, specifies
|
---|
1533 | * the size of the file being uploaded. -1 means unknown.
|
---|
1534 | */
|
---|
1535 | CURLOPT(CURLOPT_INFILESIZE_LARGE, CURLOPTTYPE_OFF_T, 115),
|
---|
1536 |
|
---|
1537 | /* Sets the continuation offset. There is also a CURLOPTTYPE_LONG version
|
---|
1538 | * of this; look above for RESUME_FROM.
|
---|
1539 | */
|
---|
1540 | CURLOPT(CURLOPT_RESUME_FROM_LARGE, CURLOPTTYPE_OFF_T, 116),
|
---|
1541 |
|
---|
1542 | /* Sets the maximum size of data that will be downloaded from
|
---|
1543 | * an HTTP or FTP server. See MAXFILESIZE above for the LONG version.
|
---|
1544 | */
|
---|
1545 | CURLOPT(CURLOPT_MAXFILESIZE_LARGE, CURLOPTTYPE_OFF_T, 117),
|
---|
1546 |
|
---|
1547 | /* Set this option to the file name of your .netrc file you want libcurl
|
---|
1548 | to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
|
---|
1549 | a poor attempt to find the user's home directory and check for a .netrc
|
---|
1550 | file in there. */
|
---|
1551 | CURLOPT(CURLOPT_NETRC_FILE, CURLOPTTYPE_STRINGPOINT, 118),
|
---|
1552 |
|
---|
1553 | /* Enable SSL/TLS for FTP, pick one of:
|
---|
1554 | CURLUSESSL_TRY - try using SSL, proceed anyway otherwise
|
---|
1555 | CURLUSESSL_CONTROL - SSL for the control connection or fail
|
---|
1556 | CURLUSESSL_ALL - SSL for all communication or fail
|
---|
1557 | */
|
---|
1558 | CURLOPT(CURLOPT_USE_SSL, CURLOPTTYPE_VALUES, 119),
|
---|
1559 |
|
---|
1560 | /* The _LARGE version of the standard POSTFIELDSIZE option */
|
---|
1561 | CURLOPT(CURLOPT_POSTFIELDSIZE_LARGE, CURLOPTTYPE_OFF_T, 120),
|
---|
1562 |
|
---|
1563 | /* Enable/disable the TCP Nagle algorithm */
|
---|
1564 | CURLOPT(CURLOPT_TCP_NODELAY, CURLOPTTYPE_LONG, 121),
|
---|
1565 |
|
---|
1566 | /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
|
---|
1567 | /* 123 OBSOLETE. Gone in 7.16.0 */
|
---|
1568 | /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
|
---|
1569 | /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
|
---|
1570 | /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
|
---|
1571 | /* 127 OBSOLETE. Gone in 7.16.0 */
|
---|
1572 | /* 128 OBSOLETE. Gone in 7.16.0 */
|
---|
1573 |
|
---|
1574 | /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option
|
---|
1575 | can be used to change libcurl's default action which is to first try
|
---|
1576 | "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK
|
---|
1577 | response has been received.
|
---|
1578 |
|
---|
1579 | Available parameters are:
|
---|
1580 | CURLFTPAUTH_DEFAULT - let libcurl decide
|
---|
1581 | CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS
|
---|
1582 | CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL
|
---|
1583 | */
|
---|
1584 | CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_VALUES, 129),
|
---|
1585 |
|
---|
1586 | CURLOPTDEPRECATED(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130,
|
---|
1587 | 7.18.0, "Use CURLOPT_SEEKFUNCTION"),
|
---|
1588 | CURLOPTDEPRECATED(CURLOPT_IOCTLDATA, CURLOPTTYPE_CBPOINT, 131,
|
---|
1589 | 7.18.0, "Use CURLOPT_SEEKDATA"),
|
---|
1590 |
|
---|
1591 | /* 132 OBSOLETE. Gone in 7.16.0 */
|
---|
1592 | /* 133 OBSOLETE. Gone in 7.16.0 */
|
---|
1593 |
|
---|
1594 | /* null-terminated string for pass on to the FTP server when asked for
|
---|
1595 | "account" info */
|
---|
1596 | CURLOPT(CURLOPT_FTP_ACCOUNT, CURLOPTTYPE_STRINGPOINT, 134),
|
---|
1597 |
|
---|
1598 | /* feed cookie into cookie engine */
|
---|
1599 | CURLOPT(CURLOPT_COOKIELIST, CURLOPTTYPE_STRINGPOINT, 135),
|
---|
1600 |
|
---|
1601 | /* ignore Content-Length */
|
---|
1602 | CURLOPT(CURLOPT_IGNORE_CONTENT_LENGTH, CURLOPTTYPE_LONG, 136),
|
---|
1603 |
|
---|
1604 | /* Set to non-zero to skip the IP address received in a 227 PASV FTP server
|
---|
1605 | response. Typically used for FTP-SSL purposes but is not restricted to
|
---|
1606 | that. libcurl will then instead use the same IP address it used for the
|
---|
1607 | control connection. */
|
---|
1608 | CURLOPT(CURLOPT_FTP_SKIP_PASV_IP, CURLOPTTYPE_LONG, 137),
|
---|
1609 |
|
---|
1610 | /* Select "file method" to use when doing FTP, see the curl_ftpmethod
|
---|
1611 | above. */
|
---|
1612 | CURLOPT(CURLOPT_FTP_FILEMETHOD, CURLOPTTYPE_VALUES, 138),
|
---|
1613 |
|
---|
1614 | /* Local port number to bind the socket to */
|
---|
1615 | CURLOPT(CURLOPT_LOCALPORT, CURLOPTTYPE_LONG, 139),
|
---|
1616 |
|
---|
1617 | /* Number of ports to try, including the first one set with LOCALPORT.
|
---|
1618 | Thus, setting it to 1 will make no additional attempts but the first.
|
---|
1619 | */
|
---|
1620 | CURLOPT(CURLOPT_LOCALPORTRANGE, CURLOPTTYPE_LONG, 140),
|
---|
1621 |
|
---|
1622 | /* no transfer, set up connection and let application use the socket by
|
---|
1623 | extracting it with CURLINFO_LASTSOCKET */
|
---|
1624 | CURLOPT(CURLOPT_CONNECT_ONLY, CURLOPTTYPE_LONG, 141),
|
---|
1625 |
|
---|
1626 | /* Function that will be called to convert from the
|
---|
1627 | network encoding (instead of using the iconv calls in libcurl) */
|
---|
1628 | CURLOPTDEPRECATED(CURLOPT_CONV_FROM_NETWORK_FUNCTION,
|
---|
1629 | CURLOPTTYPE_FUNCTIONPOINT, 142,
|
---|
1630 | 7.82.0, "Serves no purpose anymore"),
|
---|
1631 |
|
---|
1632 | /* Function that will be called to convert to the
|
---|
1633 | network encoding (instead of using the iconv calls in libcurl) */
|
---|
1634 | CURLOPTDEPRECATED(CURLOPT_CONV_TO_NETWORK_FUNCTION,
|
---|
1635 | CURLOPTTYPE_FUNCTIONPOINT, 143,
|
---|
1636 | 7.82.0, "Serves no purpose anymore"),
|
---|
1637 |
|
---|
1638 | /* Function that will be called to convert from UTF8
|
---|
1639 | (instead of using the iconv calls in libcurl)
|
---|
1640 | Note that this is used only for SSL certificate processing */
|
---|
1641 | CURLOPTDEPRECATED(CURLOPT_CONV_FROM_UTF8_FUNCTION,
|
---|
1642 | CURLOPTTYPE_FUNCTIONPOINT, 144,
|
---|
1643 | 7.82.0, "Serves no purpose anymore"),
|
---|
1644 |
|
---|
1645 | /* if the connection proceeds too quickly then need to slow it down */
|
---|
1646 | /* limit-rate: maximum number of bytes per second to send or receive */
|
---|
1647 | CURLOPT(CURLOPT_MAX_SEND_SPEED_LARGE, CURLOPTTYPE_OFF_T, 145),
|
---|
1648 | CURLOPT(CURLOPT_MAX_RECV_SPEED_LARGE, CURLOPTTYPE_OFF_T, 146),
|
---|
1649 |
|
---|
1650 | /* Pointer to command string to send if USER/PASS fails. */
|
---|
1651 | CURLOPT(CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPTTYPE_STRINGPOINT, 147),
|
---|
1652 |
|
---|
1653 | /* callback function for setting socket options */
|
---|
1654 | CURLOPT(CURLOPT_SOCKOPTFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 148),
|
---|
1655 | CURLOPT(CURLOPT_SOCKOPTDATA, CURLOPTTYPE_CBPOINT, 149),
|
---|
1656 |
|
---|
1657 | /* set to 0 to disable session ID re-use for this transfer, default is
|
---|
1658 | enabled (== 1) */
|
---|
1659 | CURLOPT(CURLOPT_SSL_SESSIONID_CACHE, CURLOPTTYPE_LONG, 150),
|
---|
1660 |
|
---|
1661 | /* allowed SSH authentication methods */
|
---|
1662 | CURLOPT(CURLOPT_SSH_AUTH_TYPES, CURLOPTTYPE_VALUES, 151),
|
---|
1663 |
|
---|
1664 | /* Used by scp/sftp to do public/private key authentication */
|
---|
1665 | CURLOPT(CURLOPT_SSH_PUBLIC_KEYFILE, CURLOPTTYPE_STRINGPOINT, 152),
|
---|
1666 | CURLOPT(CURLOPT_SSH_PRIVATE_KEYFILE, CURLOPTTYPE_STRINGPOINT, 153),
|
---|
1667 |
|
---|
1668 | /* Send CCC (Clear Command Channel) after authentication */
|
---|
1669 | CURLOPT(CURLOPT_FTP_SSL_CCC, CURLOPTTYPE_LONG, 154),
|
---|
1670 |
|
---|
1671 | /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */
|
---|
1672 | CURLOPT(CURLOPT_TIMEOUT_MS, CURLOPTTYPE_LONG, 155),
|
---|
1673 | CURLOPT(CURLOPT_CONNECTTIMEOUT_MS, CURLOPTTYPE_LONG, 156),
|
---|
1674 |
|
---|
1675 | /* set to zero to disable the libcurl's decoding and thus pass the raw body
|
---|
1676 | data to the application even when it is encoded/compressed */
|
---|
1677 | CURLOPT(CURLOPT_HTTP_TRANSFER_DECODING, CURLOPTTYPE_LONG, 157),
|
---|
1678 | CURLOPT(CURLOPT_HTTP_CONTENT_DECODING, CURLOPTTYPE_LONG, 158),
|
---|
1679 |
|
---|
1680 | /* Permission used when creating new files and directories on the remote
|
---|
1681 | server for protocols that support it, SFTP/SCP/FILE */
|
---|
1682 | CURLOPT(CURLOPT_NEW_FILE_PERMS, CURLOPTTYPE_LONG, 159),
|
---|
1683 | CURLOPT(CURLOPT_NEW_DIRECTORY_PERMS, CURLOPTTYPE_LONG, 160),
|
---|
1684 |
|
---|
1685 | /* Set the behavior of POST when redirecting. Values must be set to one
|
---|
1686 | of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
|
---|
1687 | CURLOPT(CURLOPT_POSTREDIR, CURLOPTTYPE_VALUES, 161),
|
---|
1688 |
|
---|
1689 | /* used by scp/sftp to verify the host's public key */
|
---|
1690 | CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, CURLOPTTYPE_STRINGPOINT, 162),
|
---|
1691 |
|
---|
1692 | /* Callback function for opening socket (instead of socket(2)). Optionally,
|
---|
1693 | callback is able change the address or refuse to connect returning
|
---|
1694 | CURL_SOCKET_BAD. The callback should have type
|
---|
1695 | curl_opensocket_callback */
|
---|
1696 | CURLOPT(CURLOPT_OPENSOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 163),
|
---|
1697 | CURLOPT(CURLOPT_OPENSOCKETDATA, CURLOPTTYPE_CBPOINT, 164),
|
---|
1698 |
|
---|
1699 | /* POST volatile input fields. */
|
---|
1700 | CURLOPT(CURLOPT_COPYPOSTFIELDS, CURLOPTTYPE_OBJECTPOINT, 165),
|
---|
1701 |
|
---|
1702 | /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
|
---|
1703 | CURLOPT(CURLOPT_PROXY_TRANSFER_MODE, CURLOPTTYPE_LONG, 166),
|
---|
1704 |
|
---|
1705 | /* Callback function for seeking in the input stream */
|
---|
1706 | CURLOPT(CURLOPT_SEEKFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 167),
|
---|
1707 | CURLOPT(CURLOPT_SEEKDATA, CURLOPTTYPE_CBPOINT, 168),
|
---|
1708 |
|
---|
1709 | /* CRL file */
|
---|
1710 | CURLOPT(CURLOPT_CRLFILE, CURLOPTTYPE_STRINGPOINT, 169),
|
---|
1711 |
|
---|
1712 | /* Issuer certificate */
|
---|
1713 | CURLOPT(CURLOPT_ISSUERCERT, CURLOPTTYPE_STRINGPOINT, 170),
|
---|
1714 |
|
---|
1715 | /* (IPv6) Address scope */
|
---|
1716 | CURLOPT(CURLOPT_ADDRESS_SCOPE, CURLOPTTYPE_LONG, 171),
|
---|
1717 |
|
---|
1718 | /* Collect certificate chain info and allow it to get retrievable with
|
---|
1719 | CURLINFO_CERTINFO after the transfer is complete. */
|
---|
1720 | CURLOPT(CURLOPT_CERTINFO, CURLOPTTYPE_LONG, 172),
|
---|
1721 |
|
---|
1722 | /* "name" and "pwd" to use when fetching. */
|
---|
1723 | CURLOPT(CURLOPT_USERNAME, CURLOPTTYPE_STRINGPOINT, 173),
|
---|
1724 | CURLOPT(CURLOPT_PASSWORD, CURLOPTTYPE_STRINGPOINT, 174),
|
---|
1725 |
|
---|
1726 | /* "name" and "pwd" to use with Proxy when fetching. */
|
---|
1727 | CURLOPT(CURLOPT_PROXYUSERNAME, CURLOPTTYPE_STRINGPOINT, 175),
|
---|
1728 | CURLOPT(CURLOPT_PROXYPASSWORD, CURLOPTTYPE_STRINGPOINT, 176),
|
---|
1729 |
|
---|
1730 | /* Comma separated list of hostnames defining no-proxy zones. These should
|
---|
1731 | match both hostnames directly, and hostnames within a domain. For
|
---|
1732 | example, local.com will match local.com and www.local.com, but NOT
|
---|
1733 | notlocal.com or www.notlocal.com. For compatibility with other
|
---|
1734 | implementations of this, .local.com will be considered to be the same as
|
---|
1735 | local.com. A single * is the only valid wildcard, and effectively
|
---|
1736 | disables the use of proxy. */
|
---|
1737 | CURLOPT(CURLOPT_NOPROXY, CURLOPTTYPE_STRINGPOINT, 177),
|
---|
1738 |
|
---|
1739 | /* block size for TFTP transfers */
|
---|
1740 | CURLOPT(CURLOPT_TFTP_BLKSIZE, CURLOPTTYPE_LONG, 178),
|
---|
1741 |
|
---|
1742 | /* Socks Service */
|
---|
1743 | /* DEPRECATED, do not use! */
|
---|
1744 | CURLOPTDEPRECATED(CURLOPT_SOCKS5_GSSAPI_SERVICE,
|
---|
1745 | CURLOPTTYPE_STRINGPOINT, 179,
|
---|
1746 | 7.49.0, "Use CURLOPT_PROXY_SERVICE_NAME"),
|
---|
1747 |
|
---|
1748 | /* Socks Service */
|
---|
1749 | CURLOPT(CURLOPT_SOCKS5_GSSAPI_NEC, CURLOPTTYPE_LONG, 180),
|
---|
1750 |
|
---|
1751 | /* set the bitmask for the protocols that are allowed to be used for the
|
---|
1752 | transfer, which thus helps the app which takes URLs from users or other
|
---|
1753 | external inputs and want to restrict what protocol(s) to deal
|
---|
1754 | with. Defaults to CURLPROTO_ALL. */
|
---|
1755 | CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
|
---|
1756 | 7.85.0, "Use CURLOPT_PROTOCOLS_STR"),
|
---|
1757 |
|
---|
1758 | /* set the bitmask for the protocols that libcurl is allowed to follow to,
|
---|
1759 | as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
|
---|
1760 | to be set in both bitmasks to be allowed to get redirected to. */
|
---|
1761 | CURLOPTDEPRECATED(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182,
|
---|
1762 | 7.85.0, "Use CURLOPT_REDIR_PROTOCOLS_STR"),
|
---|
1763 |
|
---|
1764 | /* set the SSH knownhost file name to use */
|
---|
1765 | CURLOPT(CURLOPT_SSH_KNOWNHOSTS, CURLOPTTYPE_STRINGPOINT, 183),
|
---|
1766 |
|
---|
1767 | /* set the SSH host key callback, must point to a curl_sshkeycallback
|
---|
1768 | function */
|
---|
1769 | CURLOPT(CURLOPT_SSH_KEYFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 184),
|
---|
1770 |
|
---|
1771 | /* set the SSH host key callback custom pointer */
|
---|
1772 | CURLOPT(CURLOPT_SSH_KEYDATA, CURLOPTTYPE_CBPOINT, 185),
|
---|
1773 |
|
---|
1774 | /* set the SMTP mail originator */
|
---|
1775 | CURLOPT(CURLOPT_MAIL_FROM, CURLOPTTYPE_STRINGPOINT, 186),
|
---|
1776 |
|
---|
1777 | /* set the list of SMTP mail receiver(s) */
|
---|
1778 | CURLOPT(CURLOPT_MAIL_RCPT, CURLOPTTYPE_SLISTPOINT, 187),
|
---|
1779 |
|
---|
1780 | /* FTP: send PRET before PASV */
|
---|
1781 | CURLOPT(CURLOPT_FTP_USE_PRET, CURLOPTTYPE_LONG, 188),
|
---|
1782 |
|
---|
1783 | /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */
|
---|
1784 | CURLOPT(CURLOPT_RTSP_REQUEST, CURLOPTTYPE_VALUES, 189),
|
---|
1785 |
|
---|
1786 | /* The RTSP session identifier */
|
---|
1787 | CURLOPT(CURLOPT_RTSP_SESSION_ID, CURLOPTTYPE_STRINGPOINT, 190),
|
---|
1788 |
|
---|
1789 | /* The RTSP stream URI */
|
---|
1790 | CURLOPT(CURLOPT_RTSP_STREAM_URI, CURLOPTTYPE_STRINGPOINT, 191),
|
---|
1791 |
|
---|
1792 | /* The Transport: header to use in RTSP requests */
|
---|
1793 | CURLOPT(CURLOPT_RTSP_TRANSPORT, CURLOPTTYPE_STRINGPOINT, 192),
|
---|
1794 |
|
---|
1795 | /* Manually initialize the client RTSP CSeq for this handle */
|
---|
1796 | CURLOPT(CURLOPT_RTSP_CLIENT_CSEQ, CURLOPTTYPE_LONG, 193),
|
---|
1797 |
|
---|
1798 | /* Manually initialize the server RTSP CSeq for this handle */
|
---|
1799 | CURLOPT(CURLOPT_RTSP_SERVER_CSEQ, CURLOPTTYPE_LONG, 194),
|
---|
1800 |
|
---|
1801 | /* The stream to pass to INTERLEAVEFUNCTION. */
|
---|
1802 | CURLOPT(CURLOPT_INTERLEAVEDATA, CURLOPTTYPE_CBPOINT, 195),
|
---|
1803 |
|
---|
1804 | /* Let the application define a custom write method for RTP data */
|
---|
1805 | CURLOPT(CURLOPT_INTERLEAVEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 196),
|
---|
1806 |
|
---|
1807 | /* Turn on wildcard matching */
|
---|
1808 | CURLOPT(CURLOPT_WILDCARDMATCH, CURLOPTTYPE_LONG, 197),
|
---|
1809 |
|
---|
1810 | /* Directory matching callback called before downloading of an
|
---|
1811 | individual file (chunk) started */
|
---|
1812 | CURLOPT(CURLOPT_CHUNK_BGN_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 198),
|
---|
1813 |
|
---|
1814 | /* Directory matching callback called after the file (chunk)
|
---|
1815 | was downloaded, or skipped */
|
---|
1816 | CURLOPT(CURLOPT_CHUNK_END_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 199),
|
---|
1817 |
|
---|
1818 | /* Change match (fnmatch-like) callback for wildcard matching */
|
---|
1819 | CURLOPT(CURLOPT_FNMATCH_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 200),
|
---|
1820 |
|
---|
1821 | /* Let the application define custom chunk data pointer */
|
---|
1822 | CURLOPT(CURLOPT_CHUNK_DATA, CURLOPTTYPE_CBPOINT, 201),
|
---|
1823 |
|
---|
1824 | /* FNMATCH_FUNCTION user pointer */
|
---|
1825 | CURLOPT(CURLOPT_FNMATCH_DATA, CURLOPTTYPE_CBPOINT, 202),
|
---|
1826 |
|
---|
1827 | /* send linked-list of name:port:address sets */
|
---|
1828 | CURLOPT(CURLOPT_RESOLVE, CURLOPTTYPE_SLISTPOINT, 203),
|
---|
1829 |
|
---|
1830 | /* Set a username for authenticated TLS */
|
---|
1831 | CURLOPT(CURLOPT_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 204),
|
---|
1832 |
|
---|
1833 | /* Set a password for authenticated TLS */
|
---|
1834 | CURLOPT(CURLOPT_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 205),
|
---|
1835 |
|
---|
1836 | /* Set authentication type for authenticated TLS */
|
---|
1837 | CURLOPT(CURLOPT_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 206),
|
---|
1838 |
|
---|
1839 | /* Set to 1 to enable the "TE:" header in HTTP requests to ask for
|
---|
1840 | compressed transfer-encoded responses. Set to 0 to disable the use of TE:
|
---|
1841 | in outgoing requests. The current default is 0, but it might change in a
|
---|
1842 | future libcurl release.
|
---|
1843 |
|
---|
1844 | libcurl will ask for the compressed methods it knows of, and if that
|
---|
1845 | isn't any, it will not ask for transfer-encoding at all even if this
|
---|
1846 | option is set to 1.
|
---|
1847 |
|
---|
1848 | */
|
---|
1849 | CURLOPT(CURLOPT_TRANSFER_ENCODING, CURLOPTTYPE_LONG, 207),
|
---|
1850 |
|
---|
1851 | /* Callback function for closing socket (instead of close(2)). The callback
|
---|
1852 | should have type curl_closesocket_callback */
|
---|
1853 | CURLOPT(CURLOPT_CLOSESOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 208),
|
---|
1854 | CURLOPT(CURLOPT_CLOSESOCKETDATA, CURLOPTTYPE_CBPOINT, 209),
|
---|
1855 |
|
---|
1856 | /* allow GSSAPI credential delegation */
|
---|
1857 | CURLOPT(CURLOPT_GSSAPI_DELEGATION, CURLOPTTYPE_VALUES, 210),
|
---|
1858 |
|
---|
1859 | /* Set the name servers to use for DNS resolution */
|
---|
1860 | CURLOPT(CURLOPT_DNS_SERVERS, CURLOPTTYPE_STRINGPOINT, 211),
|
---|
1861 |
|
---|
1862 | /* Time-out accept operations (currently for FTP only) after this amount
|
---|
1863 | of milliseconds. */
|
---|
1864 | CURLOPT(CURLOPT_ACCEPTTIMEOUT_MS, CURLOPTTYPE_LONG, 212),
|
---|
1865 |
|
---|
1866 | /* Set TCP keepalive */
|
---|
1867 | CURLOPT(CURLOPT_TCP_KEEPALIVE, CURLOPTTYPE_LONG, 213),
|
---|
1868 |
|
---|
1869 | /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */
|
---|
1870 | CURLOPT(CURLOPT_TCP_KEEPIDLE, CURLOPTTYPE_LONG, 214),
|
---|
1871 | CURLOPT(CURLOPT_TCP_KEEPINTVL, CURLOPTTYPE_LONG, 215),
|
---|
1872 |
|
---|
1873 | /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
|
---|
1874 | CURLOPT(CURLOPT_SSL_OPTIONS, CURLOPTTYPE_VALUES, 216),
|
---|
1875 |
|
---|
1876 | /* Set the SMTP auth originator */
|
---|
1877 | CURLOPT(CURLOPT_MAIL_AUTH, CURLOPTTYPE_STRINGPOINT, 217),
|
---|
1878 |
|
---|
1879 | /* Enable/disable SASL initial response */
|
---|
1880 | CURLOPT(CURLOPT_SASL_IR, CURLOPTTYPE_LONG, 218),
|
---|
1881 |
|
---|
1882 | /* Function that will be called instead of the internal progress display
|
---|
1883 | * function. This function should be defined as the curl_xferinfo_callback
|
---|
1884 | * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */
|
---|
1885 | CURLOPT(CURLOPT_XFERINFOFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 219),
|
---|
1886 |
|
---|
1887 | /* The XOAUTH2 bearer token */
|
---|
1888 | CURLOPT(CURLOPT_XOAUTH2_BEARER, CURLOPTTYPE_STRINGPOINT, 220),
|
---|
1889 |
|
---|
1890 | /* Set the interface string to use as outgoing network
|
---|
1891 | * interface for DNS requests.
|
---|
1892 | * Only supported by the c-ares DNS backend */
|
---|
1893 | CURLOPT(CURLOPT_DNS_INTERFACE, CURLOPTTYPE_STRINGPOINT, 221),
|
---|
1894 |
|
---|
1895 | /* Set the local IPv4 address to use for outgoing DNS requests.
|
---|
1896 | * Only supported by the c-ares DNS backend */
|
---|
1897 | CURLOPT(CURLOPT_DNS_LOCAL_IP4, CURLOPTTYPE_STRINGPOINT, 222),
|
---|
1898 |
|
---|
1899 | /* Set the local IPv6 address to use for outgoing DNS requests.
|
---|
1900 | * Only supported by the c-ares DNS backend */
|
---|
1901 | CURLOPT(CURLOPT_DNS_LOCAL_IP6, CURLOPTTYPE_STRINGPOINT, 223),
|
---|
1902 |
|
---|
1903 | /* Set authentication options directly */
|
---|
1904 | CURLOPT(CURLOPT_LOGIN_OPTIONS, CURLOPTTYPE_STRINGPOINT, 224),
|
---|
1905 |
|
---|
1906 | /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
|
---|
1907 | CURLOPTDEPRECATED(CURLOPT_SSL_ENABLE_NPN, CURLOPTTYPE_LONG, 225,
|
---|
1908 | 7.86.0, "Has no function"),
|
---|
1909 |
|
---|
1910 | /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
|
---|
1911 | CURLOPT(CURLOPT_SSL_ENABLE_ALPN, CURLOPTTYPE_LONG, 226),
|
---|
1912 |
|
---|
1913 | /* Time to wait for a response to an HTTP request containing an
|
---|
1914 | * Expect: 100-continue header before sending the data anyway. */
|
---|
1915 | CURLOPT(CURLOPT_EXPECT_100_TIMEOUT_MS, CURLOPTTYPE_LONG, 227),
|
---|
1916 |
|
---|
1917 | /* This points to a linked list of headers used for proxy requests only,
|
---|
1918 | struct curl_slist kind */
|
---|
1919 | CURLOPT(CURLOPT_PROXYHEADER, CURLOPTTYPE_SLISTPOINT, 228),
|
---|
1920 |
|
---|
1921 | /* Pass in a bitmask of "header options" */
|
---|
1922 | CURLOPT(CURLOPT_HEADEROPT, CURLOPTTYPE_VALUES, 229),
|
---|
1923 |
|
---|
1924 | /* The public key in DER form used to validate the peer public key
|
---|
1925 | this option is used only if SSL_VERIFYPEER is true */
|
---|
1926 | CURLOPT(CURLOPT_PINNEDPUBLICKEY, CURLOPTTYPE_STRINGPOINT, 230),
|
---|
1927 |
|
---|
1928 | /* Path to Unix domain socket */
|
---|
1929 | CURLOPT(CURLOPT_UNIX_SOCKET_PATH, CURLOPTTYPE_STRINGPOINT, 231),
|
---|
1930 |
|
---|
1931 | /* Set if we should verify the certificate status. */
|
---|
1932 | CURLOPT(CURLOPT_SSL_VERIFYSTATUS, CURLOPTTYPE_LONG, 232),
|
---|
1933 |
|
---|
1934 | /* Set if we should enable TLS false start. */
|
---|
1935 | CURLOPT(CURLOPT_SSL_FALSESTART, CURLOPTTYPE_LONG, 233),
|
---|
1936 |
|
---|
1937 | /* Do not squash dot-dot sequences */
|
---|
1938 | CURLOPT(CURLOPT_PATH_AS_IS, CURLOPTTYPE_LONG, 234),
|
---|
1939 |
|
---|
1940 | /* Proxy Service Name */
|
---|
1941 | CURLOPT(CURLOPT_PROXY_SERVICE_NAME, CURLOPTTYPE_STRINGPOINT, 235),
|
---|
1942 |
|
---|
1943 | /* Service Name */
|
---|
1944 | CURLOPT(CURLOPT_SERVICE_NAME, CURLOPTTYPE_STRINGPOINT, 236),
|
---|
1945 |
|
---|
1946 | /* Wait/don't wait for pipe/mutex to clarify */
|
---|
1947 | CURLOPT(CURLOPT_PIPEWAIT, CURLOPTTYPE_LONG, 237),
|
---|
1948 |
|
---|
1949 | /* Set the protocol used when curl is given a URL without a protocol */
|
---|
1950 | CURLOPT(CURLOPT_DEFAULT_PROTOCOL, CURLOPTTYPE_STRINGPOINT, 238),
|
---|
1951 |
|
---|
1952 | /* Set stream weight, 1 - 256 (default is 16) */
|
---|
1953 | CURLOPT(CURLOPT_STREAM_WEIGHT, CURLOPTTYPE_LONG, 239),
|
---|
1954 |
|
---|
1955 | /* Set stream dependency on another CURL handle */
|
---|
1956 | CURLOPT(CURLOPT_STREAM_DEPENDS, CURLOPTTYPE_OBJECTPOINT, 240),
|
---|
1957 |
|
---|
1958 | /* Set E-xclusive stream dependency on another CURL handle */
|
---|
1959 | CURLOPT(CURLOPT_STREAM_DEPENDS_E, CURLOPTTYPE_OBJECTPOINT, 241),
|
---|
1960 |
|
---|
1961 | /* Do not send any tftp option requests to the server */
|
---|
1962 | CURLOPT(CURLOPT_TFTP_NO_OPTIONS, CURLOPTTYPE_LONG, 242),
|
---|
1963 |
|
---|
1964 | /* Linked-list of host:port:connect-to-host:connect-to-port,
|
---|
1965 | overrides the URL's host:port (only for the network layer) */
|
---|
1966 | CURLOPT(CURLOPT_CONNECT_TO, CURLOPTTYPE_SLISTPOINT, 243),
|
---|
1967 |
|
---|
1968 | /* Set TCP Fast Open */
|
---|
1969 | CURLOPT(CURLOPT_TCP_FASTOPEN, CURLOPTTYPE_LONG, 244),
|
---|
1970 |
|
---|
1971 | /* Continue to send data if the server responds early with an
|
---|
1972 | * HTTP status code >= 300 */
|
---|
1973 | CURLOPT(CURLOPT_KEEP_SENDING_ON_ERROR, CURLOPTTYPE_LONG, 245),
|
---|
1974 |
|
---|
1975 | /* The CApath or CAfile used to validate the proxy certificate
|
---|
1976 | this option is used only if PROXY_SSL_VERIFYPEER is true */
|
---|
1977 | CURLOPT(CURLOPT_PROXY_CAINFO, CURLOPTTYPE_STRINGPOINT, 246),
|
---|
1978 |
|
---|
1979 | /* The CApath directory used to validate the proxy certificate
|
---|
1980 | this option is used only if PROXY_SSL_VERIFYPEER is true */
|
---|
1981 | CURLOPT(CURLOPT_PROXY_CAPATH, CURLOPTTYPE_STRINGPOINT, 247),
|
---|
1982 |
|
---|
1983 | /* Set if we should verify the proxy in ssl handshake,
|
---|
1984 | set 1 to verify. */
|
---|
1985 | CURLOPT(CURLOPT_PROXY_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 248),
|
---|
1986 |
|
---|
1987 | /* Set if we should verify the Common name from the proxy certificate in ssl
|
---|
1988 | * handshake, set 1 to check existence, 2 to ensure that it matches
|
---|
1989 | * the provided hostname. */
|
---|
1990 | CURLOPT(CURLOPT_PROXY_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 249),
|
---|
1991 |
|
---|
1992 | /* What version to specifically try to use for proxy.
|
---|
1993 | See CURL_SSLVERSION defines below. */
|
---|
1994 | CURLOPT(CURLOPT_PROXY_SSLVERSION, CURLOPTTYPE_VALUES, 250),
|
---|
1995 |
|
---|
1996 | /* Set a username for authenticated TLS for proxy */
|
---|
1997 | CURLOPT(CURLOPT_PROXY_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 251),
|
---|
1998 |
|
---|
1999 | /* Set a password for authenticated TLS for proxy */
|
---|
2000 | CURLOPT(CURLOPT_PROXY_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 252),
|
---|
2001 |
|
---|
2002 | /* Set authentication type for authenticated TLS for proxy */
|
---|
2003 | CURLOPT(CURLOPT_PROXY_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 253),
|
---|
2004 |
|
---|
2005 | /* name of the file keeping your private SSL-certificate for proxy */
|
---|
2006 | CURLOPT(CURLOPT_PROXY_SSLCERT, CURLOPTTYPE_STRINGPOINT, 254),
|
---|
2007 |
|
---|
2008 | /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for
|
---|
2009 | proxy */
|
---|
2010 | CURLOPT(CURLOPT_PROXY_SSLCERTTYPE, CURLOPTTYPE_STRINGPOINT, 255),
|
---|
2011 |
|
---|
2012 | /* name of the file keeping your private SSL-key for proxy */
|
---|
2013 | CURLOPT(CURLOPT_PROXY_SSLKEY, CURLOPTTYPE_STRINGPOINT, 256),
|
---|
2014 |
|
---|
2015 | /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for
|
---|
2016 | proxy */
|
---|
2017 | CURLOPT(CURLOPT_PROXY_SSLKEYTYPE, CURLOPTTYPE_STRINGPOINT, 257),
|
---|
2018 |
|
---|
2019 | /* password for the SSL private key for proxy */
|
---|
2020 | CURLOPT(CURLOPT_PROXY_KEYPASSWD, CURLOPTTYPE_STRINGPOINT, 258),
|
---|
2021 |
|
---|
2022 | /* Specify which SSL ciphers to use for proxy */
|
---|
2023 | CURLOPT(CURLOPT_PROXY_SSL_CIPHER_LIST, CURLOPTTYPE_STRINGPOINT, 259),
|
---|
2024 |
|
---|
2025 | /* CRL file for proxy */
|
---|
2026 | CURLOPT(CURLOPT_PROXY_CRLFILE, CURLOPTTYPE_STRINGPOINT, 260),
|
---|
2027 |
|
---|
2028 | /* Enable/disable specific SSL features with a bitmask for proxy, see
|
---|
2029 | CURLSSLOPT_* */
|
---|
2030 | CURLOPT(CURLOPT_PROXY_SSL_OPTIONS, CURLOPTTYPE_LONG, 261),
|
---|
2031 |
|
---|
2032 | /* Name of pre proxy to use. */
|
---|
2033 | CURLOPT(CURLOPT_PRE_PROXY, CURLOPTTYPE_STRINGPOINT, 262),
|
---|
2034 |
|
---|
2035 | /* The public key in DER form used to validate the proxy public key
|
---|
2036 | this option is used only if PROXY_SSL_VERIFYPEER is true */
|
---|
2037 | CURLOPT(CURLOPT_PROXY_PINNEDPUBLICKEY, CURLOPTTYPE_STRINGPOINT, 263),
|
---|
2038 |
|
---|
2039 | /* Path to an abstract Unix domain socket */
|
---|
2040 | CURLOPT(CURLOPT_ABSTRACT_UNIX_SOCKET, CURLOPTTYPE_STRINGPOINT, 264),
|
---|
2041 |
|
---|
2042 | /* Suppress proxy CONNECT response headers from user callbacks */
|
---|
2043 | CURLOPT(CURLOPT_SUPPRESS_CONNECT_HEADERS, CURLOPTTYPE_LONG, 265),
|
---|
2044 |
|
---|
2045 | /* The request target, instead of extracted from the URL */
|
---|
2046 | CURLOPT(CURLOPT_REQUEST_TARGET, CURLOPTTYPE_STRINGPOINT, 266),
|
---|
2047 |
|
---|
2048 | /* bitmask of allowed auth methods for connections to SOCKS5 proxies */
|
---|
2049 | CURLOPT(CURLOPT_SOCKS5_AUTH, CURLOPTTYPE_LONG, 267),
|
---|
2050 |
|
---|
2051 | /* Enable/disable SSH compression */
|
---|
2052 | CURLOPT(CURLOPT_SSH_COMPRESSION, CURLOPTTYPE_LONG, 268),
|
---|
2053 |
|
---|
2054 | /* Post MIME data. */
|
---|
2055 | CURLOPT(CURLOPT_MIMEPOST, CURLOPTTYPE_OBJECTPOINT, 269),
|
---|
2056 |
|
---|
2057 | /* Time to use with the CURLOPT_TIMECONDITION. Specified in number of
|
---|
2058 | seconds since 1 Jan 1970. */
|
---|
2059 | CURLOPT(CURLOPT_TIMEVALUE_LARGE, CURLOPTTYPE_OFF_T, 270),
|
---|
2060 |
|
---|
2061 | /* Head start in milliseconds to give happy eyeballs. */
|
---|
2062 | CURLOPT(CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, CURLOPTTYPE_LONG, 271),
|
---|
2063 |
|
---|
2064 | /* Function that will be called before a resolver request is made */
|
---|
2065 | CURLOPT(CURLOPT_RESOLVER_START_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 272),
|
---|
2066 |
|
---|
2067 | /* User data to pass to the resolver start callback. */
|
---|
2068 | CURLOPT(CURLOPT_RESOLVER_START_DATA, CURLOPTTYPE_CBPOINT, 273),
|
---|
2069 |
|
---|
2070 | /* send HAProxy PROXY protocol header? */
|
---|
2071 | CURLOPT(CURLOPT_HAPROXYPROTOCOL, CURLOPTTYPE_LONG, 274),
|
---|
2072 |
|
---|
2073 | /* shuffle addresses before use when DNS returns multiple */
|
---|
2074 | CURLOPT(CURLOPT_DNS_SHUFFLE_ADDRESSES, CURLOPTTYPE_LONG, 275),
|
---|
2075 |
|
---|
2076 | /* Specify which TLS 1.3 ciphers suites to use */
|
---|
2077 | CURLOPT(CURLOPT_TLS13_CIPHERS, CURLOPTTYPE_STRINGPOINT, 276),
|
---|
2078 | CURLOPT(CURLOPT_PROXY_TLS13_CIPHERS, CURLOPTTYPE_STRINGPOINT, 277),
|
---|
2079 |
|
---|
2080 | /* Disallow specifying username/login in URL. */
|
---|
2081 | CURLOPT(CURLOPT_DISALLOW_USERNAME_IN_URL, CURLOPTTYPE_LONG, 278),
|
---|
2082 |
|
---|
2083 | /* DNS-over-HTTPS URL */
|
---|
2084 | CURLOPT(CURLOPT_DOH_URL, CURLOPTTYPE_STRINGPOINT, 279),
|
---|
2085 |
|
---|
2086 | /* Preferred buffer size to use for uploads */
|
---|
2087 | CURLOPT(CURLOPT_UPLOAD_BUFFERSIZE, CURLOPTTYPE_LONG, 280),
|
---|
2088 |
|
---|
2089 | /* Time in ms between connection upkeep calls for long-lived connections. */
|
---|
2090 | CURLOPT(CURLOPT_UPKEEP_INTERVAL_MS, CURLOPTTYPE_LONG, 281),
|
---|
2091 |
|
---|
2092 | /* Specify URL using CURL URL API. */
|
---|
2093 | CURLOPT(CURLOPT_CURLU, CURLOPTTYPE_OBJECTPOINT, 282),
|
---|
2094 |
|
---|
2095 | /* add trailing data just after no more data is available */
|
---|
2096 | CURLOPT(CURLOPT_TRAILERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 283),
|
---|
2097 |
|
---|
2098 | /* pointer to be passed to HTTP_TRAILER_FUNCTION */
|
---|
2099 | CURLOPT(CURLOPT_TRAILERDATA, CURLOPTTYPE_CBPOINT, 284),
|
---|
2100 |
|
---|
2101 | /* set this to 1L to allow HTTP/0.9 responses or 0L to disallow */
|
---|
2102 | CURLOPT(CURLOPT_HTTP09_ALLOWED, CURLOPTTYPE_LONG, 285),
|
---|
2103 |
|
---|
2104 | /* alt-svc control bitmask */
|
---|
2105 | CURLOPT(CURLOPT_ALTSVC_CTRL, CURLOPTTYPE_LONG, 286),
|
---|
2106 |
|
---|
2107 | /* alt-svc cache file name to possibly read from/write to */
|
---|
2108 | CURLOPT(CURLOPT_ALTSVC, CURLOPTTYPE_STRINGPOINT, 287),
|
---|
2109 |
|
---|
2110 | /* maximum age (idle time) of a connection to consider it for reuse
|
---|
2111 | * (in seconds) */
|
---|
2112 | CURLOPT(CURLOPT_MAXAGE_CONN, CURLOPTTYPE_LONG, 288),
|
---|
2113 |
|
---|
2114 | /* SASL authorization identity */
|
---|
2115 | CURLOPT(CURLOPT_SASL_AUTHZID, CURLOPTTYPE_STRINGPOINT, 289),
|
---|
2116 |
|
---|
2117 | /* allow RCPT TO command to fail for some recipients */
|
---|
2118 | CURLOPT(CURLOPT_MAIL_RCPT_ALLLOWFAILS, CURLOPTTYPE_LONG, 290),
|
---|
2119 |
|
---|
2120 | /* the private SSL-certificate as a "blob" */
|
---|
2121 | CURLOPT(CURLOPT_SSLCERT_BLOB, CURLOPTTYPE_BLOB, 291),
|
---|
2122 | CURLOPT(CURLOPT_SSLKEY_BLOB, CURLOPTTYPE_BLOB, 292),
|
---|
2123 | CURLOPT(CURLOPT_PROXY_SSLCERT_BLOB, CURLOPTTYPE_BLOB, 293),
|
---|
2124 | CURLOPT(CURLOPT_PROXY_SSLKEY_BLOB, CURLOPTTYPE_BLOB, 294),
|
---|
2125 | CURLOPT(CURLOPT_ISSUERCERT_BLOB, CURLOPTTYPE_BLOB, 295),
|
---|
2126 |
|
---|
2127 | /* Issuer certificate for proxy */
|
---|
2128 | CURLOPT(CURLOPT_PROXY_ISSUERCERT, CURLOPTTYPE_STRINGPOINT, 296),
|
---|
2129 | CURLOPT(CURLOPT_PROXY_ISSUERCERT_BLOB, CURLOPTTYPE_BLOB, 297),
|
---|
2130 |
|
---|
2131 | /* the EC curves requested by the TLS client (RFC 8422, 5.1);
|
---|
2132 | * OpenSSL support via 'set_groups'/'set_curves':
|
---|
2133 | * https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_groups.html
|
---|
2134 | */
|
---|
2135 | CURLOPT(CURLOPT_SSL_EC_CURVES, CURLOPTTYPE_STRINGPOINT, 298),
|
---|
2136 |
|
---|
2137 | /* HSTS bitmask */
|
---|
2138 | CURLOPT(CURLOPT_HSTS_CTRL, CURLOPTTYPE_LONG, 299),
|
---|
2139 | /* HSTS file name */
|
---|
2140 | CURLOPT(CURLOPT_HSTS, CURLOPTTYPE_STRINGPOINT, 300),
|
---|
2141 |
|
---|
2142 | /* HSTS read callback */
|
---|
2143 | CURLOPT(CURLOPT_HSTSREADFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 301),
|
---|
2144 | CURLOPT(CURLOPT_HSTSREADDATA, CURLOPTTYPE_CBPOINT, 302),
|
---|
2145 |
|
---|
2146 | /* HSTS write callback */
|
---|
2147 | CURLOPT(CURLOPT_HSTSWRITEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 303),
|
---|
2148 | CURLOPT(CURLOPT_HSTSWRITEDATA, CURLOPTTYPE_CBPOINT, 304),
|
---|
2149 |
|
---|
2150 | /* Parameters for V4 signature */
|
---|
2151 | CURLOPT(CURLOPT_AWS_SIGV4, CURLOPTTYPE_STRINGPOINT, 305),
|
---|
2152 |
|
---|
2153 | /* Same as CURLOPT_SSL_VERIFYPEER but for DoH (DNS-over-HTTPS) servers. */
|
---|
2154 | CURLOPT(CURLOPT_DOH_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 306),
|
---|
2155 |
|
---|
2156 | /* Same as CURLOPT_SSL_VERIFYHOST but for DoH (DNS-over-HTTPS) servers. */
|
---|
2157 | CURLOPT(CURLOPT_DOH_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 307),
|
---|
2158 |
|
---|
2159 | /* Same as CURLOPT_SSL_VERIFYSTATUS but for DoH (DNS-over-HTTPS) servers. */
|
---|
2160 | CURLOPT(CURLOPT_DOH_SSL_VERIFYSTATUS, CURLOPTTYPE_LONG, 308),
|
---|
2161 |
|
---|
2162 | /* The CA certificates as "blob" used to validate the peer certificate
|
---|
2163 | this option is used only if SSL_VERIFYPEER is true */
|
---|
2164 | CURLOPT(CURLOPT_CAINFO_BLOB, CURLOPTTYPE_BLOB, 309),
|
---|
2165 |
|
---|
2166 | /* The CA certificates as "blob" used to validate the proxy certificate
|
---|
2167 | this option is used only if PROXY_SSL_VERIFYPEER is true */
|
---|
2168 | CURLOPT(CURLOPT_PROXY_CAINFO_BLOB, CURLOPTTYPE_BLOB, 310),
|
---|
2169 |
|
---|
2170 | /* used by scp/sftp to verify the host's public key */
|
---|
2171 | CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256, CURLOPTTYPE_STRINGPOINT, 311),
|
---|
2172 |
|
---|
2173 | /* Function that will be called immediately before the initial request
|
---|
2174 | is made on a connection (after any protocol negotiation step). */
|
---|
2175 | CURLOPT(CURLOPT_PREREQFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 312),
|
---|
2176 |
|
---|
2177 | /* Data passed to the CURLOPT_PREREQFUNCTION callback */
|
---|
2178 | CURLOPT(CURLOPT_PREREQDATA, CURLOPTTYPE_CBPOINT, 313),
|
---|
2179 |
|
---|
2180 | /* maximum age (since creation) of a connection to consider it for reuse
|
---|
2181 | * (in seconds) */
|
---|
2182 | CURLOPT(CURLOPT_MAXLIFETIME_CONN, CURLOPTTYPE_LONG, 314),
|
---|
2183 |
|
---|
2184 | /* Set MIME option flags. */
|
---|
2185 | CURLOPT(CURLOPT_MIME_OPTIONS, CURLOPTTYPE_LONG, 315),
|
---|
2186 |
|
---|
2187 | /* set the SSH host key callback, must point to a curl_sshkeycallback
|
---|
2188 | function */
|
---|
2189 | CURLOPT(CURLOPT_SSH_HOSTKEYFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 316),
|
---|
2190 |
|
---|
2191 | /* set the SSH host key callback custom pointer */
|
---|
2192 | CURLOPT(CURLOPT_SSH_HOSTKEYDATA, CURLOPTTYPE_CBPOINT, 317),
|
---|
2193 |
|
---|
2194 | /* specify which protocols that are allowed to be used for the transfer,
|
---|
2195 | which thus helps the app which takes URLs from users or other external
|
---|
2196 | inputs and want to restrict what protocol(s) to deal with. Defaults to
|
---|
2197 | all built-in protocols. */
|
---|
2198 | CURLOPT(CURLOPT_PROTOCOLS_STR, CURLOPTTYPE_STRINGPOINT, 318),
|
---|
2199 |
|
---|
2200 | /* specify which protocols that libcurl is allowed to follow directs to */
|
---|
2201 | CURLOPT(CURLOPT_REDIR_PROTOCOLS_STR, CURLOPTTYPE_STRINGPOINT, 319),
|
---|
2202 |
|
---|
2203 | /* websockets options */
|
---|
2204 | CURLOPT(CURLOPT_WS_OPTIONS, CURLOPTTYPE_LONG, 320),
|
---|
2205 |
|
---|
2206 | /* CA cache timeout */
|
---|
2207 | CURLOPT(CURLOPT_CA_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 321),
|
---|
2208 |
|
---|
2209 | /* Can leak things, gonna exit() soon */
|
---|
2210 | CURLOPT(CURLOPT_QUICK_EXIT, CURLOPTTYPE_LONG, 322),
|
---|
2211 |
|
---|
2212 | CURLOPT_LASTENTRY /* the last unused */
|
---|
2213 | } CURLoption;
|
---|
2214 |
|
---|
2215 | #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
|
---|
2216 | the obsolete stuff removed! */
|
---|
2217 |
|
---|
2218 | /* Backwards compatibility with older names */
|
---|
2219 | /* These are scheduled to disappear by 2011 */
|
---|
2220 |
|
---|
2221 | /* This was added in version 7.19.1 */
|
---|
2222 | #define CURLOPT_POST301 CURLOPT_POSTREDIR
|
---|
2223 |
|
---|
2224 | /* These are scheduled to disappear by 2009 */
|
---|
2225 |
|
---|
2226 | /* The following were added in 7.17.0 */
|
---|
2227 | #define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD
|
---|
2228 | #define CURLOPT_FTPAPPEND CURLOPT_APPEND
|
---|
2229 | #define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY
|
---|
2230 | #define CURLOPT_FTP_SSL CURLOPT_USE_SSL
|
---|
2231 |
|
---|
2232 | /* The following were added earlier */
|
---|
2233 |
|
---|
2234 | #define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
|
---|
2235 | #define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
|
---|
2236 |
|
---|
2237 | /* */
|
---|
2238 | #define CURLOPT_FTP_RESPONSE_TIMEOUT CURLOPT_SERVER_RESPONSE_TIMEOUT
|
---|
2239 |
|
---|
2240 | #else
|
---|
2241 | /* This is set if CURL_NO_OLDIES is defined at compile-time */
|
---|
2242 | #undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
|
---|
2243 | #endif
|
---|
2244 |
|
---|
2245 |
|
---|
2246 | /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
|
---|
2247 | name resolves addresses using more than one IP protocol version, this
|
---|
2248 | option might be handy to force libcurl to use a specific IP version. */
|
---|
2249 | #define CURL_IPRESOLVE_WHATEVER 0 /* default, uses addresses to all IP
|
---|
2250 | versions that your system allows */
|
---|
2251 | #define CURL_IPRESOLVE_V4 1 /* uses only IPv4 addresses/connections */
|
---|
2252 | #define CURL_IPRESOLVE_V6 2 /* uses only IPv6 addresses/connections */
|
---|
2253 |
|
---|
2254 | /* Convenient "aliases" */
|
---|
2255 | #define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
|
---|
2256 |
|
---|
2257 | /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
|
---|
2258 | enum {
|
---|
2259 | CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd
|
---|
2260 | like the library to choose the best possible
|
---|
2261 | for us! */
|
---|
2262 | CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */
|
---|
2263 | CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
|
---|
2264 | CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */
|
---|
2265 | CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
|
---|
2266 | CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1
|
---|
2267 | Upgrade */
|
---|
2268 | CURL_HTTP_VERSION_3 = 30, /* Use HTTP/3, fallback to HTTP/2 or HTTP/1 if
|
---|
2269 | needed. For HTTPS only. For HTTP, this option
|
---|
2270 | makes libcurl return error. */
|
---|
2271 | CURL_HTTP_VERSION_3ONLY = 31, /* Use HTTP/3 without fallback. For HTTPS
|
---|
2272 | only. For HTTP, this makes libcurl
|
---|
2273 | return error. */
|
---|
2274 |
|
---|
2275 | CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
|
---|
2276 | };
|
---|
2277 |
|
---|
2278 | /* Convenience definition simple because the name of the version is HTTP/2 and
|
---|
2279 | not 2.0. The 2_0 version of the enum name was set while the version was
|
---|
2280 | still planned to be 2.0 and we stick to it for compatibility. */
|
---|
2281 | #define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0
|
---|
2282 |
|
---|
2283 | /*
|
---|
2284 | * Public API enums for RTSP requests
|
---|
2285 | */
|
---|
2286 | enum {
|
---|
2287 | CURL_RTSPREQ_NONE, /* first in list */
|
---|
2288 | CURL_RTSPREQ_OPTIONS,
|
---|
2289 | CURL_RTSPREQ_DESCRIBE,
|
---|
2290 | CURL_RTSPREQ_ANNOUNCE,
|
---|
2291 | CURL_RTSPREQ_SETUP,
|
---|
2292 | CURL_RTSPREQ_PLAY,
|
---|
2293 | CURL_RTSPREQ_PAUSE,
|
---|
2294 | CURL_RTSPREQ_TEARDOWN,
|
---|
2295 | CURL_RTSPREQ_GET_PARAMETER,
|
---|
2296 | CURL_RTSPREQ_SET_PARAMETER,
|
---|
2297 | CURL_RTSPREQ_RECORD,
|
---|
2298 | CURL_RTSPREQ_RECEIVE,
|
---|
2299 | CURL_RTSPREQ_LAST /* last in list */
|
---|
2300 | };
|
---|
2301 |
|
---|
2302 | /* These enums are for use with the CURLOPT_NETRC option. */
|
---|
2303 | enum CURL_NETRC_OPTION {
|
---|
2304 | CURL_NETRC_IGNORED, /* The .netrc will never be read.
|
---|
2305 | * This is the default. */
|
---|
2306 | CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred
|
---|
2307 | * to one in the .netrc. */
|
---|
2308 | CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored.
|
---|
2309 | * Unless one is set programmatically, the .netrc
|
---|
2310 | * will be queried. */
|
---|
2311 | CURL_NETRC_LAST
|
---|
2312 | };
|
---|
2313 |
|
---|
2314 | enum {
|
---|
2315 | CURL_SSLVERSION_DEFAULT,
|
---|
2316 | CURL_SSLVERSION_TLSv1, /* TLS 1.x */
|
---|
2317 | CURL_SSLVERSION_SSLv2,
|
---|
2318 | CURL_SSLVERSION_SSLv3,
|
---|
2319 | CURL_SSLVERSION_TLSv1_0,
|
---|
2320 | CURL_SSLVERSION_TLSv1_1,
|
---|
2321 | CURL_SSLVERSION_TLSv1_2,
|
---|
2322 | CURL_SSLVERSION_TLSv1_3,
|
---|
2323 |
|
---|
2324 | CURL_SSLVERSION_LAST /* never use, keep last */
|
---|
2325 | };
|
---|
2326 |
|
---|
2327 | enum {
|
---|
2328 | CURL_SSLVERSION_MAX_NONE = 0,
|
---|
2329 | CURL_SSLVERSION_MAX_DEFAULT = (CURL_SSLVERSION_TLSv1 << 16),
|
---|
2330 | CURL_SSLVERSION_MAX_TLSv1_0 = (CURL_SSLVERSION_TLSv1_0 << 16),
|
---|
2331 | CURL_SSLVERSION_MAX_TLSv1_1 = (CURL_SSLVERSION_TLSv1_1 << 16),
|
---|
2332 | CURL_SSLVERSION_MAX_TLSv1_2 = (CURL_SSLVERSION_TLSv1_2 << 16),
|
---|
2333 | CURL_SSLVERSION_MAX_TLSv1_3 = (CURL_SSLVERSION_TLSv1_3 << 16),
|
---|
2334 |
|
---|
2335 | /* never use, keep last */
|
---|
2336 | CURL_SSLVERSION_MAX_LAST = (CURL_SSLVERSION_LAST << 16)
|
---|
2337 | };
|
---|
2338 |
|
---|
2339 | enum CURL_TLSAUTH {
|
---|
2340 | CURL_TLSAUTH_NONE,
|
---|
2341 | CURL_TLSAUTH_SRP,
|
---|
2342 | CURL_TLSAUTH_LAST /* never use, keep last */
|
---|
2343 | };
|
---|
2344 |
|
---|
2345 | /* symbols to use with CURLOPT_POSTREDIR.
|
---|
2346 | CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303
|
---|
2347 | can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302
|
---|
2348 | | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */
|
---|
2349 |
|
---|
2350 | #define CURL_REDIR_GET_ALL 0
|
---|
2351 | #define CURL_REDIR_POST_301 1
|
---|
2352 | #define CURL_REDIR_POST_302 2
|
---|
2353 | #define CURL_REDIR_POST_303 4
|
---|
2354 | #define CURL_REDIR_POST_ALL \
|
---|
2355 | (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
|
---|
2356 |
|
---|
2357 | typedef enum {
|
---|
2358 | CURL_TIMECOND_NONE,
|
---|
2359 |
|
---|
2360 | CURL_TIMECOND_IFMODSINCE,
|
---|
2361 | CURL_TIMECOND_IFUNMODSINCE,
|
---|
2362 | CURL_TIMECOND_LASTMOD,
|
---|
2363 |
|
---|
2364 | CURL_TIMECOND_LAST
|
---|
2365 | } curl_TimeCond;
|
---|
2366 |
|
---|
2367 | /* Special size_t value signaling a null-terminated string. */
|
---|
2368 | #define CURL_ZERO_TERMINATED ((size_t) -1)
|
---|
2369 |
|
---|
2370 | /* curl_strequal() and curl_strnequal() are subject for removal in a future
|
---|
2371 | release */
|
---|
2372 | CURL_EXTERN int curl_strequal(const char *s1, const char *s2);
|
---|
2373 | CURL_EXTERN int curl_strnequal(const char *s1, const char *s2, size_t n);
|
---|
2374 |
|
---|
2375 | /* Mime/form handling support. */
|
---|
2376 | typedef struct curl_mime curl_mime; /* Mime context. */
|
---|
2377 | typedef struct curl_mimepart curl_mimepart; /* Mime part context. */
|
---|
2378 |
|
---|
2379 | /* CURLMIMEOPT_ defines are for the CURLOPT_MIME_OPTIONS option. */
|
---|
2380 | #define CURLMIMEOPT_FORMESCAPE (1<<0) /* Use backslash-escaping for forms. */
|
---|
2381 |
|
---|
2382 | /*
|
---|
2383 | * NAME curl_mime_init()
|
---|
2384 | *
|
---|
2385 | * DESCRIPTION
|
---|
2386 | *
|
---|
2387 | * Create a mime context and return its handle. The easy parameter is the
|
---|
2388 | * target handle.
|
---|
2389 | */
|
---|
2390 | CURL_EXTERN curl_mime *curl_mime_init(CURL *easy);
|
---|
2391 |
|
---|
2392 | /*
|
---|
2393 | * NAME curl_mime_free()
|
---|
2394 | *
|
---|
2395 | * DESCRIPTION
|
---|
2396 | *
|
---|
2397 | * release a mime handle and its substructures.
|
---|
2398 | */
|
---|
2399 | CURL_EXTERN void curl_mime_free(curl_mime *mime);
|
---|
2400 |
|
---|
2401 | /*
|
---|
2402 | * NAME curl_mime_addpart()
|
---|
2403 | *
|
---|
2404 | * DESCRIPTION
|
---|
2405 | *
|
---|
2406 | * Append a new empty part to the given mime context and return a handle to
|
---|
2407 | * the created part.
|
---|
2408 | */
|
---|
2409 | CURL_EXTERN curl_mimepart *curl_mime_addpart(curl_mime *mime);
|
---|
2410 |
|
---|
2411 | /*
|
---|
2412 | * NAME curl_mime_name()
|
---|
2413 | *
|
---|
2414 | * DESCRIPTION
|
---|
2415 | *
|
---|
2416 | * Set mime/form part name.
|
---|
2417 | */
|
---|
2418 | CURL_EXTERN CURLcode curl_mime_name(curl_mimepart *part, const char *name);
|
---|
2419 |
|
---|
2420 | /*
|
---|
2421 | * NAME curl_mime_filename()
|
---|
2422 | *
|
---|
2423 | * DESCRIPTION
|
---|
2424 | *
|
---|
2425 | * Set mime part remote file name.
|
---|
2426 | */
|
---|
2427 | CURL_EXTERN CURLcode curl_mime_filename(curl_mimepart *part,
|
---|
2428 | const char *filename);
|
---|
2429 |
|
---|
2430 | /*
|
---|
2431 | * NAME curl_mime_type()
|
---|
2432 | *
|
---|
2433 | * DESCRIPTION
|
---|
2434 | *
|
---|
2435 | * Set mime part type.
|
---|
2436 | */
|
---|
2437 | CURL_EXTERN CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype);
|
---|
2438 |
|
---|
2439 | /*
|
---|
2440 | * NAME curl_mime_encoder()
|
---|
2441 | *
|
---|
2442 | * DESCRIPTION
|
---|
2443 | *
|
---|
2444 | * Set mime data transfer encoder.
|
---|
2445 | */
|
---|
2446 | CURL_EXTERN CURLcode curl_mime_encoder(curl_mimepart *part,
|
---|
2447 | const char *encoding);
|
---|
2448 |
|
---|
2449 | /*
|
---|
2450 | * NAME curl_mime_data()
|
---|
2451 | *
|
---|
2452 | * DESCRIPTION
|
---|
2453 | *
|
---|
2454 | * Set mime part data source from memory data,
|
---|
2455 | */
|
---|
2456 | CURL_EXTERN CURLcode curl_mime_data(curl_mimepart *part,
|
---|
2457 | const char *data, size_t datasize);
|
---|
2458 |
|
---|
2459 | /*
|
---|
2460 | * NAME curl_mime_filedata()
|
---|
2461 | *
|
---|
2462 | * DESCRIPTION
|
---|
2463 | *
|
---|
2464 | * Set mime part data source from named file.
|
---|
2465 | */
|
---|
2466 | CURL_EXTERN CURLcode curl_mime_filedata(curl_mimepart *part,
|
---|
2467 | const char *filename);
|
---|
2468 |
|
---|
2469 | /*
|
---|
2470 | * NAME curl_mime_data_cb()
|
---|
2471 | *
|
---|
2472 | * DESCRIPTION
|
---|
2473 | *
|
---|
2474 | * Set mime part data source from callback function.
|
---|
2475 | */
|
---|
2476 | CURL_EXTERN CURLcode curl_mime_data_cb(curl_mimepart *part,
|
---|
2477 | curl_off_t datasize,
|
---|
2478 | curl_read_callback readfunc,
|
---|
2479 | curl_seek_callback seekfunc,
|
---|
2480 | curl_free_callback freefunc,
|
---|
2481 | void *arg);
|
---|
2482 |
|
---|
2483 | /*
|
---|
2484 | * NAME curl_mime_subparts()
|
---|
2485 | *
|
---|
2486 | * DESCRIPTION
|
---|
2487 | *
|
---|
2488 | * Set mime part data source from subparts.
|
---|
2489 | */
|
---|
2490 | CURL_EXTERN CURLcode curl_mime_subparts(curl_mimepart *part,
|
---|
2491 | curl_mime *subparts);
|
---|
2492 | /*
|
---|
2493 | * NAME curl_mime_headers()
|
---|
2494 | *
|
---|
2495 | * DESCRIPTION
|
---|
2496 | *
|
---|
2497 | * Set mime part headers.
|
---|
2498 | */
|
---|
2499 | CURL_EXTERN CURLcode curl_mime_headers(curl_mimepart *part,
|
---|
2500 | struct curl_slist *headers,
|
---|
2501 | int take_ownership);
|
---|
2502 |
|
---|
2503 | typedef enum {
|
---|
2504 | /********* the first one is unused ************/
|
---|
2505 | CURLFORM_NOTHING CURL_DEPRECATED(7.56.0, ""),
|
---|
2506 | CURLFORM_COPYNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
|
---|
2507 | CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
|
---|
2508 | CURLFORM_NAMELENGTH CURL_DEPRECATED(7.56.0, ""),
|
---|
2509 | CURLFORM_COPYCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
|
---|
2510 | CURLFORM_PTRCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
|
---|
2511 | CURLFORM_CONTENTSLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
|
---|
2512 | CURLFORM_FILECONTENT CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
|
---|
2513 | CURLFORM_ARRAY CURL_DEPRECATED(7.56.0, ""),
|
---|
2514 | CURLFORM_OBSOLETE,
|
---|
2515 | CURLFORM_FILE CURL_DEPRECATED(7.56.0, "Use curl_mime_filedata()"),
|
---|
2516 |
|
---|
2517 | CURLFORM_BUFFER CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
|
---|
2518 | CURLFORM_BUFFERPTR CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
|
---|
2519 | CURLFORM_BUFFERLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
|
---|
2520 |
|
---|
2521 | CURLFORM_CONTENTTYPE CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"),
|
---|
2522 | CURLFORM_CONTENTHEADER CURL_DEPRECATED(7.56.0, "Use curl_mime_headers()"),
|
---|
2523 | CURLFORM_FILENAME CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
|
---|
2524 | CURLFORM_END,
|
---|
2525 | CURLFORM_OBSOLETE2,
|
---|
2526 |
|
---|
2527 | CURLFORM_STREAM CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
|
---|
2528 | CURLFORM_CONTENTLEN /* added in 7.46.0, provide a curl_off_t length */
|
---|
2529 | CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
|
---|
2530 |
|
---|
2531 | CURLFORM_LASTENTRY /* the last unused */
|
---|
2532 | } CURLformoption;
|
---|
2533 |
|
---|
2534 | /* structure to be used as parameter for CURLFORM_ARRAY */
|
---|
2535 | struct curl_forms {
|
---|
2536 | CURLformoption option;
|
---|
2537 | const char *value;
|
---|
2538 | };
|
---|
2539 |
|
---|
2540 | /* use this for multipart formpost building */
|
---|
2541 | /* Returns code for curl_formadd()
|
---|
2542 | *
|
---|
2543 | * Returns:
|
---|
2544 | * CURL_FORMADD_OK on success
|
---|
2545 | * CURL_FORMADD_MEMORY if the FormInfo allocation fails
|
---|
2546 | * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form
|
---|
2547 | * CURL_FORMADD_NULL if a null pointer was given for a char
|
---|
2548 | * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed
|
---|
2549 | * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used
|
---|
2550 | * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error)
|
---|
2551 | * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated
|
---|
2552 | * CURL_FORMADD_MEMORY if some allocation for string copying failed.
|
---|
2553 | * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array
|
---|
2554 | *
|
---|
2555 | ***************************************************************************/
|
---|
2556 | typedef enum {
|
---|
2557 | CURL_FORMADD_OK CURL_DEPRECATED(7.56.0, ""), /* 1st, no error */
|
---|
2558 |
|
---|
2559 | CURL_FORMADD_MEMORY CURL_DEPRECATED(7.56.0, ""),
|
---|
2560 | CURL_FORMADD_OPTION_TWICE CURL_DEPRECATED(7.56.0, ""),
|
---|
2561 | CURL_FORMADD_NULL CURL_DEPRECATED(7.56.0, ""),
|
---|
2562 | CURL_FORMADD_UNKNOWN_OPTION CURL_DEPRECATED(7.56.0, ""),
|
---|
2563 | CURL_FORMADD_INCOMPLETE CURL_DEPRECATED(7.56.0, ""),
|
---|
2564 | CURL_FORMADD_ILLEGAL_ARRAY CURL_DEPRECATED(7.56.0, ""),
|
---|
2565 | /* libcurl was built with form api disabled */
|
---|
2566 | CURL_FORMADD_DISABLED CURL_DEPRECATED(7.56.0, ""),
|
---|
2567 |
|
---|
2568 | CURL_FORMADD_LAST /* last */
|
---|
2569 | } CURLFORMcode;
|
---|
2570 |
|
---|
2571 | /*
|
---|
2572 | * NAME curl_formadd()
|
---|
2573 | *
|
---|
2574 | * DESCRIPTION
|
---|
2575 | *
|
---|
2576 | * Pretty advanced function for building multi-part formposts. Each invoke
|
---|
2577 | * adds one part that together construct a full post. Then use
|
---|
2578 | * CURLOPT_HTTPPOST to send it off to libcurl.
|
---|
2579 | */
|
---|
2580 | CURL_EXTERN CURLFORMcode CURL_DEPRECATED(7.56.0, "Use curl_mime_init()")
|
---|
2581 | curl_formadd(struct curl_httppost **httppost,
|
---|
2582 | struct curl_httppost **last_post,
|
---|
2583 | ...);
|
---|
2584 |
|
---|
2585 | /*
|
---|
2586 | * callback function for curl_formget()
|
---|
2587 | * The void *arg pointer will be the one passed as second argument to
|
---|
2588 | * curl_formget().
|
---|
2589 | * The character buffer passed to it must not be freed.
|
---|
2590 | * Should return the buffer length passed to it as the argument "len" on
|
---|
2591 | * success.
|
---|
2592 | */
|
---|
2593 | typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
|
---|
2594 | size_t len);
|
---|
2595 |
|
---|
2596 | /*
|
---|
2597 | * NAME curl_formget()
|
---|
2598 | *
|
---|
2599 | * DESCRIPTION
|
---|
2600 | *
|
---|
2601 | * Serialize a curl_httppost struct built with curl_formadd().
|
---|
2602 | * Accepts a void pointer as second argument which will be passed to
|
---|
2603 | * the curl_formget_callback function.
|
---|
2604 | * Returns 0 on success.
|
---|
2605 | */
|
---|
2606 | CURL_EXTERN int CURL_DEPRECATED(7.56.0, "")
|
---|
2607 | curl_formget(struct curl_httppost *form, void *arg,
|
---|
2608 | curl_formget_callback append);
|
---|
2609 | /*
|
---|
2610 | * NAME curl_formfree()
|
---|
2611 | *
|
---|
2612 | * DESCRIPTION
|
---|
2613 | *
|
---|
2614 | * Free a multipart formpost previously built with curl_formadd().
|
---|
2615 | */
|
---|
2616 | CURL_EXTERN void CURL_DEPRECATED(7.56.0, "Use curl_mime_free()")
|
---|
2617 | curl_formfree(struct curl_httppost *form);
|
---|
2618 |
|
---|
2619 | /*
|
---|
2620 | * NAME curl_getenv()
|
---|
2621 | *
|
---|
2622 | * DESCRIPTION
|
---|
2623 | *
|
---|
2624 | * Returns a malloc()'ed string that MUST be curl_free()ed after usage is
|
---|
2625 | * complete. DEPRECATED - see lib/README.curlx
|
---|
2626 | */
|
---|
2627 | CURL_EXTERN char *curl_getenv(const char *variable);
|
---|
2628 |
|
---|
2629 | /*
|
---|
2630 | * NAME curl_version()
|
---|
2631 | *
|
---|
2632 | * DESCRIPTION
|
---|
2633 | *
|
---|
2634 | * Returns a static ascii string of the libcurl version.
|
---|
2635 | */
|
---|
2636 | CURL_EXTERN char *curl_version(void);
|
---|
2637 |
|
---|
2638 | /*
|
---|
2639 | * NAME curl_easy_escape()
|
---|
2640 | *
|
---|
2641 | * DESCRIPTION
|
---|
2642 | *
|
---|
2643 | * Escapes URL strings (converts all letters consider illegal in URLs to their
|
---|
2644 | * %XX versions). This function returns a new allocated string or NULL if an
|
---|
2645 | * error occurred.
|
---|
2646 | */
|
---|
2647 | CURL_EXTERN char *curl_easy_escape(CURL *handle,
|
---|
2648 | const char *string,
|
---|
2649 | int length);
|
---|
2650 |
|
---|
2651 | /* the previous version: */
|
---|
2652 | CURL_EXTERN char *curl_escape(const char *string,
|
---|
2653 | int length);
|
---|
2654 |
|
---|
2655 |
|
---|
2656 | /*
|
---|
2657 | * NAME curl_easy_unescape()
|
---|
2658 | *
|
---|
2659 | * DESCRIPTION
|
---|
2660 | *
|
---|
2661 | * Unescapes URL encoding in strings (converts all %XX codes to their 8bit
|
---|
2662 | * versions). This function returns a new allocated string or NULL if an error
|
---|
2663 | * occurred.
|
---|
2664 | * Conversion Note: On non-ASCII platforms the ASCII %XX codes are
|
---|
2665 | * converted into the host encoding.
|
---|
2666 | */
|
---|
2667 | CURL_EXTERN char *curl_easy_unescape(CURL *handle,
|
---|
2668 | const char *string,
|
---|
2669 | int length,
|
---|
2670 | int *outlength);
|
---|
2671 |
|
---|
2672 | /* the previous version */
|
---|
2673 | CURL_EXTERN char *curl_unescape(const char *string,
|
---|
2674 | int length);
|
---|
2675 |
|
---|
2676 | /*
|
---|
2677 | * NAME curl_free()
|
---|
2678 | *
|
---|
2679 | * DESCRIPTION
|
---|
2680 | *
|
---|
2681 | * Provided for de-allocation in the same translation unit that did the
|
---|
2682 | * allocation. Added in libcurl 7.10
|
---|
2683 | */
|
---|
2684 | CURL_EXTERN void curl_free(void *p);
|
---|
2685 |
|
---|
2686 | /*
|
---|
2687 | * NAME curl_global_init()
|
---|
2688 | *
|
---|
2689 | * DESCRIPTION
|
---|
2690 | *
|
---|
2691 | * curl_global_init() should be invoked exactly once for each application that
|
---|
2692 | * uses libcurl and before any call of other libcurl functions.
|
---|
2693 |
|
---|
2694 | * This function is thread-safe if CURL_VERSION_THREADSAFE is set in the
|
---|
2695 | * curl_version_info_data.features flag (fetch by curl_version_info()).
|
---|
2696 |
|
---|
2697 | */
|
---|
2698 | CURL_EXTERN CURLcode curl_global_init(long flags);
|
---|
2699 |
|
---|
2700 | /*
|
---|
2701 | * NAME curl_global_init_mem()
|
---|
2702 | *
|
---|
2703 | * DESCRIPTION
|
---|
2704 | *
|
---|
2705 | * curl_global_init() or curl_global_init_mem() should be invoked exactly once
|
---|
2706 | * for each application that uses libcurl. This function can be used to
|
---|
2707 | * initialize libcurl and set user defined memory management callback
|
---|
2708 | * functions. Users can implement memory management routines to check for
|
---|
2709 | * memory leaks, check for mis-use of the curl library etc. User registered
|
---|
2710 | * callback routines will be invoked by this library instead of the system
|
---|
2711 | * memory management routines like malloc, free etc.
|
---|
2712 | */
|
---|
2713 | CURL_EXTERN CURLcode curl_global_init_mem(long flags,
|
---|
2714 | curl_malloc_callback m,
|
---|
2715 | curl_free_callback f,
|
---|
2716 | curl_realloc_callback r,
|
---|
2717 | curl_strdup_callback s,
|
---|
2718 | curl_calloc_callback c);
|
---|
2719 |
|
---|
2720 | /*
|
---|
2721 | * NAME curl_global_cleanup()
|
---|
2722 | *
|
---|
2723 | * DESCRIPTION
|
---|
2724 | *
|
---|
2725 | * curl_global_cleanup() should be invoked exactly once for each application
|
---|
2726 | * that uses libcurl
|
---|
2727 | */
|
---|
2728 | CURL_EXTERN void curl_global_cleanup(void);
|
---|
2729 |
|
---|
2730 | /* linked-list structure for the CURLOPT_QUOTE option (and other) */
|
---|
2731 | struct curl_slist {
|
---|
2732 | char *data;
|
---|
2733 | struct curl_slist *next;
|
---|
2734 | };
|
---|
2735 |
|
---|
2736 | /*
|
---|
2737 | * NAME curl_global_sslset()
|
---|
2738 | *
|
---|
2739 | * DESCRIPTION
|
---|
2740 | *
|
---|
2741 | * When built with multiple SSL backends, curl_global_sslset() allows to
|
---|
2742 | * choose one. This function can only be called once, and it must be called
|
---|
2743 | * *before* curl_global_init().
|
---|
2744 | *
|
---|
2745 | * The backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL). The
|
---|
2746 | * backend can also be specified via the name parameter (passing -1 as id).
|
---|
2747 | * If both id and name are specified, the name will be ignored. If neither id
|
---|
2748 | * nor name are specified, the function will fail with
|
---|
2749 | * CURLSSLSET_UNKNOWN_BACKEND and set the "avail" pointer to the
|
---|
2750 | * NULL-terminated list of available backends.
|
---|
2751 | *
|
---|
2752 | * Upon success, the function returns CURLSSLSET_OK.
|
---|
2753 | *
|
---|
2754 | * If the specified SSL backend is not available, the function returns
|
---|
2755 | * CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a NULL-terminated
|
---|
2756 | * list of available SSL backends.
|
---|
2757 | *
|
---|
2758 | * The SSL backend can be set only once. If it has already been set, a
|
---|
2759 | * subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE.
|
---|
2760 | */
|
---|
2761 |
|
---|
2762 | struct curl_ssl_backend {
|
---|
2763 | curl_sslbackend id;
|
---|
2764 | const char *name;
|
---|
2765 | };
|
---|
2766 | typedef struct curl_ssl_backend curl_ssl_backend;
|
---|
2767 |
|
---|
2768 | typedef enum {
|
---|
2769 | CURLSSLSET_OK = 0,
|
---|
2770 | CURLSSLSET_UNKNOWN_BACKEND,
|
---|
2771 | CURLSSLSET_TOO_LATE,
|
---|
2772 | CURLSSLSET_NO_BACKENDS /* libcurl was built without any SSL support */
|
---|
2773 | } CURLsslset;
|
---|
2774 |
|
---|
2775 | CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
|
---|
2776 | const curl_ssl_backend ***avail);
|
---|
2777 |
|
---|
2778 | /*
|
---|
2779 | * NAME curl_slist_append()
|
---|
2780 | *
|
---|
2781 | * DESCRIPTION
|
---|
2782 | *
|
---|
2783 | * Appends a string to a linked list. If no list exists, it will be created
|
---|
2784 | * first. Returns the new list, after appending.
|
---|
2785 | */
|
---|
2786 | CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *list,
|
---|
2787 | const char *data);
|
---|
2788 |
|
---|
2789 | /*
|
---|
2790 | * NAME curl_slist_free_all()
|
---|
2791 | *
|
---|
2792 | * DESCRIPTION
|
---|
2793 | *
|
---|
2794 | * free a previously built curl_slist.
|
---|
2795 | */
|
---|
2796 | CURL_EXTERN void curl_slist_free_all(struct curl_slist *list);
|
---|
2797 |
|
---|
2798 | /*
|
---|
2799 | * NAME curl_getdate()
|
---|
2800 | *
|
---|
2801 | * DESCRIPTION
|
---|
2802 | *
|
---|
2803 | * Returns the time, in seconds since 1 Jan 1970 of the time string given in
|
---|
2804 | * the first argument. The time argument in the second parameter is unused
|
---|
2805 | * and should be set to NULL.
|
---|
2806 | */
|
---|
2807 | CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused);
|
---|
2808 |
|
---|
2809 | /* info about the certificate chain, only for OpenSSL, GnuTLS, Schannel, NSS
|
---|
2810 | and GSKit builds. Asked for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */
|
---|
2811 | struct curl_certinfo {
|
---|
2812 | int num_of_certs; /* number of certificates with information */
|
---|
2813 | struct curl_slist **certinfo; /* for each index in this array, there's a
|
---|
2814 | linked list with textual information in the
|
---|
2815 | format "name: value" */
|
---|
2816 | };
|
---|
2817 |
|
---|
2818 | /* Information about the SSL library used and the respective internal SSL
|
---|
2819 | handle, which can be used to obtain further information regarding the
|
---|
2820 | connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */
|
---|
2821 | struct curl_tlssessioninfo {
|
---|
2822 | curl_sslbackend backend;
|
---|
2823 | void *internals;
|
---|
2824 | };
|
---|
2825 |
|
---|
2826 | #define CURLINFO_STRING 0x100000
|
---|
2827 | #define CURLINFO_LONG 0x200000
|
---|
2828 | #define CURLINFO_DOUBLE 0x300000
|
---|
2829 | #define CURLINFO_SLIST 0x400000
|
---|
2830 | #define CURLINFO_PTR 0x400000 /* same as SLIST */
|
---|
2831 | #define CURLINFO_SOCKET 0x500000
|
---|
2832 | #define CURLINFO_OFF_T 0x600000
|
---|
2833 | #define CURLINFO_MASK 0x0fffff
|
---|
2834 | #define CURLINFO_TYPEMASK 0xf00000
|
---|
2835 |
|
---|
2836 | typedef enum {
|
---|
2837 | CURLINFO_NONE, /* first, never use this */
|
---|
2838 | CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1,
|
---|
2839 | CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2,
|
---|
2840 | CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3,
|
---|
2841 | CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4,
|
---|
2842 | CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5,
|
---|
2843 | CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,
|
---|
2844 | CURLINFO_SIZE_UPLOAD CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_UPLOAD_T")
|
---|
2845 | = CURLINFO_DOUBLE + 7,
|
---|
2846 | CURLINFO_SIZE_UPLOAD_T = CURLINFO_OFF_T + 7,
|
---|
2847 | CURLINFO_SIZE_DOWNLOAD
|
---|
2848 | CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_DOWNLOAD_T")
|
---|
2849 | = CURLINFO_DOUBLE + 8,
|
---|
2850 | CURLINFO_SIZE_DOWNLOAD_T = CURLINFO_OFF_T + 8,
|
---|
2851 | CURLINFO_SPEED_DOWNLOAD
|
---|
2852 | CURL_DEPRECATED(7.55.0, "Use CURLINFO_SPEED_DOWNLOAD_T")
|
---|
2853 | = CURLINFO_DOUBLE + 9,
|
---|
2854 | CURLINFO_SPEED_DOWNLOAD_T = CURLINFO_OFF_T + 9,
|
---|
2855 | CURLINFO_SPEED_UPLOAD
|
---|
2856 | CURL_DEPRECATED(7.55.0, "Use CURLINFO_SPEED_UPLOAD_T")
|
---|
2857 | = CURLINFO_DOUBLE + 10,
|
---|
2858 | CURLINFO_SPEED_UPLOAD_T = CURLINFO_OFF_T + 10,
|
---|
2859 | CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11,
|
---|
2860 | CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12,
|
---|
2861 | CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13,
|
---|
2862 | CURLINFO_FILETIME = CURLINFO_LONG + 14,
|
---|
2863 | CURLINFO_FILETIME_T = CURLINFO_OFF_T + 14,
|
---|
2864 | CURLINFO_CONTENT_LENGTH_DOWNLOAD
|
---|
2865 | CURL_DEPRECATED(7.55.0,
|
---|
2866 | "Use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T")
|
---|
2867 | = CURLINFO_DOUBLE + 15,
|
---|
2868 | CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = CURLINFO_OFF_T + 15,
|
---|
2869 | CURLINFO_CONTENT_LENGTH_UPLOAD
|
---|
2870 | CURL_DEPRECATED(7.55.0,
|
---|
2871 | "Use CURLINFO_CONTENT_LENGTH_UPLOAD_T")
|
---|
2872 | = CURLINFO_DOUBLE + 16,
|
---|
2873 | CURLINFO_CONTENT_LENGTH_UPLOAD_T = CURLINFO_OFF_T + 16,
|
---|
2874 | CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
|
---|
2875 | CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18,
|
---|
2876 | CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19,
|
---|
2877 | CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20,
|
---|
2878 | CURLINFO_PRIVATE = CURLINFO_STRING + 21,
|
---|
2879 | CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22,
|
---|
2880 | CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23,
|
---|
2881 | CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24,
|
---|
2882 | CURLINFO_OS_ERRNO = CURLINFO_LONG + 25,
|
---|
2883 | CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26,
|
---|
2884 | CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27,
|
---|
2885 | CURLINFO_COOKIELIST = CURLINFO_SLIST + 28,
|
---|
2886 | CURLINFO_LASTSOCKET CURL_DEPRECATED(7.45.0, "Use CURLINFO_ACTIVESOCKET")
|
---|
2887 | = CURLINFO_LONG + 29,
|
---|
2888 | CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30,
|
---|
2889 | CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31,
|
---|
2890 | CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,
|
---|
2891 | CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33,
|
---|
2892 | CURLINFO_CERTINFO = CURLINFO_PTR + 34,
|
---|
2893 | CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35,
|
---|
2894 | CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36,
|
---|
2895 | CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37,
|
---|
2896 | CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38,
|
---|
2897 | CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39,
|
---|
2898 | CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40,
|
---|
2899 | CURLINFO_LOCAL_IP = CURLINFO_STRING + 41,
|
---|
2900 | CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
|
---|
2901 | CURLINFO_TLS_SESSION CURL_DEPRECATED(7.48.0, "Use CURLINFO_TLS_SSL_PTR")
|
---|
2902 | = CURLINFO_PTR + 43,
|
---|
2903 | CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,
|
---|
2904 | CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45,
|
---|
2905 | CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46,
|
---|
2906 | CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47,
|
---|
2907 | CURLINFO_PROTOCOL CURL_DEPRECATED(7.85.0, "Use CURLINFO_SCHEME")
|
---|
2908 | = CURLINFO_LONG + 48,
|
---|
2909 | CURLINFO_SCHEME = CURLINFO_STRING + 49,
|
---|
2910 | CURLINFO_TOTAL_TIME_T = CURLINFO_OFF_T + 50,
|
---|
2911 | CURLINFO_NAMELOOKUP_TIME_T = CURLINFO_OFF_T + 51,
|
---|
2912 | CURLINFO_CONNECT_TIME_T = CURLINFO_OFF_T + 52,
|
---|
2913 | CURLINFO_PRETRANSFER_TIME_T = CURLINFO_OFF_T + 53,
|
---|
2914 | CURLINFO_STARTTRANSFER_TIME_T = CURLINFO_OFF_T + 54,
|
---|
2915 | CURLINFO_REDIRECT_TIME_T = CURLINFO_OFF_T + 55,
|
---|
2916 | CURLINFO_APPCONNECT_TIME_T = CURLINFO_OFF_T + 56,
|
---|
2917 | CURLINFO_RETRY_AFTER = CURLINFO_OFF_T + 57,
|
---|
2918 | CURLINFO_EFFECTIVE_METHOD = CURLINFO_STRING + 58,
|
---|
2919 | CURLINFO_PROXY_ERROR = CURLINFO_LONG + 59,
|
---|
2920 | CURLINFO_REFERER = CURLINFO_STRING + 60,
|
---|
2921 | CURLINFO_CAINFO = CURLINFO_STRING + 61,
|
---|
2922 | CURLINFO_CAPATH = CURLINFO_STRING + 62,
|
---|
2923 | CURLINFO_LASTONE = 62
|
---|
2924 | } CURLINFO;
|
---|
2925 |
|
---|
2926 | /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
|
---|
2927 | CURLINFO_HTTP_CODE */
|
---|
2928 | #define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE
|
---|
2929 |
|
---|
2930 | typedef enum {
|
---|
2931 | CURLCLOSEPOLICY_NONE, /* first, never use this */
|
---|
2932 |
|
---|
2933 | CURLCLOSEPOLICY_OLDEST,
|
---|
2934 | CURLCLOSEPOLICY_LEAST_RECENTLY_USED,
|
---|
2935 | CURLCLOSEPOLICY_LEAST_TRAFFIC,
|
---|
2936 | CURLCLOSEPOLICY_SLOWEST,
|
---|
2937 | CURLCLOSEPOLICY_CALLBACK,
|
---|
2938 |
|
---|
2939 | CURLCLOSEPOLICY_LAST /* last, never use this */
|
---|
2940 | } curl_closepolicy;
|
---|
2941 |
|
---|
2942 | #define CURL_GLOBAL_SSL (1<<0) /* no purpose since 7.57.0 */
|
---|
2943 | #define CURL_GLOBAL_WIN32 (1<<1)
|
---|
2944 | #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
|
---|
2945 | #define CURL_GLOBAL_NOTHING 0
|
---|
2946 | #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
|
---|
2947 | #define CURL_GLOBAL_ACK_EINTR (1<<2)
|
---|
2948 |
|
---|
2949 |
|
---|
2950 | /*****************************************************************************
|
---|
2951 | * Setup defines, protos etc for the sharing stuff.
|
---|
2952 | */
|
---|
2953 |
|
---|
2954 | /* Different data locks for a single share */
|
---|
2955 | typedef enum {
|
---|
2956 | CURL_LOCK_DATA_NONE = 0,
|
---|
2957 | /* CURL_LOCK_DATA_SHARE is used internally to say that
|
---|
2958 | * the locking is just made to change the internal state of the share
|
---|
2959 | * itself.
|
---|
2960 | */
|
---|
2961 | CURL_LOCK_DATA_SHARE,
|
---|
2962 | CURL_LOCK_DATA_COOKIE,
|
---|
2963 | CURL_LOCK_DATA_DNS,
|
---|
2964 | CURL_LOCK_DATA_SSL_SESSION,
|
---|
2965 | CURL_LOCK_DATA_CONNECT,
|
---|
2966 | CURL_LOCK_DATA_PSL,
|
---|
2967 | CURL_LOCK_DATA_HSTS,
|
---|
2968 | CURL_LOCK_DATA_LAST
|
---|
2969 | } curl_lock_data;
|
---|
2970 |
|
---|
2971 | /* Different lock access types */
|
---|
2972 | typedef enum {
|
---|
2973 | CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */
|
---|
2974 | CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */
|
---|
2975 | CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */
|
---|
2976 | CURL_LOCK_ACCESS_LAST /* never use */
|
---|
2977 | } curl_lock_access;
|
---|
2978 |
|
---|
2979 | typedef void (*curl_lock_function)(CURL *handle,
|
---|
2980 | curl_lock_data data,
|
---|
2981 | curl_lock_access locktype,
|
---|
2982 | void *userptr);
|
---|
2983 | typedef void (*curl_unlock_function)(CURL *handle,
|
---|
2984 | curl_lock_data data,
|
---|
2985 | void *userptr);
|
---|
2986 |
|
---|
2987 |
|
---|
2988 | typedef enum {
|
---|
2989 | CURLSHE_OK, /* all is fine */
|
---|
2990 | CURLSHE_BAD_OPTION, /* 1 */
|
---|
2991 | CURLSHE_IN_USE, /* 2 */
|
---|
2992 | CURLSHE_INVALID, /* 3 */
|
---|
2993 | CURLSHE_NOMEM, /* 4 out of memory */
|
---|
2994 | CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */
|
---|
2995 | CURLSHE_LAST /* never use */
|
---|
2996 | } CURLSHcode;
|
---|
2997 |
|
---|
2998 | typedef enum {
|
---|
2999 | CURLSHOPT_NONE, /* don't use */
|
---|
3000 | CURLSHOPT_SHARE, /* specify a data type to share */
|
---|
3001 | CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */
|
---|
3002 | CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */
|
---|
3003 | CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */
|
---|
3004 | CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock
|
---|
3005 | callback functions */
|
---|
3006 | CURLSHOPT_LAST /* never use */
|
---|
3007 | } CURLSHoption;
|
---|
3008 |
|
---|
3009 | CURL_EXTERN CURLSH *curl_share_init(void);
|
---|
3010 | CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option,
|
---|
3011 | ...);
|
---|
3012 | CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *share);
|
---|
3013 |
|
---|
3014 | /****************************************************************************
|
---|
3015 | * Structures for querying information about the curl library at runtime.
|
---|
3016 | */
|
---|
3017 |
|
---|
3018 | typedef enum {
|
---|
3019 | CURLVERSION_FIRST,
|
---|
3020 | CURLVERSION_SECOND,
|
---|
3021 | CURLVERSION_THIRD,
|
---|
3022 | CURLVERSION_FOURTH,
|
---|
3023 | CURLVERSION_FIFTH,
|
---|
3024 | CURLVERSION_SIXTH,
|
---|
3025 | CURLVERSION_SEVENTH,
|
---|
3026 | CURLVERSION_EIGHTH,
|
---|
3027 | CURLVERSION_NINTH,
|
---|
3028 | CURLVERSION_TENTH,
|
---|
3029 | CURLVERSION_ELEVENTH,
|
---|
3030 | CURLVERSION_LAST /* never actually use this */
|
---|
3031 | } CURLversion;
|
---|
3032 |
|
---|
3033 | /* The 'CURLVERSION_NOW' is the symbolic name meant to be used by
|
---|
3034 | basically all programs ever that want to get version information. It is
|
---|
3035 | meant to be a built-in version number for what kind of struct the caller
|
---|
3036 | expects. If the struct ever changes, we redefine the NOW to another enum
|
---|
3037 | from above. */
|
---|
3038 | #define CURLVERSION_NOW CURLVERSION_ELEVENTH
|
---|
3039 |
|
---|
3040 | struct curl_version_info_data {
|
---|
3041 | CURLversion age; /* age of the returned struct */
|
---|
3042 | const char *version; /* LIBCURL_VERSION */
|
---|
3043 | unsigned int version_num; /* LIBCURL_VERSION_NUM */
|
---|
3044 | const char *host; /* OS/host/cpu/machine when configured */
|
---|
3045 | int features; /* bitmask, see defines below */
|
---|
3046 | const char *ssl_version; /* human readable string */
|
---|
3047 | long ssl_version_num; /* not used anymore, always 0 */
|
---|
3048 | const char *libz_version; /* human readable string */
|
---|
3049 | /* protocols is terminated by an entry with a NULL protoname */
|
---|
3050 | const char * const *protocols;
|
---|
3051 |
|
---|
3052 | /* The fields below this were added in CURLVERSION_SECOND */
|
---|
3053 | const char *ares;
|
---|
3054 | int ares_num;
|
---|
3055 |
|
---|
3056 | /* This field was added in CURLVERSION_THIRD */
|
---|
3057 | const char *libidn;
|
---|
3058 |
|
---|
3059 | /* These field were added in CURLVERSION_FOURTH */
|
---|
3060 |
|
---|
3061 | /* Same as '_libiconv_version' if built with HAVE_ICONV */
|
---|
3062 | int iconv_ver_num;
|
---|
3063 |
|
---|
3064 | const char *libssh_version; /* human readable string */
|
---|
3065 |
|
---|
3066 | /* These fields were added in CURLVERSION_FIFTH */
|
---|
3067 | unsigned int brotli_ver_num; /* Numeric Brotli version
|
---|
3068 | (MAJOR << 24) | (MINOR << 12) | PATCH */
|
---|
3069 | const char *brotli_version; /* human readable string. */
|
---|
3070 |
|
---|
3071 | /* These fields were added in CURLVERSION_SIXTH */
|
---|
3072 | unsigned int nghttp2_ver_num; /* Numeric nghttp2 version
|
---|
3073 | (MAJOR << 16) | (MINOR << 8) | PATCH */
|
---|
3074 | const char *nghttp2_version; /* human readable string. */
|
---|
3075 | const char *quic_version; /* human readable quic (+ HTTP/3) library +
|
---|
3076 | version or NULL */
|
---|
3077 |
|
---|
3078 | /* These fields were added in CURLVERSION_SEVENTH */
|
---|
3079 | const char *cainfo; /* the built-in default CURLOPT_CAINFO, might
|
---|
3080 | be NULL */
|
---|
3081 | const char *capath; /* the built-in default CURLOPT_CAPATH, might
|
---|
3082 | be NULL */
|
---|
3083 |
|
---|
3084 | /* These fields were added in CURLVERSION_EIGHTH */
|
---|
3085 | unsigned int zstd_ver_num; /* Numeric Zstd version
|
---|
3086 | (MAJOR << 24) | (MINOR << 12) | PATCH */
|
---|
3087 | const char *zstd_version; /* human readable string. */
|
---|
3088 |
|
---|
3089 | /* These fields were added in CURLVERSION_NINTH */
|
---|
3090 | const char *hyper_version; /* human readable string. */
|
---|
3091 |
|
---|
3092 | /* These fields were added in CURLVERSION_TENTH */
|
---|
3093 | const char *gsasl_version; /* human readable string. */
|
---|
3094 |
|
---|
3095 | /* These fields were added in CURLVERSION_ELEVENTH */
|
---|
3096 | /* feature_names is terminated by an entry with a NULL feature name */
|
---|
3097 | const char * const *feature_names;
|
---|
3098 | };
|
---|
3099 | typedef struct curl_version_info_data curl_version_info_data;
|
---|
3100 |
|
---|
3101 | #define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */
|
---|
3102 | #define CURL_VERSION_KERBEROS4 (1<<1) /* Kerberos V4 auth is supported
|
---|
3103 | (deprecated) */
|
---|
3104 | #define CURL_VERSION_SSL (1<<2) /* SSL options are present */
|
---|
3105 | #define CURL_VERSION_LIBZ (1<<3) /* libz features are present */
|
---|
3106 | #define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */
|
---|
3107 | #define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth is supported
|
---|
3108 | (deprecated) */
|
---|
3109 | #define CURL_VERSION_DEBUG (1<<6) /* Built with debug capabilities */
|
---|
3110 | #define CURL_VERSION_ASYNCHDNS (1<<7) /* Asynchronous DNS resolves */
|
---|
3111 | #define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth is supported */
|
---|
3112 | #define CURL_VERSION_LARGEFILE (1<<9) /* Supports files larger than 2GB */
|
---|
3113 | #define CURL_VERSION_IDN (1<<10) /* Internationized Domain Names are
|
---|
3114 | supported */
|
---|
3115 | #define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */
|
---|
3116 | #define CURL_VERSION_CONV (1<<12) /* Character conversions supported */
|
---|
3117 | #define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */
|
---|
3118 | #define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */
|
---|
3119 | #define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper
|
---|
3120 | is supported */
|
---|
3121 | #define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */
|
---|
3122 | #define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */
|
---|
3123 | #define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */
|
---|
3124 | #define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
|
---|
3125 | #define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used
|
---|
3126 | for cookie domain verification */
|
---|
3127 | #define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */
|
---|
3128 | #define CURL_VERSION_MULTI_SSL (1<<22) /* Multiple SSL backends available */
|
---|
3129 | #define CURL_VERSION_BROTLI (1<<23) /* Brotli features are present. */
|
---|
3130 | #define CURL_VERSION_ALTSVC (1<<24) /* Alt-Svc handling built-in */
|
---|
3131 | #define CURL_VERSION_HTTP3 (1<<25) /* HTTP3 support built-in */
|
---|
3132 | #define CURL_VERSION_ZSTD (1<<26) /* zstd features are present */
|
---|
3133 | #define CURL_VERSION_UNICODE (1<<27) /* Unicode support on Windows */
|
---|
3134 | #define CURL_VERSION_HSTS (1<<28) /* HSTS is supported */
|
---|
3135 | #define CURL_VERSION_GSASL (1<<29) /* libgsasl is supported */
|
---|
3136 | #define CURL_VERSION_THREADSAFE (1<<30) /* libcurl API is thread-safe */
|
---|
3137 |
|
---|
3138 | /*
|
---|
3139 | * NAME curl_version_info()
|
---|
3140 | *
|
---|
3141 | * DESCRIPTION
|
---|
3142 | *
|
---|
3143 | * This function returns a pointer to a static copy of the version info
|
---|
3144 | * struct. See above.
|
---|
3145 | */
|
---|
3146 | CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
|
---|
3147 |
|
---|
3148 | /*
|
---|
3149 | * NAME curl_easy_strerror()
|
---|
3150 | *
|
---|
3151 | * DESCRIPTION
|
---|
3152 | *
|
---|
3153 | * The curl_easy_strerror function may be used to turn a CURLcode value
|
---|
3154 | * into the equivalent human readable error string. This is useful
|
---|
3155 | * for printing meaningful error messages.
|
---|
3156 | */
|
---|
3157 | CURL_EXTERN const char *curl_easy_strerror(CURLcode);
|
---|
3158 |
|
---|
3159 | /*
|
---|
3160 | * NAME curl_share_strerror()
|
---|
3161 | *
|
---|
3162 | * DESCRIPTION
|
---|
3163 | *
|
---|
3164 | * The curl_share_strerror function may be used to turn a CURLSHcode value
|
---|
3165 | * into the equivalent human readable error string. This is useful
|
---|
3166 | * for printing meaningful error messages.
|
---|
3167 | */
|
---|
3168 | CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
|
---|
3169 |
|
---|
3170 | /*
|
---|
3171 | * NAME curl_easy_pause()
|
---|
3172 | *
|
---|
3173 | * DESCRIPTION
|
---|
3174 | *
|
---|
3175 | * The curl_easy_pause function pauses or unpauses transfers. Select the new
|
---|
3176 | * state by setting the bitmask, use the convenience defines below.
|
---|
3177 | *
|
---|
3178 | */
|
---|
3179 | CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
|
---|
3180 |
|
---|
3181 | #define CURLPAUSE_RECV (1<<0)
|
---|
3182 | #define CURLPAUSE_RECV_CONT (0)
|
---|
3183 |
|
---|
3184 | #define CURLPAUSE_SEND (1<<2)
|
---|
3185 | #define CURLPAUSE_SEND_CONT (0)
|
---|
3186 |
|
---|
3187 | #define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND)
|
---|
3188 | #define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
|
---|
3189 |
|
---|
3190 | #ifdef __cplusplus
|
---|
3191 | } /* end of extern "C" */
|
---|
3192 | #endif
|
---|
3193 |
|
---|
3194 | /* unfortunately, the easy.h and multi.h include files need options and info
|
---|
3195 | stuff before they can be included! */
|
---|
3196 | #include "easy.h" /* nothing in curl is fun without the easy stuff */
|
---|
3197 | #include "multi.h"
|
---|
3198 | #include "urlapi.h"
|
---|
3199 | #include "options.h"
|
---|
3200 | #include "header.h"
|
---|
3201 | #include "websockets.h"
|
---|
3202 |
|
---|
3203 | /* the typechecker doesn't work in C++ (yet) */
|
---|
3204 | #if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
|
---|
3205 | ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \
|
---|
3206 | !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK)
|
---|
3207 | #include "typecheck-gcc.h"
|
---|
3208 | #else
|
---|
3209 | #if defined(__STDC__) && (__STDC__ >= 1)
|
---|
3210 | /* This preprocessor magic that replaces a call with the exact same call is
|
---|
3211 | only done to make sure application authors pass exactly three arguments
|
---|
3212 | to these functions. */
|
---|
3213 | #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
|
---|
3214 | #define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
|
---|
3215 | #define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
|
---|
3216 | #define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
|
---|
3217 | #endif /* __STDC__ >= 1 */
|
---|
3218 | #endif /* gcc >= 4.3 && !__cplusplus && !CURL_DISABLE_TYPECHECK */
|
---|
3219 |
|
---|
3220 | #endif /* CURLINC_CURL_H */
|
---|