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