VirtualBox

source: vbox/trunk/src/libs/curl-8.11.1/include/curl/curl.h@ 108192

Last change on this file since 108192 was 108048, checked in by vboxsync, 3 months ago

curl-8.11.1: Applied and adjusted our curl changes to 8.7.1. jiraref:VBP-1535

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette