Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-13 08:54:18

0001 #ifndef CURLINC_CURL_H
0002 #define CURLINC_CURL_H
0003 /***************************************************************************
0004  *                                  _   _ ____  _
0005  *  Project                     ___| | | |  _ \| |
0006  *                             / __| | | | |_) | |
0007  *                            | (__| |_| |  _ <| |___
0008  *                             \___|\___/|_| \_\_____|
0009  *
0010  * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
0011  *
0012  * This software is licensed as described in the file COPYING, which
0013  * you should have received as part of this distribution. The terms
0014  * are also available at https://curl.se/docs/copyright.html.
0015  *
0016  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
0017  * copies of the Software, and permit persons to whom the Software is
0018  * furnished to do so, under the terms of the COPYING file.
0019  *
0020  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
0021  * KIND, either express or implied.
0022  *
0023  * SPDX-License-Identifier: curl
0024  *
0025  ***************************************************************************/
0026 
0027 /*
0028  * If you have libcurl problems, all docs and details are found here:
0029  *   https://curl.se/libcurl/
0030  */
0031 
0032 #ifdef CURL_NO_OLDIES
0033 #define CURL_STRICTER /* not used since 8.11.0 */
0034 #endif
0035 
0036 /* Compile-time deprecation macros. */
0037 #if (defined(__GNUC__) &&                                              \
0038   ((__GNUC__ > 12) || ((__GNUC__ == 12) && (__GNUC_MINOR__ >= 1))) ||  \
0039   (defined(__clang__) && __clang_major__ >= 3) ||                      \
0040   defined(__IAR_SYSTEMS_ICC__)) &&                                     \
0041   !defined(__INTEL_COMPILER) &&                                        \
0042   !defined(CURL_DISABLE_DEPRECATION) && !defined(BUILDING_LIBCURL)
0043 #define CURL_DEPRECATED(version, message)                       \
0044   __attribute__((deprecated("since " # version ". " message)))
0045 #if defined(__IAR_SYSTEMS_ICC__)
0046 #define CURL_IGNORE_DEPRECATION(statements) \
0047       _Pragma("diag_suppress=Pe1444") \
0048       statements \
0049       _Pragma("diag_default=Pe1444")
0050 #else
0051 #define CURL_IGNORE_DEPRECATION(statements) \
0052       _Pragma("GCC diagnostic push") \
0053       _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
0054       statements \
0055       _Pragma("GCC diagnostic pop")
0056 #endif
0057 #else
0058 #define CURL_DEPRECATED(version, message)
0059 #define CURL_IGNORE_DEPRECATION(statements)     statements
0060 #endif
0061 
0062 #include "curlver.h"         /* libcurl version defines   */
0063 #include "system.h"          /* determine things runtime */
0064 
0065 #include <stdio.h>
0066 #include <limits.h>
0067 
0068 #if defined(__FreeBSD__) || defined(__MidnightBSD__)
0069 /* Needed for __FreeBSD_version or __MidnightBSD_version symbol definition */
0070 #include <sys/param.h>
0071 #endif
0072 
0073 /* The include stuff here below is mainly for time_t! */
0074 #include <sys/types.h>
0075 #include <time.h>
0076 
0077 #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
0078 #if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \
0079       defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H))
0080 /* The check above prevents the winsock2.h inclusion if winsock.h already was
0081    included, since they cannot co-exist without problems */
0082 #include <winsock2.h>
0083 #include <ws2tcpip.h>
0084 #endif
0085 #endif
0086 
0087 /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
0088    libc5-based Linux systems. Only include it on systems that are known to
0089    require it! */
0090 #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
0091     defined(__minix) || defined(__INTEGRITY) || \
0092     defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
0093     defined(__CYGWIN__) || defined(AMIGA) || defined(__NuttX__) || \
0094    (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) || \
0095    (defined(__MidnightBSD_version) && (__MidnightBSD_version < 100000)) || \
0096     defined(__sun__) || defined(__serenity__) || defined(__vxworks__)
0097 #include <sys/select.h>
0098 #endif
0099 
0100 #if !defined(_WIN32) && !defined(_WIN32_WCE)
0101 #include <sys/socket.h>
0102 #endif
0103 
0104 #if !defined(_WIN32)
0105 #include <sys/time.h>
0106 #endif
0107 
0108 /* Compatibility for non-Clang compilers */
0109 #ifndef __has_declspec_attribute
0110 #  define __has_declspec_attribute(x) 0
0111 #endif
0112 
0113 #ifdef  __cplusplus
0114 extern "C" {
0115 #endif
0116 
0117 typedef void CURL;
0118 typedef void CURLSH;
0119 
0120 /*
0121  * libcurl external API function linkage decorations.
0122  */
0123 
0124 #ifdef CURL_STATICLIB
0125 #  define CURL_EXTERN
0126 #elif defined(_WIN32) || \
0127      (__has_declspec_attribute(dllexport) && \
0128       __has_declspec_attribute(dllimport))
0129 #  if defined(BUILDING_LIBCURL)
0130 #    define CURL_EXTERN  __declspec(dllexport)
0131 #  else
0132 #    define CURL_EXTERN  __declspec(dllimport)
0133 #  endif
0134 #elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
0135 #  define CURL_EXTERN CURL_EXTERN_SYMBOL
0136 #else
0137 #  define CURL_EXTERN
0138 #endif
0139 
0140 #ifndef curl_socket_typedef
0141 /* socket typedef */
0142 #if defined(_WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)
0143 typedef SOCKET curl_socket_t;
0144 #define CURL_SOCKET_BAD INVALID_SOCKET
0145 #else
0146 typedef int curl_socket_t;
0147 #define CURL_SOCKET_BAD -1
0148 #endif
0149 #define curl_socket_typedef
0150 #endif /* curl_socket_typedef */
0151 
0152 /* enum for the different supported SSL backends */
0153 typedef enum {
0154   CURLSSLBACKEND_NONE = 0,
0155   CURLSSLBACKEND_OPENSSL = 1,
0156   CURLSSLBACKEND_GNUTLS = 2,
0157   CURLSSLBACKEND_NSS                    CURL_DEPRECATED(8.3.0, "") = 3,
0158   CURLSSLBACKEND_OBSOLETE4 = 4,  /* Was QSOSSL. */
0159   CURLSSLBACKEND_GSKIT                  CURL_DEPRECATED(8.3.0, "") = 5,
0160   CURLSSLBACKEND_POLARSSL               CURL_DEPRECATED(7.69.0, "") = 6,
0161   CURLSSLBACKEND_WOLFSSL = 7,
0162   CURLSSLBACKEND_SCHANNEL = 8,
0163   CURLSSLBACKEND_SECURETRANSPORT = 9,
0164   CURLSSLBACKEND_AXTLS                  CURL_DEPRECATED(7.61.0, "") = 10,
0165   CURLSSLBACKEND_MBEDTLS = 11,
0166   CURLSSLBACKEND_MESALINK               CURL_DEPRECATED(7.82.0, "") = 12,
0167   CURLSSLBACKEND_BEARSSL = 13,
0168   CURLSSLBACKEND_RUSTLS = 14
0169 } curl_sslbackend;
0170 
0171 /* aliases for library clones and renames */
0172 #define CURLSSLBACKEND_AWSLC CURLSSLBACKEND_OPENSSL
0173 #define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL
0174 #define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL
0175 
0176 /* deprecated names: */
0177 #define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL
0178 #define CURLSSLBACKEND_DARWINSSL CURLSSLBACKEND_SECURETRANSPORT
0179 
0180 struct curl_httppost {
0181   struct curl_httppost *next;       /* next entry in the list */
0182   char *name;                       /* pointer to allocated name */
0183   long namelength;                  /* length of name length */
0184   char *contents;                   /* pointer to allocated data contents */
0185   long contentslength;              /* length of contents field, see also
0186                                        CURL_HTTPPOST_LARGE */
0187   char *buffer;                     /* pointer to allocated buffer contents */
0188   long bufferlength;                /* length of buffer field */
0189   char *contenttype;                /* Content-Type */
0190   struct curl_slist *contentheader; /* list of extra headers for this form */
0191   struct curl_httppost *more;       /* if one field name has more than one
0192                                        file, this link should link to following
0193                                        files */
0194   long flags;                       /* as defined below */
0195 
0196 /* specified content is a filename */
0197 #define CURL_HTTPPOST_FILENAME (1<<0)
0198 /* specified content is a filename */
0199 #define CURL_HTTPPOST_READFILE (1<<1)
0200 /* name is only stored pointer do not free in formfree */
0201 #define CURL_HTTPPOST_PTRNAME (1<<2)
0202 /* contents is only stored pointer do not free in formfree */
0203 #define CURL_HTTPPOST_PTRCONTENTS (1<<3)
0204 /* upload file from buffer */
0205 #define CURL_HTTPPOST_BUFFER (1<<4)
0206 /* upload file from pointer contents */
0207 #define CURL_HTTPPOST_PTRBUFFER (1<<5)
0208 /* upload file contents by using the regular read callback to get the data and
0209    pass the given pointer as custom pointer */
0210 #define CURL_HTTPPOST_CALLBACK (1<<6)
0211 /* use size in 'contentlen', added in 7.46.0 */
0212 #define CURL_HTTPPOST_LARGE (1<<7)
0213 
0214   char *showfilename;               /* The filename to show. If not set, the
0215                                        actual filename will be used (if this
0216                                        is a file part) */
0217   void *userp;                      /* custom pointer used for
0218                                        HTTPPOST_CALLBACK posts */
0219   curl_off_t contentlen;            /* alternative length of contents
0220                                        field. Used if CURL_HTTPPOST_LARGE is
0221                                        set. Added in 7.46.0 */
0222 };
0223 
0224 
0225 /* This is a return code for the progress callback that, when returned, will
0226    signal libcurl to continue executing the default progress function */
0227 #define CURL_PROGRESSFUNC_CONTINUE 0x10000001
0228 
0229 /* This is the CURLOPT_PROGRESSFUNCTION callback prototype. It is now
0230    considered deprecated but was the only choice up until 7.31.0 */
0231 typedef int (*curl_progress_callback)(void *clientp,
0232                                       double dltotal,
0233                                       double dlnow,
0234                                       double ultotal,
0235                                       double ulnow);
0236 
0237 /* This is the CURLOPT_XFERINFOFUNCTION callback prototype. It was introduced
0238    in 7.32.0, avoids the use of floating point numbers and provides more
0239    detailed information. */
0240 typedef int (*curl_xferinfo_callback)(void *clientp,
0241                                       curl_off_t dltotal,
0242                                       curl_off_t dlnow,
0243                                       curl_off_t ultotal,
0244                                       curl_off_t ulnow);
0245 
0246 #ifndef CURL_MAX_READ_SIZE
0247   /* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */
0248 #define CURL_MAX_READ_SIZE (10*1024*1024)
0249 #endif
0250 
0251 #ifndef CURL_MAX_WRITE_SIZE
0252   /* Tests have proven that 20K is a bad buffer size for uploads on Windows,
0253      while 16K for some odd reason performed a lot better. We do the ifndef
0254      check to allow this value to easier be changed at build time for those
0255      who feel adventurous. The practical minimum is about 400 bytes since
0256      libcurl uses a buffer of this size as a scratch area (unrelated to
0257      network send operations). */
0258 #define CURL_MAX_WRITE_SIZE 16384
0259 #endif
0260 
0261 #ifndef CURL_MAX_HTTP_HEADER
0262 /* The only reason to have a max limit for this is to avoid the risk of a bad
0263    server feeding libcurl with a never-ending header that will cause reallocs
0264    infinitely */
0265 #define CURL_MAX_HTTP_HEADER (100*1024)
0266 #endif
0267 
0268 /* This is a magic return code for the write callback that, when returned,
0269    will signal libcurl to pause receiving on the current transfer. */
0270 #define CURL_WRITEFUNC_PAUSE 0x10000001
0271 
0272 /* This is a magic return code for the write callback that, when returned,
0273    will signal an error from the callback. */
0274 #define CURL_WRITEFUNC_ERROR 0xFFFFFFFF
0275 
0276 typedef size_t (*curl_write_callback)(char *buffer,
0277                                       size_t size,
0278                                       size_t nitems,
0279                                       void *outstream);
0280 
0281 /* This callback will be called when a new resolver request is made */
0282 typedef int (*curl_resolver_start_callback)(void *resolver_state,
0283                                             void *reserved, void *userdata);
0284 
0285 /* enumeration of file types */
0286 typedef enum {
0287   CURLFILETYPE_FILE = 0,
0288   CURLFILETYPE_DIRECTORY,
0289   CURLFILETYPE_SYMLINK,
0290   CURLFILETYPE_DEVICE_BLOCK,
0291   CURLFILETYPE_DEVICE_CHAR,
0292   CURLFILETYPE_NAMEDPIPE,
0293   CURLFILETYPE_SOCKET,
0294   CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */
0295 
0296   CURLFILETYPE_UNKNOWN /* should never occur */
0297 } curlfiletype;
0298 
0299 #define CURLFINFOFLAG_KNOWN_FILENAME    (1<<0)
0300 #define CURLFINFOFLAG_KNOWN_FILETYPE    (1<<1)
0301 #define CURLFINFOFLAG_KNOWN_TIME        (1<<2)
0302 #define CURLFINFOFLAG_KNOWN_PERM        (1<<3)
0303 #define CURLFINFOFLAG_KNOWN_UID         (1<<4)
0304 #define CURLFINFOFLAG_KNOWN_GID         (1<<5)
0305 #define CURLFINFOFLAG_KNOWN_SIZE        (1<<6)
0306 #define CURLFINFOFLAG_KNOWN_HLINKCOUNT  (1<<7)
0307 
0308 /* Information about a single file, used when doing FTP wildcard matching */
0309 struct curl_fileinfo {
0310   char *filename;
0311   curlfiletype filetype;
0312   time_t time; /* always zero! */
0313   unsigned int perm;
0314   int uid;
0315   int gid;
0316   curl_off_t size;
0317   long int hardlinks;
0318 
0319   struct {
0320     /* If some of these fields is not NULL, it is a pointer to b_data. */
0321     char *time;
0322     char *perm;
0323     char *user;
0324     char *group;
0325     char *target; /* pointer to the target filename of a symlink */
0326   } strings;
0327 
0328   unsigned int flags;
0329 
0330   /* These are libcurl private struct fields. Previously used by libcurl, so
0331      they must never be interfered with. */
0332   char *b_data;
0333   size_t b_size;
0334   size_t b_used;
0335 };
0336 
0337 /* return codes for CURLOPT_CHUNK_BGN_FUNCTION */
0338 #define CURL_CHUNK_BGN_FUNC_OK      0
0339 #define CURL_CHUNK_BGN_FUNC_FAIL    1 /* tell the lib to end the task */
0340 #define CURL_CHUNK_BGN_FUNC_SKIP    2 /* skip this chunk over */
0341 
0342 /* if splitting of data transfer is enabled, this callback is called before
0343    download of an individual chunk started. Note that parameter "remains" works
0344    only for FTP wildcard downloading (for now), otherwise is not used */
0345 typedef long (*curl_chunk_bgn_callback)(const void *transfer_info,
0346                                         void *ptr,
0347                                         int remains);
0348 
0349 /* return codes for CURLOPT_CHUNK_END_FUNCTION */
0350 #define CURL_CHUNK_END_FUNC_OK      0
0351 #define CURL_CHUNK_END_FUNC_FAIL    1 /* tell the lib to end the task */
0352 
0353 /* If splitting of data transfer is enabled this callback is called after
0354    download of an individual chunk finished.
0355    Note! After this callback was set then it have to be called FOR ALL chunks.
0356    Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC.
0357    This is the reason why we do not need "transfer_info" parameter in this
0358    callback and we are not interested in "remains" parameter too. */
0359 typedef long (*curl_chunk_end_callback)(void *ptr);
0360 
0361 /* return codes for FNMATCHFUNCTION */
0362 #define CURL_FNMATCHFUNC_MATCH    0 /* string corresponds to the pattern */
0363 #define CURL_FNMATCHFUNC_NOMATCH  1 /* pattern does not match the string */
0364 #define CURL_FNMATCHFUNC_FAIL     2 /* an error occurred */
0365 
0366 /* callback type for wildcard downloading pattern matching. If the
0367    string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */
0368 typedef int (*curl_fnmatch_callback)(void *ptr,
0369                                      const char *pattern,
0370                                      const char *string);
0371 
0372 /* These are the return codes for the seek callbacks */
0373 #define CURL_SEEKFUNC_OK       0
0374 #define CURL_SEEKFUNC_FAIL     1 /* fail the entire transfer */
0375 #define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking cannot be done, so
0376                                     libcurl might try other means instead */
0377 typedef int (*curl_seek_callback)(void *instream,
0378                                   curl_off_t offset,
0379                                   int origin); /* 'whence' */
0380 
0381 /* This is a return code for the read callback that, when returned, will
0382    signal libcurl to immediately abort the current transfer. */
0383 #define CURL_READFUNC_ABORT 0x10000000
0384 /* This is a return code for the read callback that, when returned, will
0385    signal libcurl to pause sending data on the current transfer. */
0386 #define CURL_READFUNC_PAUSE 0x10000001
0387 
0388 /* Return code for when the trailing headers' callback has terminated
0389    without any errors */
0390 #define CURL_TRAILERFUNC_OK 0
0391 /* Return code for when was an error in the trailing header's list and we
0392   want to abort the request */
0393 #define CURL_TRAILERFUNC_ABORT 1
0394 
0395 typedef size_t (*curl_read_callback)(char *buffer,
0396                                       size_t size,
0397                                       size_t nitems,
0398                                       void *instream);
0399 
0400 typedef int (*curl_trailer_callback)(struct curl_slist **list,
0401                                       void *userdata);
0402 
0403 typedef enum {
0404   CURLSOCKTYPE_IPCXN,  /* socket created for a specific IP connection */
0405   CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
0406   CURLSOCKTYPE_LAST    /* never use */
0407 } curlsocktype;
0408 
0409 /* The return code from the sockopt_callback can signal information back
0410    to libcurl: */
0411 #define CURL_SOCKOPT_OK 0
0412 #define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
0413                                 CURLE_ABORTED_BY_CALLBACK */
0414 #define CURL_SOCKOPT_ALREADY_CONNECTED 2
0415 
0416 typedef int (*curl_sockopt_callback)(void *clientp,
0417                                      curl_socket_t curlfd,
0418                                      curlsocktype purpose);
0419 
0420 struct curl_sockaddr {
0421   int family;
0422   int socktype;
0423   int protocol;
0424   unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it
0425                            turned really ugly and painful on the systems that
0426                            lack this type */
0427   struct sockaddr addr;
0428 };
0429 
0430 typedef curl_socket_t
0431 (*curl_opensocket_callback)(void *clientp,
0432                             curlsocktype purpose,
0433                             struct curl_sockaddr *address);
0434 
0435 typedef int
0436 (*curl_closesocket_callback)(void *clientp, curl_socket_t item);
0437 
0438 typedef enum {
0439   CURLIOE_OK,            /* I/O operation successful */
0440   CURLIOE_UNKNOWNCMD,    /* command was unknown to callback */
0441   CURLIOE_FAILRESTART,   /* failed to restart the read */
0442   CURLIOE_LAST           /* never use */
0443 } curlioerr;
0444 
0445 typedef enum {
0446   CURLIOCMD_NOP,         /* no operation */
0447   CURLIOCMD_RESTARTREAD, /* restart the read stream from start */
0448   CURLIOCMD_LAST         /* never use */
0449 } curliocmd;
0450 
0451 typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
0452                                          int cmd,
0453                                          void *clientp);
0454 
0455 #ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS
0456 /*
0457  * The following typedef's are signatures of malloc, free, realloc, strdup and
0458  * calloc respectively. Function pointers of these types can be passed to the
0459  * curl_global_init_mem() function to set user defined memory management
0460  * callback routines.
0461  */
0462 typedef void *(*curl_malloc_callback)(size_t size);
0463 typedef void (*curl_free_callback)(void *ptr);
0464 typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
0465 typedef char *(*curl_strdup_callback)(const char *str);
0466 typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
0467 
0468 #define CURL_DID_MEMORY_FUNC_TYPEDEFS
0469 #endif
0470 
0471 /* the kind of data that is passed to information_callback */
0472 typedef enum {
0473   CURLINFO_TEXT = 0,
0474   CURLINFO_HEADER_IN,    /* 1 */
0475   CURLINFO_HEADER_OUT,   /* 2 */
0476   CURLINFO_DATA_IN,      /* 3 */
0477   CURLINFO_DATA_OUT,     /* 4 */
0478   CURLINFO_SSL_DATA_IN,  /* 5 */
0479   CURLINFO_SSL_DATA_OUT, /* 6 */
0480   CURLINFO_END
0481 } curl_infotype;
0482 
0483 typedef int (*curl_debug_callback)
0484        (CURL *handle,      /* the handle/transfer this concerns */
0485         curl_infotype type, /* what kind of data */
0486         char *data,        /* points to the data */
0487         size_t size,       /* size of the data pointed to */
0488         void *userptr);    /* whatever the user please */
0489 
0490 /* This is the CURLOPT_PREREQFUNCTION callback prototype. */
0491 typedef int (*curl_prereq_callback)(void *clientp,
0492                                     char *conn_primary_ip,
0493                                     char *conn_local_ip,
0494                                     int conn_primary_port,
0495                                     int conn_local_port);
0496 
0497 /* Return code for when the pre-request callback has terminated without
0498    any errors */
0499 #define CURL_PREREQFUNC_OK 0
0500 /* Return code for when the pre-request callback wants to abort the
0501    request */
0502 #define CURL_PREREQFUNC_ABORT 1
0503 
0504 /* All possible error codes from all sorts of curl functions. Future versions
0505    may return other values, stay prepared.
0506 
0507    Always add new return codes last. Never *EVER* remove any. The return
0508    codes must remain the same!
0509  */
0510 
0511 typedef enum {
0512   CURLE_OK = 0,
0513   CURLE_UNSUPPORTED_PROTOCOL,    /* 1 */
0514   CURLE_FAILED_INIT,             /* 2 */
0515   CURLE_URL_MALFORMAT,           /* 3 */
0516   CURLE_NOT_BUILT_IN,            /* 4 - [was obsoleted in August 2007 for
0517                                     7.17.0, reused in April 2011 for 7.21.5] */
0518   CURLE_COULDNT_RESOLVE_PROXY,   /* 5 */
0519   CURLE_COULDNT_RESOLVE_HOST,    /* 6 */
0520   CURLE_COULDNT_CONNECT,         /* 7 */
0521   CURLE_WEIRD_SERVER_REPLY,      /* 8 */
0522   CURLE_REMOTE_ACCESS_DENIED,    /* 9 a service was denied by the server
0523                                     due to lack of access - when login fails
0524                                     this is not returned. */
0525   CURLE_FTP_ACCEPT_FAILED,       /* 10 - [was obsoleted in April 2006 for
0526                                     7.15.4, reused in Dec 2011 for 7.24.0]*/
0527   CURLE_FTP_WEIRD_PASS_REPLY,    /* 11 */
0528   CURLE_FTP_ACCEPT_TIMEOUT,      /* 12 - timeout occurred accepting server
0529                                     [was obsoleted in August 2007 for 7.17.0,
0530                                     reused in Dec 2011 for 7.24.0]*/
0531   CURLE_FTP_WEIRD_PASV_REPLY,    /* 13 */
0532   CURLE_FTP_WEIRD_227_FORMAT,    /* 14 */
0533   CURLE_FTP_CANT_GET_HOST,       /* 15 */
0534   CURLE_HTTP2,                   /* 16 - A problem in the http2 framing layer.
0535                                     [was obsoleted in August 2007 for 7.17.0,
0536                                     reused in July 2014 for 7.38.0] */
0537   CURLE_FTP_COULDNT_SET_TYPE,    /* 17 */
0538   CURLE_PARTIAL_FILE,            /* 18 */
0539   CURLE_FTP_COULDNT_RETR_FILE,   /* 19 */
0540   CURLE_OBSOLETE20,              /* 20 - NOT USED */
0541   CURLE_QUOTE_ERROR,             /* 21 - quote command failure */
0542   CURLE_HTTP_RETURNED_ERROR,     /* 22 */
0543   CURLE_WRITE_ERROR,             /* 23 */
0544   CURLE_OBSOLETE24,              /* 24 - NOT USED */
0545   CURLE_UPLOAD_FAILED,           /* 25 - failed upload "command" */
0546   CURLE_READ_ERROR,              /* 26 - could not open/read from file */
0547   CURLE_OUT_OF_MEMORY,           /* 27 */
0548   CURLE_OPERATION_TIMEDOUT,      /* 28 - the timeout time was reached */
0549   CURLE_OBSOLETE29,              /* 29 - NOT USED */
0550   CURLE_FTP_PORT_FAILED,         /* 30 - FTP PORT operation failed */
0551   CURLE_FTP_COULDNT_USE_REST,    /* 31 - the REST command failed */
0552   CURLE_OBSOLETE32,              /* 32 - NOT USED */
0553   CURLE_RANGE_ERROR,             /* 33 - RANGE "command" did not work */
0554   CURLE_OBSOLETE34,              /* 34 */
0555   CURLE_SSL_CONNECT_ERROR,       /* 35 - wrong when connecting with SSL */
0556   CURLE_BAD_DOWNLOAD_RESUME,     /* 36 - could not resume download */
0557   CURLE_FILE_COULDNT_READ_FILE,  /* 37 */
0558   CURLE_LDAP_CANNOT_BIND,        /* 38 */
0559   CURLE_LDAP_SEARCH_FAILED,      /* 39 */
0560   CURLE_OBSOLETE40,              /* 40 - NOT USED */
0561   CURLE_OBSOLETE41,              /* 41 - NOT USED starting with 7.53.0 */
0562   CURLE_ABORTED_BY_CALLBACK,     /* 42 */
0563   CURLE_BAD_FUNCTION_ARGUMENT,   /* 43 */
0564   CURLE_OBSOLETE44,              /* 44 - NOT USED */
0565   CURLE_INTERFACE_FAILED,        /* 45 - CURLOPT_INTERFACE failed */
0566   CURLE_OBSOLETE46,              /* 46 - NOT USED */
0567   CURLE_TOO_MANY_REDIRECTS,      /* 47 - catch endless re-direct loops */
0568   CURLE_UNKNOWN_OPTION,          /* 48 - User specified an unknown option */
0569   CURLE_SETOPT_OPTION_SYNTAX,    /* 49 - Malformed setopt option */
0570   CURLE_OBSOLETE50,              /* 50 - NOT USED */
0571   CURLE_OBSOLETE51,              /* 51 - NOT USED */
0572   CURLE_GOT_NOTHING,             /* 52 - when this is a specific error */
0573   CURLE_SSL_ENGINE_NOTFOUND,     /* 53 - SSL crypto engine not found */
0574   CURLE_SSL_ENGINE_SETFAILED,    /* 54 - can not set SSL crypto engine as
0575                                     default */
0576   CURLE_SEND_ERROR,              /* 55 - failed sending network data */
0577   CURLE_RECV_ERROR,              /* 56 - failure in receiving network data */
0578   CURLE_OBSOLETE57,              /* 57 - NOT IN USE */
0579   CURLE_SSL_CERTPROBLEM,         /* 58 - problem with the local certificate */
0580   CURLE_SSL_CIPHER,              /* 59 - could not use specified cipher */
0581   CURLE_PEER_FAILED_VERIFICATION, /* 60 - peer's certificate or fingerprint
0582                                      was not verified fine */
0583   CURLE_BAD_CONTENT_ENCODING,    /* 61 - Unrecognized/bad encoding */
0584   CURLE_OBSOLETE62,              /* 62 - NOT IN USE since 7.82.0 */
0585   CURLE_FILESIZE_EXCEEDED,       /* 63 - Maximum file size exceeded */
0586   CURLE_USE_SSL_FAILED,          /* 64 - Requested FTP SSL level failed */
0587   CURLE_SEND_FAIL_REWIND,        /* 65 - Sending the data requires a rewind
0588                                     that failed */
0589   CURLE_SSL_ENGINE_INITFAILED,   /* 66 - failed to initialise ENGINE */
0590   CURLE_LOGIN_DENIED,            /* 67 - user, password or similar was not
0591                                     accepted and we failed to login */
0592   CURLE_TFTP_NOTFOUND,           /* 68 - file not found on server */
0593   CURLE_TFTP_PERM,               /* 69 - permission problem on server */
0594   CURLE_REMOTE_DISK_FULL,        /* 70 - out of disk space on server */
0595   CURLE_TFTP_ILLEGAL,            /* 71 - Illegal TFTP operation */
0596   CURLE_TFTP_UNKNOWNID,          /* 72 - Unknown transfer ID */
0597   CURLE_REMOTE_FILE_EXISTS,      /* 73 - File already exists */
0598   CURLE_TFTP_NOSUCHUSER,         /* 74 - No such user */
0599   CURLE_OBSOLETE75,              /* 75 - NOT IN USE since 7.82.0 */
0600   CURLE_OBSOLETE76,              /* 76 - NOT IN USE since 7.82.0 */
0601   CURLE_SSL_CACERT_BADFILE,      /* 77 - could not load CACERT file, missing
0602                                     or wrong format */
0603   CURLE_REMOTE_FILE_NOT_FOUND,   /* 78 - remote file not found */
0604   CURLE_SSH,                     /* 79 - error from the SSH layer, somewhat
0605                                     generic so the error message will be of
0606                                     interest when this has happened */
0607 
0608   CURLE_SSL_SHUTDOWN_FAILED,     /* 80 - Failed to shut down the SSL
0609                                     connection */
0610   CURLE_AGAIN,                   /* 81 - socket is not ready for send/recv,
0611                                     wait till it is ready and try again (Added
0612                                     in 7.18.2) */
0613   CURLE_SSL_CRL_BADFILE,         /* 82 - could not load CRL file, missing or
0614                                     wrong format (Added in 7.19.0) */
0615   CURLE_SSL_ISSUER_ERROR,        /* 83 - Issuer check failed.  (Added in
0616                                     7.19.0) */
0617   CURLE_FTP_PRET_FAILED,         /* 84 - a PRET command failed */
0618   CURLE_RTSP_CSEQ_ERROR,         /* 85 - mismatch of RTSP CSeq numbers */
0619   CURLE_RTSP_SESSION_ERROR,      /* 86 - mismatch of RTSP Session Ids */
0620   CURLE_FTP_BAD_FILE_LIST,       /* 87 - unable to parse FTP file list */
0621   CURLE_CHUNK_FAILED,            /* 88 - chunk callback reported error */
0622   CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the
0623                                     session will be queued */
0624   CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not
0625                                      match */
0626   CURLE_SSL_INVALIDCERTSTATUS,   /* 91 - invalid certificate status */
0627   CURLE_HTTP2_STREAM,            /* 92 - stream error in HTTP/2 framing layer
0628                                     */
0629   CURLE_RECURSIVE_API_CALL,      /* 93 - an api function was called from
0630                                     inside a callback */
0631   CURLE_AUTH_ERROR,              /* 94 - an authentication function returned an
0632                                     error */
0633   CURLE_HTTP3,                   /* 95 - An HTTP/3 layer problem */
0634   CURLE_QUIC_CONNECT_ERROR,      /* 96 - QUIC connection error */
0635   CURLE_PROXY,                   /* 97 - proxy handshake error */
0636   CURLE_SSL_CLIENTCERT,          /* 98 - client-side certificate required */
0637   CURLE_UNRECOVERABLE_POLL,      /* 99 - poll/select returned fatal error */
0638   CURLE_TOO_LARGE,               /* 100 - a value/data met its maximum */
0639   CURLE_ECH_REQUIRED,            /* 101 - ECH tried but failed */
0640   CURL_LAST /* never use! */
0641 } CURLcode;
0642 
0643 #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
0644                           the obsolete stuff removed! */
0645 
0646 /* removed in 7.53.0 */
0647 #define CURLE_FUNCTION_NOT_FOUND CURLE_OBSOLETE41
0648 
0649 /* removed in 7.56.0 */
0650 #define CURLE_HTTP_POST_ERROR CURLE_OBSOLETE34
0651 
0652 /* Previously obsolete error code reused in 7.38.0 */
0653 #define CURLE_OBSOLETE16 CURLE_HTTP2
0654 
0655 /* Previously obsolete error codes reused in 7.24.0 */
0656 #define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED
0657 #define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT
0658 
0659 /*  compatibility with older names */
0660 #define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
0661 #define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY
0662 
0663 /* The following were added in 7.62.0 */
0664 #define CURLE_SSL_CACERT CURLE_PEER_FAILED_VERIFICATION
0665 
0666 /* The following were added in 7.21.5, April 2011 */
0667 #define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
0668 
0669 /* Added for 7.78.0 */
0670 #define CURLE_TELNET_OPTION_SYNTAX CURLE_SETOPT_OPTION_SYNTAX
0671 
0672 /* The following were added in 7.17.1 */
0673 /* These are scheduled to disappear by 2009 */
0674 #define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION
0675 
0676 /* The following were added in 7.17.0 */
0677 /* These are scheduled to disappear by 2009 */
0678 #define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */
0679 #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46
0680 #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44
0681 #define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10
0682 #define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16
0683 #define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32
0684 #define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29
0685 #define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12
0686 #define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20
0687 #define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40
0688 #define CURLE_MALFORMAT_USER CURLE_OBSOLETE24
0689 #define CURLE_SHARE_IN_USE CURLE_OBSOLETE57
0690 #define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN
0691 
0692 #define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED
0693 #define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE
0694 #define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR
0695 #define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL
0696 #define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS
0697 #define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR
0698 #define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED
0699 
0700 /* The following were added earlier */
0701 
0702 #define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT
0703 #define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR
0704 #define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED
0705 #define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED
0706 #define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE
0707 #define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME
0708 #define CURLE_LDAP_INVALID_URL CURLE_OBSOLETE62
0709 #define CURLE_CONV_REQD CURLE_OBSOLETE76
0710 #define CURLE_CONV_FAILED CURLE_OBSOLETE75
0711 
0712 /* This was the error code 50 in 7.7.3 and a few earlier versions, this
0713    is no longer used by libcurl but is instead #defined here only to not
0714    make programs break */
0715 #define CURLE_ALREADY_COMPLETE 99999
0716 
0717 /* Provide defines for really old option names */
0718 #define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */
0719 #define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */
0720 #define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA
0721 
0722 /* Since long deprecated options with no code in the lib that does anything
0723    with them. */
0724 #define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40
0725 #define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72
0726 #define CURLOPT_OBSOLETE72 9999
0727 #define CURLOPT_OBSOLETE40 9999
0728 
0729 #endif /* !CURL_NO_OLDIES */
0730 
0731 /*
0732  * Proxy error codes. Returned in CURLINFO_PROXY_ERROR if CURLE_PROXY was
0733  * return for the transfers.
0734  */
0735 typedef enum {
0736   CURLPX_OK,
0737   CURLPX_BAD_ADDRESS_TYPE,
0738   CURLPX_BAD_VERSION,
0739   CURLPX_CLOSED,
0740   CURLPX_GSSAPI,
0741   CURLPX_GSSAPI_PERMSG,
0742   CURLPX_GSSAPI_PROTECTION,
0743   CURLPX_IDENTD,
0744   CURLPX_IDENTD_DIFFER,
0745   CURLPX_LONG_HOSTNAME,
0746   CURLPX_LONG_PASSWD,
0747   CURLPX_LONG_USER,
0748   CURLPX_NO_AUTH,
0749   CURLPX_RECV_ADDRESS,
0750   CURLPX_RECV_AUTH,
0751   CURLPX_RECV_CONNECT,
0752   CURLPX_RECV_REQACK,
0753   CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED,
0754   CURLPX_REPLY_COMMAND_NOT_SUPPORTED,
0755   CURLPX_REPLY_CONNECTION_REFUSED,
0756   CURLPX_REPLY_GENERAL_SERVER_FAILURE,
0757   CURLPX_REPLY_HOST_UNREACHABLE,
0758   CURLPX_REPLY_NETWORK_UNREACHABLE,
0759   CURLPX_REPLY_NOT_ALLOWED,
0760   CURLPX_REPLY_TTL_EXPIRED,
0761   CURLPX_REPLY_UNASSIGNED,
0762   CURLPX_REQUEST_FAILED,
0763   CURLPX_RESOLVE_HOST,
0764   CURLPX_SEND_AUTH,
0765   CURLPX_SEND_CONNECT,
0766   CURLPX_SEND_REQUEST,
0767   CURLPX_UNKNOWN_FAIL,
0768   CURLPX_UNKNOWN_MODE,
0769   CURLPX_USER_REJECTED,
0770   CURLPX_LAST /* never use */
0771 } CURLproxycode;
0772 
0773 /* This prototype applies to all conversion callbacks */
0774 typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);
0775 
0776 typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl,    /* easy handle */
0777                                           void *ssl_ctx, /* actually an OpenSSL
0778                                                             or wolfSSL SSL_CTX,
0779                                                             or an mbedTLS
0780                                                           mbedtls_ssl_config */
0781                                           void *userptr);
0782 
0783 typedef enum {
0784   CURLPROXY_HTTP = 0,   /* added in 7.10, new in 7.19.4 default is to use
0785                            CONNECT HTTP/1.1 */
0786   CURLPROXY_HTTP_1_0 = 1,   /* added in 7.19.4, force to use CONNECT
0787                                HTTP/1.0  */
0788   CURLPROXY_HTTPS = 2,  /* HTTPS but stick to HTTP/1 added in 7.52.0 */
0789   CURLPROXY_HTTPS2 = 3, /* HTTPS and attempt HTTP/2 added in 8.2.0 */
0790   CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
0791                            in 7.10 */
0792   CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
0793   CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */
0794   CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the
0795                                    hostname rather than the IP address. added
0796                                    in 7.18.0 */
0797 } curl_proxytype;  /* this enum was added in 7.10 */
0798 
0799 /*
0800  * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options:
0801  *
0802  * CURLAUTH_NONE         - No HTTP authentication
0803  * CURLAUTH_BASIC        - HTTP Basic authentication (default)
0804  * CURLAUTH_DIGEST       - HTTP Digest authentication
0805  * CURLAUTH_NEGOTIATE    - HTTP Negotiate (SPNEGO) authentication
0806  * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated)
0807  * CURLAUTH_NTLM         - HTTP NTLM authentication
0808  * CURLAUTH_DIGEST_IE    - HTTP Digest authentication with IE flavour
0809  * CURLAUTH_NTLM_WB      - HTTP NTLM authentication delegated to winbind helper
0810  * CURLAUTH_BEARER       - HTTP Bearer token authentication
0811  * CURLAUTH_ONLY         - Use together with a single other type to force no
0812  *                         authentication or just that single type
0813  * CURLAUTH_ANY          - All fine types set
0814  * CURLAUTH_ANYSAFE      - All fine types except Basic
0815  */
0816 
0817 #define CURLAUTH_NONE         ((unsigned long)0)
0818 #define CURLAUTH_BASIC        (((unsigned long)1)<<0)
0819 #define CURLAUTH_DIGEST       (((unsigned long)1)<<1)
0820 #define CURLAUTH_NEGOTIATE    (((unsigned long)1)<<2)
0821 /* Deprecated since the advent of CURLAUTH_NEGOTIATE */
0822 #define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE
0823 /* Used for CURLOPT_SOCKS5_AUTH to stay terminologically correct */
0824 #define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
0825 #define CURLAUTH_NTLM         (((unsigned long)1)<<3)
0826 #define CURLAUTH_DIGEST_IE    (((unsigned long)1)<<4)
0827 #ifndef CURL_NO_OLDIES
0828   /* functionality removed since 8.8.0 */
0829 #define CURLAUTH_NTLM_WB      (((unsigned long)1)<<5)
0830 #endif
0831 #define CURLAUTH_BEARER       (((unsigned long)1)<<6)
0832 #define CURLAUTH_AWS_SIGV4    (((unsigned long)1)<<7)
0833 #define CURLAUTH_ONLY         (((unsigned long)1)<<31)
0834 #define CURLAUTH_ANY          (~CURLAUTH_DIGEST_IE)
0835 #define CURLAUTH_ANYSAFE      (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
0836 
0837 #define CURLSSH_AUTH_ANY       ~0     /* all types supported by the server */
0838 #define CURLSSH_AUTH_NONE      0      /* none allowed, silly but complete */
0839 #define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */
0840 #define CURLSSH_AUTH_PASSWORD  (1<<1) /* password */
0841 #define CURLSSH_AUTH_HOST      (1<<2) /* host key files */
0842 #define CURLSSH_AUTH_KEYBOARD  (1<<3) /* keyboard interactive */
0843 #define CURLSSH_AUTH_AGENT     (1<<4) /* agent (ssh-agent, pageant...) */
0844 #define CURLSSH_AUTH_GSSAPI    (1<<5) /* gssapi (kerberos, ...) */
0845 #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
0846 
0847 #define CURLGSSAPI_DELEGATION_NONE        0      /* no delegation (default) */
0848 #define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */
0849 #define CURLGSSAPI_DELEGATION_FLAG        (1<<1) /* delegate always */
0850 
0851 #define CURL_ERROR_SIZE 256
0852 
0853 enum curl_khtype {
0854   CURLKHTYPE_UNKNOWN,
0855   CURLKHTYPE_RSA1,
0856   CURLKHTYPE_RSA,
0857   CURLKHTYPE_DSS,
0858   CURLKHTYPE_ECDSA,
0859   CURLKHTYPE_ED25519
0860 };
0861 
0862 struct curl_khkey {
0863   const char *key; /* points to a null-terminated string encoded with base64
0864                       if len is zero, otherwise to the "raw" data */
0865   size_t len;
0866   enum curl_khtype keytype;
0867 };
0868 
0869 /* this is the set of return values expected from the curl_sshkeycallback
0870    callback */
0871 enum curl_khstat {
0872   CURLKHSTAT_FINE_ADD_TO_FILE,
0873   CURLKHSTAT_FINE,
0874   CURLKHSTAT_REJECT, /* reject the connection, return an error */
0875   CURLKHSTAT_DEFER,  /* do not accept it, but we cannot answer right now.
0876                         Causes a CURLE_PEER_FAILED_VERIFICATION error but the
0877                         connection will be left intact etc */
0878   CURLKHSTAT_FINE_REPLACE, /* accept and replace the wrong key */
0879   CURLKHSTAT_LAST    /* not for use, only a marker for last-in-list */
0880 };
0881 
0882 /* this is the set of status codes pass in to the callback */
0883 enum curl_khmatch {
0884   CURLKHMATCH_OK,       /* match */
0885   CURLKHMATCH_MISMATCH, /* host found, key mismatch! */
0886   CURLKHMATCH_MISSING,  /* no matching host/key found */
0887   CURLKHMATCH_LAST      /* not for use, only a marker for last-in-list */
0888 };
0889 
0890 typedef int
0891   (*curl_sshkeycallback) (CURL *easy,     /* easy handle */
0892                           const struct curl_khkey *knownkey, /* known */
0893                           const struct curl_khkey *foundkey, /* found */
0894                           enum curl_khmatch, /* libcurl's view on the keys */
0895                           void *clientp); /* custom pointer passed with */
0896                                           /* CURLOPT_SSH_KEYDATA */
0897 
0898 typedef int
0899   (*curl_sshhostkeycallback) (void *clientp,/* custom pointer passed */
0900                                             /* with CURLOPT_SSH_HOSTKEYDATA */
0901                           int keytype, /* CURLKHTYPE */
0902                           const char *key, /* hostkey to check */
0903                           size_t keylen); /* length of the key */
0904                           /* return CURLE_OK to accept */
0905                           /* or something else to refuse */
0906 
0907 
0908 /* parameter for the CURLOPT_USE_SSL option */
0909 typedef enum {
0910   CURLUSESSL_NONE,    /* do not attempt to use SSL */
0911   CURLUSESSL_TRY,     /* try using SSL, proceed anyway otherwise */
0912   CURLUSESSL_CONTROL, /* SSL for the control connection or fail */
0913   CURLUSESSL_ALL,     /* SSL for all communication or fail */
0914   CURLUSESSL_LAST     /* not an option, never use */
0915 } curl_usessl;
0916 
0917 /* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */
0918 
0919 /* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the
0920    name of improving interoperability with older servers. Some SSL libraries
0921    have introduced work-arounds for this flaw but those work-arounds sometimes
0922    make the SSL communication fail. To regain functionality with those broken
0923    servers, a user can this way allow the vulnerability back. */
0924 #define CURLSSLOPT_ALLOW_BEAST (1<<0)
0925 
0926 /* - NO_REVOKE tells libcurl to disable certificate revocation checks for those
0927    SSL backends where such behavior is present. */
0928 #define CURLSSLOPT_NO_REVOKE (1<<1)
0929 
0930 /* - NO_PARTIALCHAIN tells libcurl to *NOT* accept a partial certificate chain
0931    if possible. The OpenSSL backend has this ability. */
0932 #define CURLSSLOPT_NO_PARTIALCHAIN (1<<2)
0933 
0934 /* - REVOKE_BEST_EFFORT tells libcurl to ignore certificate revocation offline
0935    checks and ignore missing revocation list for those SSL backends where such
0936    behavior is present. */
0937 #define CURLSSLOPT_REVOKE_BEST_EFFORT (1<<3)
0938 
0939 /* - CURLSSLOPT_NATIVE_CA tells libcurl to use standard certificate store of
0940    operating system. Currently implemented under MS-Windows. */
0941 #define CURLSSLOPT_NATIVE_CA (1<<4)
0942 
0943 /* - CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl to automatically locate and use
0944    a client certificate for authentication. (Schannel) */
0945 #define CURLSSLOPT_AUTO_CLIENT_CERT (1<<5)
0946 
0947 /* If possible, send data using TLS 1.3 early data */
0948 #define CURLSSLOPT_EARLYDATA (1<<6)
0949 
0950 /* The default connection attempt delay in milliseconds for happy eyeballs.
0951    CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document
0952    this value, keep them in sync. */
0953 #define CURL_HET_DEFAULT 200L
0954 
0955 /* The default connection upkeep interval in milliseconds. */
0956 #define CURL_UPKEEP_INTERVAL_DEFAULT 60000L
0957 
0958 #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
0959                           the obsolete stuff removed! */
0960 
0961 /* Backwards compatibility with older names */
0962 /* These are scheduled to disappear by 2009 */
0963 
0964 #define CURLFTPSSL_NONE CURLUSESSL_NONE
0965 #define CURLFTPSSL_TRY CURLUSESSL_TRY
0966 #define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL
0967 #define CURLFTPSSL_ALL CURLUSESSL_ALL
0968 #define CURLFTPSSL_LAST CURLUSESSL_LAST
0969 #define curl_ftpssl curl_usessl
0970 #endif /* !CURL_NO_OLDIES */
0971 
0972 /* parameter for the CURLOPT_FTP_SSL_CCC option */
0973 typedef enum {
0974   CURLFTPSSL_CCC_NONE,    /* do not send CCC */
0975   CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */
0976   CURLFTPSSL_CCC_ACTIVE,  /* Initiate the shutdown */
0977   CURLFTPSSL_CCC_LAST     /* not an option, never use */
0978 } curl_ftpccc;
0979 
0980 /* parameter for the CURLOPT_FTPSSLAUTH option */
0981 typedef enum {
0982   CURLFTPAUTH_DEFAULT, /* let libcurl decide */
0983   CURLFTPAUTH_SSL,     /* use "AUTH SSL" */
0984   CURLFTPAUTH_TLS,     /* use "AUTH TLS" */
0985   CURLFTPAUTH_LAST /* not an option, never use */
0986 } curl_ftpauth;
0987 
0988 /* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */
0989 typedef enum {
0990   CURLFTP_CREATE_DIR_NONE,  /* do NOT create missing dirs! */
0991   CURLFTP_CREATE_DIR,       /* (FTP/SFTP) if CWD fails, try MKD and then CWD
0992                                again if MKD succeeded, for SFTP this does
0993                                similar magic */
0994   CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD
0995                                again even if MKD failed! */
0996   CURLFTP_CREATE_DIR_LAST   /* not an option, never use */
0997 } curl_ftpcreatedir;
0998 
0999 /* parameter for the CURLOPT_FTP_FILEMETHOD option */
1000 typedef enum {
1001   CURLFTPMETHOD_DEFAULT,   /* let libcurl pick */
1002   CURLFTPMETHOD_MULTICWD,  /* single CWD operation for each path part */
1003   CURLFTPMETHOD_NOCWD,     /* no CWD at all */
1004   CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */
1005   CURLFTPMETHOD_LAST       /* not an option, never use */
1006 } curl_ftpmethod;
1007 
1008 /* bitmask defines for CURLOPT_HEADEROPT */
1009 #define CURLHEADER_UNIFIED  0
1010 #define CURLHEADER_SEPARATE (1<<0)
1011 
1012 /* CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option */
1013 #define CURLALTSVC_READONLYFILE (1<<2)
1014 #define CURLALTSVC_H1           (1<<3)
1015 #define CURLALTSVC_H2           (1<<4)
1016 #define CURLALTSVC_H3           (1<<5)
1017 
1018 
1019 struct curl_hstsentry {
1020   char *name;
1021   size_t namelen;
1022   unsigned int includeSubDomains:1;
1023   char expire[18]; /* YYYYMMDD HH:MM:SS [null-terminated] */
1024 };
1025 
1026 struct curl_index {
1027   size_t index; /* the provided entry's "index" or count */
1028   size_t total; /* total number of entries to save */
1029 };
1030 
1031 typedef enum {
1032   CURLSTS_OK,
1033   CURLSTS_DONE,
1034   CURLSTS_FAIL
1035 } CURLSTScode;
1036 
1037 typedef CURLSTScode (*curl_hstsread_callback)(CURL *easy,
1038                                               struct curl_hstsentry *e,
1039                                               void *userp);
1040 typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
1041                                                struct curl_hstsentry *e,
1042                                                struct curl_index *i,
1043                                                void *userp);
1044 
1045 /* CURLHSTS_* are bits for the CURLOPT_HSTS option */
1046 #define CURLHSTS_ENABLE       (long)(1<<0)
1047 #define CURLHSTS_READONLYFILE (long)(1<<1)
1048 
1049 /* The CURLPROTO_ defines below are for the **deprecated** CURLOPT_*PROTOCOLS
1050    options. Do not use. */
1051 #define CURLPROTO_HTTP   (1<<0)
1052 #define CURLPROTO_HTTPS  (1<<1)
1053 #define CURLPROTO_FTP    (1<<2)
1054 #define CURLPROTO_FTPS   (1<<3)
1055 #define CURLPROTO_SCP    (1<<4)
1056 #define CURLPROTO_SFTP   (1<<5)
1057 #define CURLPROTO_TELNET (1<<6)
1058 #define CURLPROTO_LDAP   (1<<7)
1059 #define CURLPROTO_LDAPS  (1<<8)
1060 #define CURLPROTO_DICT   (1<<9)
1061 #define CURLPROTO_FILE   (1<<10)
1062 #define CURLPROTO_TFTP   (1<<11)
1063 #define CURLPROTO_IMAP   (1<<12)
1064 #define CURLPROTO_IMAPS  (1<<13)
1065 #define CURLPROTO_POP3   (1<<14)
1066 #define CURLPROTO_POP3S  (1<<15)
1067 #define CURLPROTO_SMTP   (1<<16)
1068 #define CURLPROTO_SMTPS  (1<<17)
1069 #define CURLPROTO_RTSP   (1<<18)
1070 #define CURLPROTO_RTMP   (1<<19)
1071 #define CURLPROTO_RTMPT  (1<<20)
1072 #define CURLPROTO_RTMPE  (1<<21)
1073 #define CURLPROTO_RTMPTE (1<<22)
1074 #define CURLPROTO_RTMPS  (1<<23)
1075 #define CURLPROTO_RTMPTS (1<<24)
1076 #define CURLPROTO_GOPHER (1<<25)
1077 #define CURLPROTO_SMB    (1<<26)
1078 #define CURLPROTO_SMBS   (1<<27)
1079 #define CURLPROTO_MQTT   (1<<28)
1080 #define CURLPROTO_GOPHERS (1<<29)
1081 #define CURLPROTO_ALL    (~0) /* enable everything */
1082 
1083 /* long may be 32 or 64 bits, but we should never depend on anything else
1084    but 32 */
1085 #define CURLOPTTYPE_LONG          0
1086 #define CURLOPTTYPE_OBJECTPOINT   10000
1087 #define CURLOPTTYPE_FUNCTIONPOINT 20000
1088 #define CURLOPTTYPE_OFF_T         30000
1089 #define CURLOPTTYPE_BLOB          40000
1090 
1091 /* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the
1092    string options from the header file */
1093 
1094 
1095 #define CURLOPT(na,t,nu) na = t + nu
1096 #define CURLOPTDEPRECATED(na,t,nu,v,m) na CURL_DEPRECATED(v,m) = t + nu
1097 
1098 /* CURLOPT aliases that make no runtime difference */
1099 
1100 /* 'char *' argument to a string with a trailing zero */
1101 #define CURLOPTTYPE_STRINGPOINT CURLOPTTYPE_OBJECTPOINT
1102 
1103 /* 'struct curl_slist *' argument */
1104 #define CURLOPTTYPE_SLISTPOINT  CURLOPTTYPE_OBJECTPOINT
1105 
1106 /* 'void *' argument passed untouched to callback */
1107 #define CURLOPTTYPE_CBPOINT     CURLOPTTYPE_OBJECTPOINT
1108 
1109 /* 'long' argument with a set of values/bitmask */
1110 #define CURLOPTTYPE_VALUES      CURLOPTTYPE_LONG
1111 
1112 /*
1113  * All CURLOPT_* values.
1114  */
1115 
1116 typedef enum {
1117   /* This is the FILE * or void * the regular output should be written to. */
1118   CURLOPT(CURLOPT_WRITEDATA, CURLOPTTYPE_CBPOINT, 1),
1119 
1120   /* The full URL to get/put */
1121   CURLOPT(CURLOPT_URL, CURLOPTTYPE_STRINGPOINT, 2),
1122 
1123   /* Port number to connect to, if other than default. */
1124   CURLOPT(CURLOPT_PORT, CURLOPTTYPE_LONG, 3),
1125 
1126   /* Name of proxy to use. */
1127   CURLOPT(CURLOPT_PROXY, CURLOPTTYPE_STRINGPOINT, 4),
1128 
1129   /* "user:password;options" to use when fetching. */
1130   CURLOPT(CURLOPT_USERPWD, CURLOPTTYPE_STRINGPOINT, 5),
1131 
1132   /* "user:password" to use with proxy. */
1133   CURLOPT(CURLOPT_PROXYUSERPWD, CURLOPTTYPE_STRINGPOINT, 6),
1134 
1135   /* Range to get, specified as an ASCII string. */
1136   CURLOPT(CURLOPT_RANGE, CURLOPTTYPE_STRINGPOINT, 7),
1137 
1138   /* not used */
1139 
1140   /* Specified file stream to upload from (use as input): */
1141   CURLOPT(CURLOPT_READDATA, CURLOPTTYPE_CBPOINT, 9),
1142 
1143   /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
1144    * bytes big. */
1145   CURLOPT(CURLOPT_ERRORBUFFER, CURLOPTTYPE_OBJECTPOINT, 10),
1146 
1147   /* Function that will be called to store the output (instead of fwrite). The
1148    * parameters will use fwrite() syntax, make sure to follow them. */
1149   CURLOPT(CURLOPT_WRITEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 11),
1150 
1151   /* Function that will be called to read the input (instead of fread). The
1152    * parameters will use fread() syntax, make sure to follow them. */
1153   CURLOPT(CURLOPT_READFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 12),
1154 
1155   /* Time-out the read operation after this amount of seconds */
1156   CURLOPT(CURLOPT_TIMEOUT, CURLOPTTYPE_LONG, 13),
1157 
1158   /* If CURLOPT_READDATA is used, this can be used to inform libcurl about
1159    * how large the file being sent really is. That allows better error
1160    * checking and better verifies that the upload was successful. -1 means
1161    * unknown size.
1162    *
1163    * For large file support, there is also a _LARGE version of the key
1164    * which takes an off_t type, allowing platforms with larger off_t
1165    * sizes to handle larger files. See below for INFILESIZE_LARGE.
1166    */
1167   CURLOPT(CURLOPT_INFILESIZE, CURLOPTTYPE_LONG, 14),
1168 
1169   /* POST static input fields. */
1170   CURLOPT(CURLOPT_POSTFIELDS, CURLOPTTYPE_OBJECTPOINT, 15),
1171 
1172   /* Set the referrer page (needed by some CGIs) */
1173   CURLOPT(CURLOPT_REFERER, CURLOPTTYPE_STRINGPOINT, 16),
1174 
1175   /* Set the FTP PORT string (interface name, named or numerical IP address)
1176      Use i.e '-' to use default address. */
1177   CURLOPT(CURLOPT_FTPPORT, CURLOPTTYPE_STRINGPOINT, 17),
1178 
1179   /* Set the User-Agent string (examined by some CGIs) */
1180   CURLOPT(CURLOPT_USERAGENT, CURLOPTTYPE_STRINGPOINT, 18),
1181 
1182   /* If the download receives less than "low speed limit" bytes/second
1183    * during "low speed time" seconds, the operations is aborted.
1184    * You could i.e if you have a pretty high speed connection, abort if
1185    * it is less than 2000 bytes/sec during 20 seconds.
1186    */
1187 
1188   /* Set the "low speed limit" */
1189   CURLOPT(CURLOPT_LOW_SPEED_LIMIT, CURLOPTTYPE_LONG, 19),
1190 
1191   /* Set the "low speed time" */
1192   CURLOPT(CURLOPT_LOW_SPEED_TIME, CURLOPTTYPE_LONG, 20),
1193 
1194   /* Set the continuation offset.
1195    *
1196    * Note there is also a _LARGE version of this key which uses
1197    * off_t types, allowing for large file offsets on platforms which
1198    * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE.
1199    */
1200   CURLOPT(CURLOPT_RESUME_FROM, CURLOPTTYPE_LONG, 21),
1201 
1202   /* Set cookie in request: */
1203   CURLOPT(CURLOPT_COOKIE, CURLOPTTYPE_STRINGPOINT, 22),
1204 
1205   /* This points to a linked list of headers, struct curl_slist kind. This
1206      list is also used for RTSP (in spite of its name) */
1207   CURLOPT(CURLOPT_HTTPHEADER, CURLOPTTYPE_SLISTPOINT, 23),
1208 
1209   /* This points to a linked list of post entries, struct curl_httppost */
1210   CURLOPTDEPRECATED(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24,
1211                     7.56.0, "Use CURLOPT_MIMEPOST"),
1212 
1213   /* name of the file keeping your private SSL-certificate */
1214   CURLOPT(CURLOPT_SSLCERT, CURLOPTTYPE_STRINGPOINT, 25),
1215 
1216   /* password for the SSL or SSH private key */
1217   CURLOPT(CURLOPT_KEYPASSWD, CURLOPTTYPE_STRINGPOINT, 26),
1218 
1219   /* send TYPE parameter? */
1220   CURLOPT(CURLOPT_CRLF, CURLOPTTYPE_LONG, 27),
1221 
1222   /* send linked-list of QUOTE commands */
1223   CURLOPT(CURLOPT_QUOTE, CURLOPTTYPE_SLISTPOINT, 28),
1224 
1225   /* send FILE * or void * to store headers to, if you use a callback it
1226      is simply passed to the callback unmodified */
1227   CURLOPT(CURLOPT_HEADERDATA, CURLOPTTYPE_CBPOINT, 29),
1228 
1229   /* point to a file to read the initial cookies from, also enables
1230      "cookie awareness" */
1231   CURLOPT(CURLOPT_COOKIEFILE, CURLOPTTYPE_STRINGPOINT, 31),
1232 
1233   /* What version to specifically try to use.
1234      See CURL_SSLVERSION defines below. */
1235   CURLOPT(CURLOPT_SSLVERSION, CURLOPTTYPE_VALUES, 32),
1236 
1237   /* What kind of HTTP time condition to use, see defines */
1238   CURLOPT(CURLOPT_TIMECONDITION, CURLOPTTYPE_VALUES, 33),
1239 
1240   /* Time to use with the above condition. Specified in number of seconds
1241      since 1 Jan 1970 */
1242   CURLOPT(CURLOPT_TIMEVALUE, CURLOPTTYPE_LONG, 34),
1243 
1244   /* 35 = OBSOLETE */
1245 
1246   /* Custom request, for customizing the get command like
1247      HTTP: DELETE, TRACE and others
1248      FTP: to use a different list command
1249      */
1250   CURLOPT(CURLOPT_CUSTOMREQUEST, CURLOPTTYPE_STRINGPOINT, 36),
1251 
1252   /* FILE handle to use instead of stderr */
1253   CURLOPT(CURLOPT_STDERR, CURLOPTTYPE_OBJECTPOINT, 37),
1254 
1255   /* 38 is not used */
1256 
1257   /* send linked-list of post-transfer QUOTE commands */
1258   CURLOPT(CURLOPT_POSTQUOTE, CURLOPTTYPE_SLISTPOINT, 39),
1259 
1260   /* 40 is not used */
1261 
1262   /* talk a lot */
1263   CURLOPT(CURLOPT_VERBOSE, CURLOPTTYPE_LONG, 41),
1264 
1265   /* throw the header out too */
1266   CURLOPT(CURLOPT_HEADER, CURLOPTTYPE_LONG, 42),
1267 
1268   /* shut off the progress meter */
1269   CURLOPT(CURLOPT_NOPROGRESS, CURLOPTTYPE_LONG, 43),
1270 
1271   /* use HEAD to get http document */
1272   CURLOPT(CURLOPT_NOBODY, CURLOPTTYPE_LONG, 44),
1273 
1274   /* no output on http error codes >= 400 */
1275   CURLOPT(CURLOPT_FAILONERROR, CURLOPTTYPE_LONG, 45),
1276 
1277   /* this is an upload */
1278   CURLOPT(CURLOPT_UPLOAD, CURLOPTTYPE_LONG, 46),
1279 
1280   /* HTTP POST method */
1281   CURLOPT(CURLOPT_POST, CURLOPTTYPE_LONG, 47),
1282 
1283   /* bare names when listing directories */
1284   CURLOPT(CURLOPT_DIRLISTONLY, CURLOPTTYPE_LONG, 48),
1285 
1286   /* Append instead of overwrite on upload! */
1287   CURLOPT(CURLOPT_APPEND, CURLOPTTYPE_LONG, 50),
1288 
1289   /* Specify whether to read the user+password from the .netrc or the URL.
1290    * This must be one of the CURL_NETRC_* enums below. */
1291   CURLOPT(CURLOPT_NETRC, CURLOPTTYPE_VALUES, 51),
1292 
1293   /* use Location: Luke! */
1294   CURLOPT(CURLOPT_FOLLOWLOCATION, CURLOPTTYPE_LONG, 52),
1295 
1296    /* transfer data in text/ASCII format */
1297   CURLOPT(CURLOPT_TRANSFERTEXT, CURLOPTTYPE_LONG, 53),
1298 
1299   /* HTTP PUT */
1300   CURLOPTDEPRECATED(CURLOPT_PUT, CURLOPTTYPE_LONG, 54,
1301                     7.12.1, "Use CURLOPT_UPLOAD"),
1302 
1303   /* 55 = OBSOLETE */
1304 
1305   /* DEPRECATED
1306    * Function that will be called instead of the internal progress display
1307    * function. This function should be defined as the curl_progress_callback
1308    * prototype defines. */
1309   CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
1310                     7.32.0, "Use CURLOPT_XFERINFOFUNCTION"),
1311 
1312   /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
1313      callbacks */
1314   CURLOPT(CURLOPT_XFERINFODATA, CURLOPTTYPE_CBPOINT, 57),
1315 #define CURLOPT_PROGRESSDATA CURLOPT_XFERINFODATA
1316 
1317   /* We want the referrer field set automatically when following locations */
1318   CURLOPT(CURLOPT_AUTOREFERER, CURLOPTTYPE_LONG, 58),
1319 
1320   /* Port of the proxy, can be set in the proxy string as well with:
1321      "[host]:[port]" */
1322   CURLOPT(CURLOPT_PROXYPORT, CURLOPTTYPE_LONG, 59),
1323 
1324   /* size of the POST input data, if strlen() is not good to use */
1325   CURLOPT(CURLOPT_POSTFIELDSIZE, CURLOPTTYPE_LONG, 60),
1326 
1327   /* tunnel non-http operations through an HTTP proxy */
1328   CURLOPT(CURLOPT_HTTPPROXYTUNNEL, CURLOPTTYPE_LONG, 61),
1329 
1330   /* Set the interface string to use as outgoing network interface */
1331   CURLOPT(CURLOPT_INTERFACE, CURLOPTTYPE_STRINGPOINT, 62),
1332 
1333   /* Set the krb4/5 security level, this also enables krb4/5 awareness. This
1334    * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
1335    * is set but does not match one of these, 'private' will be used.  */
1336   CURLOPT(CURLOPT_KRBLEVEL, CURLOPTTYPE_STRINGPOINT, 63),
1337 
1338   /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
1339   CURLOPT(CURLOPT_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 64),
1340 
1341   /* The CApath or CAfile used to validate the peer certificate
1342      this option is used only if SSL_VERIFYPEER is true */
1343   CURLOPT(CURLOPT_CAINFO, CURLOPTTYPE_STRINGPOINT, 65),
1344 
1345   /* 66 = OBSOLETE */
1346   /* 67 = OBSOLETE */
1347 
1348   /* Maximum number of http redirects to follow */
1349   CURLOPT(CURLOPT_MAXREDIRS, CURLOPTTYPE_LONG, 68),
1350 
1351   /* Pass a long set to 1 to get the date of the requested document (if
1352      possible)! Pass a zero to shut it off. */
1353   CURLOPT(CURLOPT_FILETIME, CURLOPTTYPE_LONG, 69),
1354 
1355   /* This points to a linked list of telnet options */
1356   CURLOPT(CURLOPT_TELNETOPTIONS, CURLOPTTYPE_SLISTPOINT, 70),
1357 
1358   /* Max amount of cached alive connections */
1359   CURLOPT(CURLOPT_MAXCONNECTS, CURLOPTTYPE_LONG, 71),
1360 
1361   /* 72 = OBSOLETE */
1362   /* 73 = OBSOLETE */
1363 
1364   /* Set to explicitly use a new connection for the upcoming transfer.
1365      Do not use this unless you are absolutely sure of this, as it makes the
1366      operation slower and is less friendly for the network. */
1367   CURLOPT(CURLOPT_FRESH_CONNECT, CURLOPTTYPE_LONG, 74),
1368 
1369   /* Set to explicitly forbid the upcoming transfer's connection to be reused
1370      when done. Do not use this unless you are absolutely sure of this, as it
1371      makes the operation slower and is less friendly for the network. */
1372   CURLOPT(CURLOPT_FORBID_REUSE, CURLOPTTYPE_LONG, 75),
1373 
1374   /* Set to a filename that contains random data for libcurl to use to
1375      seed the random engine when doing SSL connects. */
1376   CURLOPTDEPRECATED(CURLOPT_RANDOM_FILE, CURLOPTTYPE_STRINGPOINT, 76,
1377                     7.84.0, "Serves no purpose anymore"),
1378 
1379   /* Set to the Entropy Gathering Daemon socket pathname */
1380   CURLOPTDEPRECATED(CURLOPT_EGDSOCKET, CURLOPTTYPE_STRINGPOINT, 77,
1381                     7.84.0, "Serves no purpose anymore"),
1382 
1383   /* Time-out connect operations after this amount of seconds, if connects are
1384      OK within this time, then fine... This only aborts the connect phase. */
1385   CURLOPT(CURLOPT_CONNECTTIMEOUT, CURLOPTTYPE_LONG, 78),
1386 
1387   /* Function that will be called to store headers (instead of fwrite). The
1388    * parameters will use fwrite() syntax, make sure to follow them. */
1389   CURLOPT(CURLOPT_HEADERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 79),
1390 
1391   /* Set this to force the HTTP request to get back to GET. Only really usable
1392      if POST, PUT or a custom request have been used first.
1393    */
1394   CURLOPT(CURLOPT_HTTPGET, CURLOPTTYPE_LONG, 80),
1395 
1396   /* Set if we should verify the Common name from the peer certificate in ssl
1397    * handshake, set 1 to check existence, 2 to ensure that it matches the
1398    * provided hostname. */
1399   CURLOPT(CURLOPT_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 81),
1400 
1401   /* Specify which filename to write all known cookies in after completed
1402      operation. Set filename to "-" (dash) to make it go to stdout. */
1403   CURLOPT(CURLOPT_COOKIEJAR, CURLOPTTYPE_STRINGPOINT, 82),
1404 
1405   /* Specify which TLS 1.2 (1.1, 1.0) ciphers to use */
1406   CURLOPT(CURLOPT_SSL_CIPHER_LIST, CURLOPTTYPE_STRINGPOINT, 83),
1407 
1408   /* Specify which HTTP version to use! This must be set to one of the
1409      CURL_HTTP_VERSION* enums set below. */
1410   CURLOPT(CURLOPT_HTTP_VERSION, CURLOPTTYPE_VALUES, 84),
1411 
1412   /* Specifically switch on or off the FTP engine's use of the EPSV command. By
1413      default, that one will always be attempted before the more traditional
1414      PASV command. */
1415   CURLOPT(CURLOPT_FTP_USE_EPSV, CURLOPTTYPE_LONG, 85),
1416 
1417   /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
1418   CURLOPT(CURLOPT_SSLCERTTYPE, CURLOPTTYPE_STRINGPOINT, 86),
1419 
1420   /* name of the file keeping your private SSL-key */
1421   CURLOPT(CURLOPT_SSLKEY, CURLOPTTYPE_STRINGPOINT, 87),
1422 
1423   /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */
1424   CURLOPT(CURLOPT_SSLKEYTYPE, CURLOPTTYPE_STRINGPOINT, 88),
1425 
1426   /* crypto engine for the SSL-sub system */
1427   CURLOPT(CURLOPT_SSLENGINE, CURLOPTTYPE_STRINGPOINT, 89),
1428 
1429   /* set the crypto engine for the SSL-sub system as default
1430      the param has no meaning...
1431    */
1432   CURLOPT(CURLOPT_SSLENGINE_DEFAULT, CURLOPTTYPE_LONG, 90),
1433 
1434   /* Non-zero value means to use the global dns cache */
1435   /* DEPRECATED, do not use! */
1436   CURLOPTDEPRECATED(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91,
1437                     7.11.1, "Use CURLOPT_SHARE"),
1438 
1439   /* DNS cache timeout */
1440   CURLOPT(CURLOPT_DNS_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 92),
1441 
1442   /* send linked-list of pre-transfer QUOTE commands */
1443   CURLOPT(CURLOPT_PREQUOTE, CURLOPTTYPE_SLISTPOINT, 93),
1444 
1445   /* set the debug function */
1446   CURLOPT(CURLOPT_DEBUGFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 94),
1447 
1448   /* set the data for the debug function */
1449   CURLOPT(CURLOPT_DEBUGDATA, CURLOPTTYPE_CBPOINT, 95),
1450 
1451   /* mark this as start of a cookie session */
1452   CURLOPT(CURLOPT_COOKIESESSION, CURLOPTTYPE_LONG, 96),
1453 
1454   /* The CApath directory used to validate the peer certificate
1455      this option is used only if SSL_VERIFYPEER is true */
1456   CURLOPT(CURLOPT_CAPATH, CURLOPTTYPE_STRINGPOINT, 97),
1457 
1458   /* Instruct libcurl to use a smaller receive buffer */
1459   CURLOPT(CURLOPT_BUFFERSIZE, CURLOPTTYPE_LONG, 98),
1460 
1461   /* Instruct libcurl to not use any signal/alarm handlers, even when using
1462      timeouts. This option is useful for multi-threaded applications.
1463      See libcurl-the-guide for more background information. */
1464   CURLOPT(CURLOPT_NOSIGNAL, CURLOPTTYPE_LONG, 99),
1465 
1466   /* Provide a CURLShare for mutexing non-ts data */
1467   CURLOPT(CURLOPT_SHARE, CURLOPTTYPE_OBJECTPOINT, 100),
1468 
1469   /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
1470      CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and
1471      CURLPROXY_SOCKS5. */
1472   CURLOPT(CURLOPT_PROXYTYPE, CURLOPTTYPE_VALUES, 101),
1473 
1474   /* Set the Accept-Encoding string. Use this to tell a server you would like
1475      the response to be compressed. Before 7.21.6, this was known as
1476      CURLOPT_ENCODING */
1477   CURLOPT(CURLOPT_ACCEPT_ENCODING, CURLOPTTYPE_STRINGPOINT, 102),
1478 
1479   /* Set pointer to private data */
1480   CURLOPT(CURLOPT_PRIVATE, CURLOPTTYPE_OBJECTPOINT, 103),
1481 
1482   /* Set aliases for HTTP 200 in the HTTP Response header */
1483   CURLOPT(CURLOPT_HTTP200ALIASES, CURLOPTTYPE_SLISTPOINT, 104),
1484 
1485   /* Continue to send authentication (user+password) when following locations,
1486      even when hostname changed. This can potentially send off the name
1487      and password to whatever host the server decides. */
1488   CURLOPT(CURLOPT_UNRESTRICTED_AUTH, CURLOPTTYPE_LONG, 105),
1489 
1490   /* Specifically switch on or off the FTP engine's use of the EPRT command (
1491      it also disables the LPRT attempt). By default, those ones will always be
1492      attempted before the good old traditional PORT command. */
1493   CURLOPT(CURLOPT_FTP_USE_EPRT, CURLOPTTYPE_LONG, 106),
1494 
1495   /* Set this to a bitmask value to enable the particular authentications
1496      methods you like. Use this in combination with CURLOPT_USERPWD.
1497      Note that setting multiple bits may cause extra network round-trips. */
1498   CURLOPT(CURLOPT_HTTPAUTH, CURLOPTTYPE_VALUES, 107),
1499 
1500   /* Set the ssl context callback function, currently only for OpenSSL or
1501      wolfSSL ssl_ctx, or mbedTLS mbedtls_ssl_config in the second argument.
1502      The function must match the curl_ssl_ctx_callback prototype. */
1503   CURLOPT(CURLOPT_SSL_CTX_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 108),
1504 
1505   /* Set the userdata for the ssl context callback function's third
1506      argument */
1507   CURLOPT(CURLOPT_SSL_CTX_DATA, CURLOPTTYPE_CBPOINT, 109),
1508 
1509   /* FTP Option that causes missing dirs to be created on the remote server.
1510      In 7.19.4 we introduced the convenience enums for this option using the
1511      CURLFTP_CREATE_DIR prefix.
1512   */
1513   CURLOPT(CURLOPT_FTP_CREATE_MISSING_DIRS, CURLOPTTYPE_LONG, 110),
1514 
1515   /* Set this to a bitmask value to enable the particular authentications
1516      methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
1517      Note that setting multiple bits may cause extra network round-trips. */
1518   CURLOPT(CURLOPT_PROXYAUTH, CURLOPTTYPE_VALUES, 111),
1519 
1520   /* Option that changes the timeout, in seconds, associated with getting a
1521      response. This is different from transfer timeout time and essentially
1522      places a demand on the server to acknowledge commands in a timely
1523      manner. For FTP, SMTP, IMAP and POP3. */
1524   CURLOPT(CURLOPT_SERVER_RESPONSE_TIMEOUT, CURLOPTTYPE_LONG, 112),
1525 
1526   /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
1527      tell libcurl to use those IP versions only. This only has effect on
1528      systems with support for more than one, i.e IPv4 _and_ IPv6. */
1529   CURLOPT(CURLOPT_IPRESOLVE, CURLOPTTYPE_VALUES, 113),
1530 
1531   /* Set this option to limit the size of a file that will be downloaded from
1532      an HTTP or FTP server.
1533 
1534      Note there is also _LARGE version which adds large file support for
1535      platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */
1536   CURLOPT(CURLOPT_MAXFILESIZE, CURLOPTTYPE_LONG, 114),
1537 
1538   /* See the comment for INFILESIZE above, but in short, specifies
1539    * the size of the file being uploaded.  -1 means unknown.
1540    */
1541   CURLOPT(CURLOPT_INFILESIZE_LARGE, CURLOPTTYPE_OFF_T, 115),
1542 
1543   /* Sets the continuation offset. There is also a CURLOPTTYPE_LONG version
1544    * of this; look above for RESUME_FROM.
1545    */
1546   CURLOPT(CURLOPT_RESUME_FROM_LARGE, CURLOPTTYPE_OFF_T, 116),
1547 
1548   /* Sets the maximum size of data that will be downloaded from
1549    * an HTTP or FTP server. See MAXFILESIZE above for the LONG version.
1550    */
1551   CURLOPT(CURLOPT_MAXFILESIZE_LARGE, CURLOPTTYPE_OFF_T, 117),
1552 
1553   /* Set this option to the filename of your .netrc file you want libcurl
1554      to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
1555      a poor attempt to find the user's home directory and check for a .netrc
1556      file in there. */
1557   CURLOPT(CURLOPT_NETRC_FILE, CURLOPTTYPE_STRINGPOINT, 118),
1558 
1559   /* Enable SSL/TLS for FTP, pick one of:
1560      CURLUSESSL_TRY     - try using SSL, proceed anyway otherwise
1561      CURLUSESSL_CONTROL - SSL for the control connection or fail
1562      CURLUSESSL_ALL     - SSL for all communication or fail
1563   */
1564   CURLOPT(CURLOPT_USE_SSL, CURLOPTTYPE_VALUES, 119),
1565 
1566   /* The _LARGE version of the standard POSTFIELDSIZE option */
1567   CURLOPT(CURLOPT_POSTFIELDSIZE_LARGE, CURLOPTTYPE_OFF_T, 120),
1568 
1569   /* Enable/disable the TCP Nagle algorithm */
1570   CURLOPT(CURLOPT_TCP_NODELAY, CURLOPTTYPE_LONG, 121),
1571 
1572   /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
1573   /* 123 OBSOLETE. Gone in 7.16.0 */
1574   /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
1575   /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
1576   /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
1577   /* 127 OBSOLETE. Gone in 7.16.0 */
1578   /* 128 OBSOLETE. Gone in 7.16.0 */
1579 
1580   /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option
1581      can be used to change libcurl's default action which is to first try
1582      "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK
1583      response has been received.
1584 
1585      Available parameters are:
1586      CURLFTPAUTH_DEFAULT - let libcurl decide
1587      CURLFTPAUTH_SSL     - try "AUTH SSL" first, then TLS
1588      CURLFTPAUTH_TLS     - try "AUTH TLS" first, then SSL
1589   */
1590   CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_VALUES, 129),
1591 
1592   CURLOPTDEPRECATED(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130,
1593                     7.18.0, "Use CURLOPT_SEEKFUNCTION"),
1594   CURLOPTDEPRECATED(CURLOPT_IOCTLDATA, CURLOPTTYPE_CBPOINT, 131,
1595                     7.18.0, "Use CURLOPT_SEEKDATA"),
1596 
1597   /* 132 OBSOLETE. Gone in 7.16.0 */
1598   /* 133 OBSOLETE. Gone in 7.16.0 */
1599 
1600   /* null-terminated string for pass on to the FTP server when asked for
1601      "account" info */
1602   CURLOPT(CURLOPT_FTP_ACCOUNT, CURLOPTTYPE_STRINGPOINT, 134),
1603 
1604   /* feed cookie into cookie engine */
1605   CURLOPT(CURLOPT_COOKIELIST, CURLOPTTYPE_STRINGPOINT, 135),
1606 
1607   /* ignore Content-Length */
1608   CURLOPT(CURLOPT_IGNORE_CONTENT_LENGTH, CURLOPTTYPE_LONG, 136),
1609 
1610   /* Set to non-zero to skip the IP address received in a 227 PASV FTP server
1611      response. Typically used for FTP-SSL purposes but is not restricted to
1612      that. libcurl will then instead use the same IP address it used for the
1613      control connection. */
1614   CURLOPT(CURLOPT_FTP_SKIP_PASV_IP, CURLOPTTYPE_LONG, 137),
1615 
1616   /* Select "file method" to use when doing FTP, see the curl_ftpmethod
1617      above. */
1618   CURLOPT(CURLOPT_FTP_FILEMETHOD, CURLOPTTYPE_VALUES, 138),
1619 
1620   /* Local port number to bind the socket to */
1621   CURLOPT(CURLOPT_LOCALPORT, CURLOPTTYPE_LONG, 139),
1622 
1623   /* Number of ports to try, including the first one set with LOCALPORT.
1624      Thus, setting it to 1 will make no additional attempts but the first.
1625   */
1626   CURLOPT(CURLOPT_LOCALPORTRANGE, CURLOPTTYPE_LONG, 140),
1627 
1628   /* no transfer, set up connection and let application use the socket by
1629      extracting it with CURLINFO_LASTSOCKET */
1630   CURLOPT(CURLOPT_CONNECT_ONLY, CURLOPTTYPE_LONG, 141),
1631 
1632   /* Function that will be called to convert from the
1633      network encoding (instead of using the iconv calls in libcurl) */
1634   CURLOPTDEPRECATED(CURLOPT_CONV_FROM_NETWORK_FUNCTION,
1635                     CURLOPTTYPE_FUNCTIONPOINT, 142,
1636                     7.82.0, "Serves no purpose anymore"),
1637 
1638   /* Function that will be called to convert to the
1639      network encoding (instead of using the iconv calls in libcurl) */
1640   CURLOPTDEPRECATED(CURLOPT_CONV_TO_NETWORK_FUNCTION,
1641                     CURLOPTTYPE_FUNCTIONPOINT, 143,
1642                     7.82.0, "Serves no purpose anymore"),
1643 
1644   /* Function that will be called to convert from UTF8
1645      (instead of using the iconv calls in libcurl)
1646      Note that this is used only for SSL certificate processing */
1647   CURLOPTDEPRECATED(CURLOPT_CONV_FROM_UTF8_FUNCTION,
1648                     CURLOPTTYPE_FUNCTIONPOINT, 144,
1649                     7.82.0, "Serves no purpose anymore"),
1650 
1651   /* if the connection proceeds too quickly then need to slow it down */
1652   /* limit-rate: maximum number of bytes per second to send or receive */
1653   CURLOPT(CURLOPT_MAX_SEND_SPEED_LARGE, CURLOPTTYPE_OFF_T, 145),
1654   CURLOPT(CURLOPT_MAX_RECV_SPEED_LARGE, CURLOPTTYPE_OFF_T, 146),
1655 
1656   /* Pointer to command string to send if USER/PASS fails. */
1657   CURLOPT(CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPTTYPE_STRINGPOINT, 147),
1658 
1659   /* callback function for setting socket options */
1660   CURLOPT(CURLOPT_SOCKOPTFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 148),
1661   CURLOPT(CURLOPT_SOCKOPTDATA, CURLOPTTYPE_CBPOINT, 149),
1662 
1663   /* set to 0 to disable session ID reuse for this transfer, default is
1664      enabled (== 1) */
1665   CURLOPT(CURLOPT_SSL_SESSIONID_CACHE, CURLOPTTYPE_LONG, 150),
1666 
1667   /* allowed SSH authentication methods */
1668   CURLOPT(CURLOPT_SSH_AUTH_TYPES, CURLOPTTYPE_VALUES, 151),
1669 
1670   /* Used by scp/sftp to do public/private key authentication */
1671   CURLOPT(CURLOPT_SSH_PUBLIC_KEYFILE, CURLOPTTYPE_STRINGPOINT, 152),
1672   CURLOPT(CURLOPT_SSH_PRIVATE_KEYFILE, CURLOPTTYPE_STRINGPOINT, 153),
1673 
1674   /* Send CCC (Clear Command Channel) after authentication */
1675   CURLOPT(CURLOPT_FTP_SSL_CCC, CURLOPTTYPE_LONG, 154),
1676 
1677   /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */
1678   CURLOPT(CURLOPT_TIMEOUT_MS, CURLOPTTYPE_LONG, 155),
1679   CURLOPT(CURLOPT_CONNECTTIMEOUT_MS, CURLOPTTYPE_LONG, 156),
1680 
1681   /* set to zero to disable the libcurl's decoding and thus pass the raw body
1682      data to the application even when it is encoded/compressed */
1683   CURLOPT(CURLOPT_HTTP_TRANSFER_DECODING, CURLOPTTYPE_LONG, 157),
1684   CURLOPT(CURLOPT_HTTP_CONTENT_DECODING, CURLOPTTYPE_LONG, 158),
1685 
1686   /* Permission used when creating new files and directories on the remote
1687      server for protocols that support it, SFTP/SCP/FILE */
1688   CURLOPT(CURLOPT_NEW_FILE_PERMS, CURLOPTTYPE_LONG, 159),
1689   CURLOPT(CURLOPT_NEW_DIRECTORY_PERMS, CURLOPTTYPE_LONG, 160),
1690 
1691   /* Set the behavior of POST when redirecting. Values must be set to one
1692      of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
1693   CURLOPT(CURLOPT_POSTREDIR, CURLOPTTYPE_VALUES, 161),
1694 
1695   /* used by scp/sftp to verify the host's public key */
1696   CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, CURLOPTTYPE_STRINGPOINT, 162),
1697 
1698   /* Callback function for opening socket (instead of socket(2)). Optionally,
1699      callback is able change the address or refuse to connect returning
1700      CURL_SOCKET_BAD. The callback should have type
1701      curl_opensocket_callback */
1702   CURLOPT(CURLOPT_OPENSOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 163),
1703   CURLOPT(CURLOPT_OPENSOCKETDATA, CURLOPTTYPE_CBPOINT, 164),
1704 
1705   /* POST volatile input fields. */
1706   CURLOPT(CURLOPT_COPYPOSTFIELDS, CURLOPTTYPE_OBJECTPOINT, 165),
1707 
1708   /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
1709   CURLOPT(CURLOPT_PROXY_TRANSFER_MODE, CURLOPTTYPE_LONG, 166),
1710 
1711   /* Callback function for seeking in the input stream */
1712   CURLOPT(CURLOPT_SEEKFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 167),
1713   CURLOPT(CURLOPT_SEEKDATA, CURLOPTTYPE_CBPOINT, 168),
1714 
1715   /* CRL file */
1716   CURLOPT(CURLOPT_CRLFILE, CURLOPTTYPE_STRINGPOINT, 169),
1717 
1718   /* Issuer certificate */
1719   CURLOPT(CURLOPT_ISSUERCERT, CURLOPTTYPE_STRINGPOINT, 170),
1720 
1721   /* (IPv6) Address scope */
1722   CURLOPT(CURLOPT_ADDRESS_SCOPE, CURLOPTTYPE_LONG, 171),
1723 
1724   /* Collect certificate chain info and allow it to get retrievable with
1725      CURLINFO_CERTINFO after the transfer is complete. */
1726   CURLOPT(CURLOPT_CERTINFO, CURLOPTTYPE_LONG, 172),
1727 
1728   /* "name" and "pwd" to use when fetching. */
1729   CURLOPT(CURLOPT_USERNAME, CURLOPTTYPE_STRINGPOINT, 173),
1730   CURLOPT(CURLOPT_PASSWORD, CURLOPTTYPE_STRINGPOINT, 174),
1731 
1732     /* "name" and "pwd" to use with Proxy when fetching. */
1733   CURLOPT(CURLOPT_PROXYUSERNAME, CURLOPTTYPE_STRINGPOINT, 175),
1734   CURLOPT(CURLOPT_PROXYPASSWORD, CURLOPTTYPE_STRINGPOINT, 176),
1735 
1736   /* Comma separated list of hostnames defining no-proxy zones. These should
1737      match both hostnames directly, and hostnames within a domain. For
1738      example, local.com will match local.com and www.local.com, but NOT
1739      notlocal.com or www.notlocal.com. For compatibility with other
1740      implementations of this, .local.com will be considered to be the same as
1741      local.com. A single * is the only valid wildcard, and effectively
1742      disables the use of proxy. */
1743   CURLOPT(CURLOPT_NOPROXY, CURLOPTTYPE_STRINGPOINT, 177),
1744 
1745   /* block size for TFTP transfers */
1746   CURLOPT(CURLOPT_TFTP_BLKSIZE, CURLOPTTYPE_LONG, 178),
1747 
1748   /* Socks Service */
1749   /* DEPRECATED, do not use! */
1750   CURLOPTDEPRECATED(CURLOPT_SOCKS5_GSSAPI_SERVICE,
1751                     CURLOPTTYPE_STRINGPOINT, 179,
1752                     7.49.0, "Use CURLOPT_PROXY_SERVICE_NAME"),
1753 
1754   /* Socks Service */
1755   CURLOPT(CURLOPT_SOCKS5_GSSAPI_NEC, CURLOPTTYPE_LONG, 180),
1756 
1757   /* set the bitmask for the protocols that are allowed to be used for the
1758      transfer, which thus helps the app which takes URLs from users or other
1759      external inputs and want to restrict what protocol(s) to deal
1760      with. Defaults to CURLPROTO_ALL. */
1761   CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
1762                     7.85.0, "Use CURLOPT_PROTOCOLS_STR"),
1763 
1764   /* set the bitmask for the protocols that libcurl is allowed to follow to,
1765      as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
1766      to be set in both bitmasks to be allowed to get redirected to. */
1767   CURLOPTDEPRECATED(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182,
1768                     7.85.0, "Use CURLOPT_REDIR_PROTOCOLS_STR"),
1769 
1770   /* set the SSH knownhost filename to use */
1771   CURLOPT(CURLOPT_SSH_KNOWNHOSTS, CURLOPTTYPE_STRINGPOINT, 183),
1772 
1773   /* set the SSH host key callback, must point to a curl_sshkeycallback
1774      function */
1775   CURLOPT(CURLOPT_SSH_KEYFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 184),
1776 
1777   /* set the SSH host key callback custom pointer */
1778   CURLOPT(CURLOPT_SSH_KEYDATA, CURLOPTTYPE_CBPOINT, 185),
1779 
1780   /* set the SMTP mail originator */
1781   CURLOPT(CURLOPT_MAIL_FROM, CURLOPTTYPE_STRINGPOINT, 186),
1782 
1783   /* set the list of SMTP mail receiver(s) */
1784   CURLOPT(CURLOPT_MAIL_RCPT, CURLOPTTYPE_SLISTPOINT, 187),
1785 
1786   /* FTP: send PRET before PASV */
1787   CURLOPT(CURLOPT_FTP_USE_PRET, CURLOPTTYPE_LONG, 188),
1788 
1789   /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */
1790   CURLOPT(CURLOPT_RTSP_REQUEST, CURLOPTTYPE_VALUES, 189),
1791 
1792   /* The RTSP session identifier */
1793   CURLOPT(CURLOPT_RTSP_SESSION_ID, CURLOPTTYPE_STRINGPOINT, 190),
1794 
1795   /* The RTSP stream URI */
1796   CURLOPT(CURLOPT_RTSP_STREAM_URI, CURLOPTTYPE_STRINGPOINT, 191),
1797 
1798   /* The Transport: header to use in RTSP requests */
1799   CURLOPT(CURLOPT_RTSP_TRANSPORT, CURLOPTTYPE_STRINGPOINT, 192),
1800 
1801   /* Manually initialize the client RTSP CSeq for this handle */
1802   CURLOPT(CURLOPT_RTSP_CLIENT_CSEQ, CURLOPTTYPE_LONG, 193),
1803 
1804   /* Manually initialize the server RTSP CSeq for this handle */
1805   CURLOPT(CURLOPT_RTSP_SERVER_CSEQ, CURLOPTTYPE_LONG, 194),
1806 
1807   /* The stream to pass to INTERLEAVEFUNCTION. */
1808   CURLOPT(CURLOPT_INTERLEAVEDATA, CURLOPTTYPE_CBPOINT, 195),
1809 
1810   /* Let the application define a custom write method for RTP data */
1811   CURLOPT(CURLOPT_INTERLEAVEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 196),
1812 
1813   /* Turn on wildcard matching */
1814   CURLOPT(CURLOPT_WILDCARDMATCH, CURLOPTTYPE_LONG, 197),
1815 
1816   /* Directory matching callback called before downloading of an
1817      individual file (chunk) started */
1818   CURLOPT(CURLOPT_CHUNK_BGN_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 198),
1819 
1820   /* Directory matching callback called after the file (chunk)
1821      was downloaded, or skipped */
1822   CURLOPT(CURLOPT_CHUNK_END_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 199),
1823 
1824   /* Change match (fnmatch-like) callback for wildcard matching */
1825   CURLOPT(CURLOPT_FNMATCH_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 200),
1826 
1827   /* Let the application define custom chunk data pointer */
1828   CURLOPT(CURLOPT_CHUNK_DATA, CURLOPTTYPE_CBPOINT, 201),
1829 
1830   /* FNMATCH_FUNCTION user pointer */
1831   CURLOPT(CURLOPT_FNMATCH_DATA, CURLOPTTYPE_CBPOINT, 202),
1832 
1833   /* send linked-list of name:port:address sets */
1834   CURLOPT(CURLOPT_RESOLVE, CURLOPTTYPE_SLISTPOINT, 203),
1835 
1836   /* Set a username for authenticated TLS */
1837   CURLOPT(CURLOPT_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 204),
1838 
1839   /* Set a password for authenticated TLS */
1840   CURLOPT(CURLOPT_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 205),
1841 
1842   /* Set authentication type for authenticated TLS */
1843   CURLOPT(CURLOPT_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 206),
1844 
1845   /* Set to 1 to enable the "TE:" header in HTTP requests to ask for
1846      compressed transfer-encoded responses. Set to 0 to disable the use of TE:
1847      in outgoing requests. The current default is 0, but it might change in a
1848      future libcurl release.
1849 
1850      libcurl will ask for the compressed methods it knows of, and if that
1851      is not any, it will not ask for transfer-encoding at all even if this
1852      option is set to 1.
1853 
1854   */
1855   CURLOPT(CURLOPT_TRANSFER_ENCODING, CURLOPTTYPE_LONG, 207),
1856 
1857   /* Callback function for closing socket (instead of close(2)). The callback
1858      should have type curl_closesocket_callback */
1859   CURLOPT(CURLOPT_CLOSESOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 208),
1860   CURLOPT(CURLOPT_CLOSESOCKETDATA, CURLOPTTYPE_CBPOINT, 209),
1861 
1862   /* allow GSSAPI credential delegation */
1863   CURLOPT(CURLOPT_GSSAPI_DELEGATION, CURLOPTTYPE_VALUES, 210),
1864 
1865   /* Set the name servers to use for DNS resolution.
1866    * Only supported by the c-ares DNS backend */
1867   CURLOPT(CURLOPT_DNS_SERVERS, CURLOPTTYPE_STRINGPOINT, 211),
1868 
1869   /* Time-out accept operations (currently for FTP only) after this amount
1870      of milliseconds. */
1871   CURLOPT(CURLOPT_ACCEPTTIMEOUT_MS, CURLOPTTYPE_LONG, 212),
1872 
1873   /* Set TCP keepalive */
1874   CURLOPT(CURLOPT_TCP_KEEPALIVE, CURLOPTTYPE_LONG, 213),
1875 
1876   /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */
1877   CURLOPT(CURLOPT_TCP_KEEPIDLE, CURLOPTTYPE_LONG, 214),
1878   CURLOPT(CURLOPT_TCP_KEEPINTVL, CURLOPTTYPE_LONG, 215),
1879 
1880   /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
1881   CURLOPT(CURLOPT_SSL_OPTIONS, CURLOPTTYPE_VALUES, 216),
1882 
1883   /* Set the SMTP auth originator */
1884   CURLOPT(CURLOPT_MAIL_AUTH, CURLOPTTYPE_STRINGPOINT, 217),
1885 
1886   /* Enable/disable SASL initial response */
1887   CURLOPT(CURLOPT_SASL_IR, CURLOPTTYPE_LONG, 218),
1888 
1889   /* Function that will be called instead of the internal progress display
1890    * function. This function should be defined as the curl_xferinfo_callback
1891    * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */
1892   CURLOPT(CURLOPT_XFERINFOFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 219),
1893 
1894   /* The XOAUTH2 bearer token */
1895   CURLOPT(CURLOPT_XOAUTH2_BEARER, CURLOPTTYPE_STRINGPOINT, 220),
1896 
1897   /* Set the interface string to use as outgoing network
1898    * interface for DNS requests.
1899    * Only supported by the c-ares DNS backend */
1900   CURLOPT(CURLOPT_DNS_INTERFACE, CURLOPTTYPE_STRINGPOINT, 221),
1901 
1902   /* Set the local IPv4 address to use for outgoing DNS requests.
1903    * Only supported by the c-ares DNS backend */
1904   CURLOPT(CURLOPT_DNS_LOCAL_IP4, CURLOPTTYPE_STRINGPOINT, 222),
1905 
1906   /* Set the local IPv6 address to use for outgoing DNS requests.
1907    * Only supported by the c-ares DNS backend */
1908   CURLOPT(CURLOPT_DNS_LOCAL_IP6, CURLOPTTYPE_STRINGPOINT, 223),
1909 
1910   /* Set authentication options directly */
1911   CURLOPT(CURLOPT_LOGIN_OPTIONS, CURLOPTTYPE_STRINGPOINT, 224),
1912 
1913   /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
1914   CURLOPTDEPRECATED(CURLOPT_SSL_ENABLE_NPN, CURLOPTTYPE_LONG, 225,
1915                     7.86.0, "Has no function"),
1916 
1917   /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
1918   CURLOPT(CURLOPT_SSL_ENABLE_ALPN, CURLOPTTYPE_LONG, 226),
1919 
1920   /* Time to wait for a response to an HTTP request containing an
1921    * Expect: 100-continue header before sending the data anyway. */
1922   CURLOPT(CURLOPT_EXPECT_100_TIMEOUT_MS, CURLOPTTYPE_LONG, 227),
1923 
1924   /* This points to a linked list of headers used for proxy requests only,
1925      struct curl_slist kind */
1926   CURLOPT(CURLOPT_PROXYHEADER, CURLOPTTYPE_SLISTPOINT, 228),
1927 
1928   /* Pass in a bitmask of "header options" */
1929   CURLOPT(CURLOPT_HEADEROPT, CURLOPTTYPE_VALUES, 229),
1930 
1931   /* The public key in DER form used to validate the peer public key
1932      this option is used only if SSL_VERIFYPEER is true */
1933   CURLOPT(CURLOPT_PINNEDPUBLICKEY, CURLOPTTYPE_STRINGPOINT, 230),
1934 
1935   /* Path to Unix domain socket */
1936   CURLOPT(CURLOPT_UNIX_SOCKET_PATH, CURLOPTTYPE_STRINGPOINT, 231),
1937 
1938   /* Set if we should verify the certificate status. */
1939   CURLOPT(CURLOPT_SSL_VERIFYSTATUS, CURLOPTTYPE_LONG, 232),
1940 
1941   /* Set if we should enable TLS false start. */
1942   CURLOPT(CURLOPT_SSL_FALSESTART, CURLOPTTYPE_LONG, 233),
1943 
1944   /* Do not squash dot-dot sequences */
1945   CURLOPT(CURLOPT_PATH_AS_IS, CURLOPTTYPE_LONG, 234),
1946 
1947   /* Proxy Service Name */
1948   CURLOPT(CURLOPT_PROXY_SERVICE_NAME, CURLOPTTYPE_STRINGPOINT, 235),
1949 
1950   /* Service Name */
1951   CURLOPT(CURLOPT_SERVICE_NAME, CURLOPTTYPE_STRINGPOINT, 236),
1952 
1953   /* Wait/do not wait for pipe/mutex to clarify */
1954   CURLOPT(CURLOPT_PIPEWAIT, CURLOPTTYPE_LONG, 237),
1955 
1956   /* Set the protocol used when curl is given a URL without a protocol */
1957   CURLOPT(CURLOPT_DEFAULT_PROTOCOL, CURLOPTTYPE_STRINGPOINT, 238),
1958 
1959   /* Set stream weight, 1 - 256 (default is 16) */
1960   CURLOPT(CURLOPT_STREAM_WEIGHT, CURLOPTTYPE_LONG, 239),
1961 
1962   /* Set stream dependency on another CURL handle */
1963   CURLOPT(CURLOPT_STREAM_DEPENDS, CURLOPTTYPE_OBJECTPOINT, 240),
1964 
1965   /* Set E-xclusive stream dependency on another CURL handle */
1966   CURLOPT(CURLOPT_STREAM_DEPENDS_E, CURLOPTTYPE_OBJECTPOINT, 241),
1967 
1968   /* Do not send any tftp option requests to the server */
1969   CURLOPT(CURLOPT_TFTP_NO_OPTIONS, CURLOPTTYPE_LONG, 242),
1970 
1971   /* Linked-list of host:port:connect-to-host:connect-to-port,
1972      overrides the URL's host:port (only for the network layer) */
1973   CURLOPT(CURLOPT_CONNECT_TO, CURLOPTTYPE_SLISTPOINT, 243),
1974 
1975   /* Set TCP Fast Open */
1976   CURLOPT(CURLOPT_TCP_FASTOPEN, CURLOPTTYPE_LONG, 244),
1977 
1978   /* Continue to send data if the server responds early with an
1979    * HTTP status code >= 300 */
1980   CURLOPT(CURLOPT_KEEP_SENDING_ON_ERROR, CURLOPTTYPE_LONG, 245),
1981 
1982   /* The CApath or CAfile used to validate the proxy certificate
1983      this option is used only if PROXY_SSL_VERIFYPEER is true */
1984   CURLOPT(CURLOPT_PROXY_CAINFO, CURLOPTTYPE_STRINGPOINT, 246),
1985 
1986   /* The CApath directory used to validate the proxy certificate
1987      this option is used only if PROXY_SSL_VERIFYPEER is true */
1988   CURLOPT(CURLOPT_PROXY_CAPATH, CURLOPTTYPE_STRINGPOINT, 247),
1989 
1990   /* Set if we should verify the proxy in ssl handshake,
1991      set 1 to verify. */
1992   CURLOPT(CURLOPT_PROXY_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 248),
1993 
1994   /* Set if we should verify the Common name from the proxy certificate in ssl
1995    * handshake, set 1 to check existence, 2 to ensure that it matches
1996    * the provided hostname. */
1997   CURLOPT(CURLOPT_PROXY_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 249),
1998 
1999   /* What version to specifically try to use for proxy.
2000      See CURL_SSLVERSION defines below. */
2001   CURLOPT(CURLOPT_PROXY_SSLVERSION, CURLOPTTYPE_VALUES, 250),
2002 
2003   /* Set a username for authenticated TLS for proxy */
2004   CURLOPT(CURLOPT_PROXY_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 251),
2005 
2006   /* Set a password for authenticated TLS for proxy */
2007   CURLOPT(CURLOPT_PROXY_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 252),
2008 
2009   /* Set authentication type for authenticated TLS for proxy */
2010   CURLOPT(CURLOPT_PROXY_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 253),
2011 
2012   /* name of the file keeping your private SSL-certificate for proxy */
2013   CURLOPT(CURLOPT_PROXY_SSLCERT, CURLOPTTYPE_STRINGPOINT, 254),
2014 
2015   /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for
2016      proxy */
2017   CURLOPT(CURLOPT_PROXY_SSLCERTTYPE, CURLOPTTYPE_STRINGPOINT, 255),
2018 
2019   /* name of the file keeping your private SSL-key for proxy */
2020   CURLOPT(CURLOPT_PROXY_SSLKEY, CURLOPTTYPE_STRINGPOINT, 256),
2021 
2022   /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for
2023      proxy */
2024   CURLOPT(CURLOPT_PROXY_SSLKEYTYPE, CURLOPTTYPE_STRINGPOINT, 257),
2025 
2026   /* password for the SSL private key for proxy */
2027   CURLOPT(CURLOPT_PROXY_KEYPASSWD, CURLOPTTYPE_STRINGPOINT, 258),
2028 
2029   /* Specify which TLS 1.2 (1.1, 1.0) ciphers to use for proxy */
2030   CURLOPT(CURLOPT_PROXY_SSL_CIPHER_LIST, CURLOPTTYPE_STRINGPOINT, 259),
2031 
2032   /* CRL file for proxy */
2033   CURLOPT(CURLOPT_PROXY_CRLFILE, CURLOPTTYPE_STRINGPOINT, 260),
2034 
2035   /* Enable/disable specific SSL features with a bitmask for proxy, see
2036      CURLSSLOPT_* */
2037   CURLOPT(CURLOPT_PROXY_SSL_OPTIONS, CURLOPTTYPE_LONG, 261),
2038 
2039   /* Name of pre proxy to use. */
2040   CURLOPT(CURLOPT_PRE_PROXY, CURLOPTTYPE_STRINGPOINT, 262),
2041 
2042   /* The public key in DER form used to validate the proxy public key
2043      this option is used only if PROXY_SSL_VERIFYPEER is true */
2044   CURLOPT(CURLOPT_PROXY_PINNEDPUBLICKEY, CURLOPTTYPE_STRINGPOINT, 263),
2045 
2046   /* Path to an abstract Unix domain socket */
2047   CURLOPT(CURLOPT_ABSTRACT_UNIX_SOCKET, CURLOPTTYPE_STRINGPOINT, 264),
2048 
2049   /* Suppress proxy CONNECT response headers from user callbacks */
2050   CURLOPT(CURLOPT_SUPPRESS_CONNECT_HEADERS, CURLOPTTYPE_LONG, 265),
2051 
2052   /* The request target, instead of extracted from the URL */
2053   CURLOPT(CURLOPT_REQUEST_TARGET, CURLOPTTYPE_STRINGPOINT, 266),
2054 
2055   /* bitmask of allowed auth methods for connections to SOCKS5 proxies */
2056   CURLOPT(CURLOPT_SOCKS5_AUTH, CURLOPTTYPE_LONG, 267),
2057 
2058   /* Enable/disable SSH compression */
2059   CURLOPT(CURLOPT_SSH_COMPRESSION, CURLOPTTYPE_LONG, 268),
2060 
2061   /* Post MIME data. */
2062   CURLOPT(CURLOPT_MIMEPOST, CURLOPTTYPE_OBJECTPOINT, 269),
2063 
2064   /* Time to use with the CURLOPT_TIMECONDITION. Specified in number of
2065      seconds since 1 Jan 1970. */
2066   CURLOPT(CURLOPT_TIMEVALUE_LARGE, CURLOPTTYPE_OFF_T, 270),
2067 
2068   /* Head start in milliseconds to give happy eyeballs. */
2069   CURLOPT(CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, CURLOPTTYPE_LONG, 271),
2070 
2071   /* Function that will be called before a resolver request is made */
2072   CURLOPT(CURLOPT_RESOLVER_START_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 272),
2073 
2074   /* User data to pass to the resolver start callback. */
2075   CURLOPT(CURLOPT_RESOLVER_START_DATA, CURLOPTTYPE_CBPOINT, 273),
2076 
2077   /* send HAProxy PROXY protocol header? */
2078   CURLOPT(CURLOPT_HAPROXYPROTOCOL, CURLOPTTYPE_LONG, 274),
2079 
2080   /* shuffle addresses before use when DNS returns multiple */
2081   CURLOPT(CURLOPT_DNS_SHUFFLE_ADDRESSES, CURLOPTTYPE_LONG, 275),
2082 
2083   /* Specify which TLS 1.3 ciphers suites to use */
2084   CURLOPT(CURLOPT_TLS13_CIPHERS, CURLOPTTYPE_STRINGPOINT, 276),
2085   CURLOPT(CURLOPT_PROXY_TLS13_CIPHERS, CURLOPTTYPE_STRINGPOINT, 277),
2086 
2087   /* Disallow specifying username/login in URL. */
2088   CURLOPT(CURLOPT_DISALLOW_USERNAME_IN_URL, CURLOPTTYPE_LONG, 278),
2089 
2090   /* DNS-over-HTTPS URL */
2091   CURLOPT(CURLOPT_DOH_URL, CURLOPTTYPE_STRINGPOINT, 279),
2092 
2093   /* Preferred buffer size to use for uploads */
2094   CURLOPT(CURLOPT_UPLOAD_BUFFERSIZE, CURLOPTTYPE_LONG, 280),
2095 
2096   /* Time in ms between connection upkeep calls for long-lived connections. */
2097   CURLOPT(CURLOPT_UPKEEP_INTERVAL_MS, CURLOPTTYPE_LONG, 281),
2098 
2099   /* Specify URL using CURL URL API. */
2100   CURLOPT(CURLOPT_CURLU, CURLOPTTYPE_OBJECTPOINT, 282),
2101 
2102   /* add trailing data just after no more data is available */
2103   CURLOPT(CURLOPT_TRAILERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 283),
2104 
2105   /* pointer to be passed to HTTP_TRAILER_FUNCTION */
2106   CURLOPT(CURLOPT_TRAILERDATA, CURLOPTTYPE_CBPOINT, 284),
2107 
2108   /* set this to 1L to allow HTTP/0.9 responses or 0L to disallow */
2109   CURLOPT(CURLOPT_HTTP09_ALLOWED, CURLOPTTYPE_LONG, 285),
2110 
2111   /* alt-svc control bitmask */
2112   CURLOPT(CURLOPT_ALTSVC_CTRL, CURLOPTTYPE_LONG, 286),
2113 
2114   /* alt-svc cache filename to possibly read from/write to */
2115   CURLOPT(CURLOPT_ALTSVC, CURLOPTTYPE_STRINGPOINT, 287),
2116 
2117   /* maximum age (idle time) of a connection to consider it for reuse
2118    * (in seconds) */
2119   CURLOPT(CURLOPT_MAXAGE_CONN, CURLOPTTYPE_LONG, 288),
2120 
2121   /* SASL authorization identity */
2122   CURLOPT(CURLOPT_SASL_AUTHZID, CURLOPTTYPE_STRINGPOINT, 289),
2123 
2124   /* allow RCPT TO command to fail for some recipients */
2125   CURLOPT(CURLOPT_MAIL_RCPT_ALLOWFAILS, CURLOPTTYPE_LONG, 290),
2126 
2127   /* the private SSL-certificate as a "blob" */
2128   CURLOPT(CURLOPT_SSLCERT_BLOB, CURLOPTTYPE_BLOB, 291),
2129   CURLOPT(CURLOPT_SSLKEY_BLOB, CURLOPTTYPE_BLOB, 292),
2130   CURLOPT(CURLOPT_PROXY_SSLCERT_BLOB, CURLOPTTYPE_BLOB, 293),
2131   CURLOPT(CURLOPT_PROXY_SSLKEY_BLOB, CURLOPTTYPE_BLOB, 294),
2132   CURLOPT(CURLOPT_ISSUERCERT_BLOB, CURLOPTTYPE_BLOB, 295),
2133 
2134   /* Issuer certificate for proxy */
2135   CURLOPT(CURLOPT_PROXY_ISSUERCERT, CURLOPTTYPE_STRINGPOINT, 296),
2136   CURLOPT(CURLOPT_PROXY_ISSUERCERT_BLOB, CURLOPTTYPE_BLOB, 297),
2137 
2138   /* the EC curves requested by the TLS client (RFC 8422, 5.1);
2139    * OpenSSL support via 'set_groups'/'set_curves':
2140    * https://docs.openssl.org/master/man3/SSL_CTX_set1_curves/
2141    */
2142   CURLOPT(CURLOPT_SSL_EC_CURVES, CURLOPTTYPE_STRINGPOINT, 298),
2143 
2144   /* HSTS bitmask */
2145   CURLOPT(CURLOPT_HSTS_CTRL, CURLOPTTYPE_LONG, 299),
2146   /* HSTS filename */
2147   CURLOPT(CURLOPT_HSTS, CURLOPTTYPE_STRINGPOINT, 300),
2148 
2149   /* HSTS read callback */
2150   CURLOPT(CURLOPT_HSTSREADFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 301),
2151   CURLOPT(CURLOPT_HSTSREADDATA, CURLOPTTYPE_CBPOINT, 302),
2152 
2153   /* HSTS write callback */
2154   CURLOPT(CURLOPT_HSTSWRITEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 303),
2155   CURLOPT(CURLOPT_HSTSWRITEDATA, CURLOPTTYPE_CBPOINT, 304),
2156 
2157   /* Parameters for V4 signature */
2158   CURLOPT(CURLOPT_AWS_SIGV4, CURLOPTTYPE_STRINGPOINT, 305),
2159 
2160   /* Same as CURLOPT_SSL_VERIFYPEER but for DoH (DNS-over-HTTPS) servers. */
2161   CURLOPT(CURLOPT_DOH_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 306),
2162 
2163   /* Same as CURLOPT_SSL_VERIFYHOST but for DoH (DNS-over-HTTPS) servers. */
2164   CURLOPT(CURLOPT_DOH_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 307),
2165 
2166   /* Same as CURLOPT_SSL_VERIFYSTATUS but for DoH (DNS-over-HTTPS) servers. */
2167   CURLOPT(CURLOPT_DOH_SSL_VERIFYSTATUS, CURLOPTTYPE_LONG, 308),
2168 
2169   /* The CA certificates as "blob" used to validate the peer certificate
2170      this option is used only if SSL_VERIFYPEER is true */
2171   CURLOPT(CURLOPT_CAINFO_BLOB, CURLOPTTYPE_BLOB, 309),
2172 
2173   /* The CA certificates as "blob" used to validate the proxy certificate
2174      this option is used only if PROXY_SSL_VERIFYPEER is true */
2175   CURLOPT(CURLOPT_PROXY_CAINFO_BLOB, CURLOPTTYPE_BLOB, 310),
2176 
2177   /* used by scp/sftp to verify the host's public key */
2178   CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256, CURLOPTTYPE_STRINGPOINT, 311),
2179 
2180   /* Function that will be called immediately before the initial request
2181      is made on a connection (after any protocol negotiation step).  */
2182   CURLOPT(CURLOPT_PREREQFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 312),
2183 
2184   /* Data passed to the CURLOPT_PREREQFUNCTION callback */
2185   CURLOPT(CURLOPT_PREREQDATA, CURLOPTTYPE_CBPOINT, 313),
2186 
2187   /* maximum age (since creation) of a connection to consider it for reuse
2188    * (in seconds) */
2189   CURLOPT(CURLOPT_MAXLIFETIME_CONN, CURLOPTTYPE_LONG, 314),
2190 
2191   /* Set MIME option flags. */
2192   CURLOPT(CURLOPT_MIME_OPTIONS, CURLOPTTYPE_LONG, 315),
2193 
2194   /* set the SSH host key callback, must point to a curl_sshkeycallback
2195      function */
2196   CURLOPT(CURLOPT_SSH_HOSTKEYFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 316),
2197 
2198   /* set the SSH host key callback custom pointer */
2199   CURLOPT(CURLOPT_SSH_HOSTKEYDATA, CURLOPTTYPE_CBPOINT, 317),
2200 
2201   /* specify which protocols that are allowed to be used for the transfer,
2202      which thus helps the app which takes URLs from users or other external
2203      inputs and want to restrict what protocol(s) to deal with. Defaults to
2204      all built-in protocols. */
2205   CURLOPT(CURLOPT_PROTOCOLS_STR, CURLOPTTYPE_STRINGPOINT, 318),
2206 
2207   /* specify which protocols that libcurl is allowed to follow directs to */
2208   CURLOPT(CURLOPT_REDIR_PROTOCOLS_STR, CURLOPTTYPE_STRINGPOINT, 319),
2209 
2210   /* WebSockets options */
2211   CURLOPT(CURLOPT_WS_OPTIONS, CURLOPTTYPE_LONG, 320),
2212 
2213   /* CA cache timeout */
2214   CURLOPT(CURLOPT_CA_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 321),
2215 
2216   /* Can leak things, gonna exit() soon */
2217   CURLOPT(CURLOPT_QUICK_EXIT, CURLOPTTYPE_LONG, 322),
2218 
2219   /* set a specific client IP for HAProxy PROXY protocol header? */
2220   CURLOPT(CURLOPT_HAPROXY_CLIENT_IP, CURLOPTTYPE_STRINGPOINT, 323),
2221 
2222   /* millisecond version */
2223   CURLOPT(CURLOPT_SERVER_RESPONSE_TIMEOUT_MS, CURLOPTTYPE_LONG, 324),
2224 
2225   /* set ECH configuration */
2226   CURLOPT(CURLOPT_ECH, CURLOPTTYPE_STRINGPOINT, 325),
2227 
2228   /* maximum number of keepalive probes (Linux, *BSD, macOS, etc.) */
2229   CURLOPT(CURLOPT_TCP_KEEPCNT, CURLOPTTYPE_LONG, 326),
2230 
2231   CURLOPT_LASTENTRY /* the last unused */
2232 } CURLoption;
2233 
2234 #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
2235                           the obsolete stuff removed! */
2236 
2237 /* Backwards compatibility with older names */
2238 /* These are scheduled to disappear by 2011 */
2239 
2240 /* This was added in version 7.19.1 */
2241 #define CURLOPT_POST301 CURLOPT_POSTREDIR
2242 
2243 /* These are scheduled to disappear by 2009 */
2244 
2245 /* The following were added in 7.17.0 */
2246 #define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD
2247 #define CURLOPT_FTPAPPEND CURLOPT_APPEND
2248 #define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY
2249 #define CURLOPT_FTP_SSL CURLOPT_USE_SSL
2250 
2251 /* The following were added earlier */
2252 
2253 #define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
2254 #define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
2255 
2256 /* */
2257 #define CURLOPT_FTP_RESPONSE_TIMEOUT CURLOPT_SERVER_RESPONSE_TIMEOUT
2258 
2259 /* Added in 8.2.0 */
2260 #define CURLOPT_MAIL_RCPT_ALLLOWFAILS CURLOPT_MAIL_RCPT_ALLOWFAILS
2261 
2262 #else
2263 /* This is set if CURL_NO_OLDIES is defined at compile-time */
2264 #undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
2265 #endif
2266 
2267 
2268   /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
2269      name resolves addresses using more than one IP protocol version, this
2270      option might be handy to force libcurl to use a specific IP version. */
2271 #define CURL_IPRESOLVE_WHATEVER 0 /* default, uses addresses to all IP
2272                                      versions that your system allows */
2273 #define CURL_IPRESOLVE_V4       1 /* uses only IPv4 addresses/connections */
2274 #define CURL_IPRESOLVE_V6       2 /* uses only IPv6 addresses/connections */
2275 
2276   /* Convenient "aliases" */
2277 #define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
2278 
2279   /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
2280 enum {
2281   CURL_HTTP_VERSION_NONE, /* setting this means we do not care, and that we
2282                              would like the library to choose the best
2283                              possible for us! */
2284   CURL_HTTP_VERSION_1_0,  /* please use HTTP 1.0 in the request */
2285   CURL_HTTP_VERSION_1_1,  /* please use HTTP 1.1 in the request */
2286   CURL_HTTP_VERSION_2_0,  /* please use HTTP 2 in the request */
2287   CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
2288   CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE,  /* please use HTTP 2 without HTTP/1.1
2289                                            Upgrade */
2290   CURL_HTTP_VERSION_3 = 30, /* Use HTTP/3, fallback to HTTP/2 or HTTP/1 if
2291                                needed. For HTTPS only. For HTTP, this option
2292                                makes libcurl return error. */
2293   CURL_HTTP_VERSION_3ONLY = 31, /* Use HTTP/3 without fallback. For HTTPS
2294                                    only. For HTTP, this makes libcurl
2295                                    return error. */
2296 
2297   CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
2298 };
2299 
2300 /* Convenience definition simple because the name of the version is HTTP/2 and
2301    not 2.0. The 2_0 version of the enum name was set while the version was
2302    still planned to be 2.0 and we stick to it for compatibility. */
2303 #define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0
2304 
2305 /*
2306  * Public API enums for RTSP requests
2307  */
2308 enum {
2309     CURL_RTSPREQ_NONE, /* first in list */
2310     CURL_RTSPREQ_OPTIONS,
2311     CURL_RTSPREQ_DESCRIBE,
2312     CURL_RTSPREQ_ANNOUNCE,
2313     CURL_RTSPREQ_SETUP,
2314     CURL_RTSPREQ_PLAY,
2315     CURL_RTSPREQ_PAUSE,
2316     CURL_RTSPREQ_TEARDOWN,
2317     CURL_RTSPREQ_GET_PARAMETER,
2318     CURL_RTSPREQ_SET_PARAMETER,
2319     CURL_RTSPREQ_RECORD,
2320     CURL_RTSPREQ_RECEIVE,
2321     CURL_RTSPREQ_LAST /* last in list */
2322 };
2323 
2324   /* These enums are for use with the CURLOPT_NETRC option. */
2325 enum CURL_NETRC_OPTION {
2326   CURL_NETRC_IGNORED,     /* The .netrc will never be read.
2327                            * This is the default. */
2328   CURL_NETRC_OPTIONAL,    /* A user:password in the URL will be preferred
2329                            * to one in the .netrc. */
2330   CURL_NETRC_REQUIRED,    /* A user:password in the URL will be ignored.
2331                            * Unless one is set programmatically, the .netrc
2332                            * will be queried. */
2333   CURL_NETRC_LAST
2334 };
2335 
2336 #define CURL_SSLVERSION_DEFAULT 0
2337 #define CURL_SSLVERSION_TLSv1   1 /* TLS 1.x */
2338 #define CURL_SSLVERSION_SSLv2   2
2339 #define CURL_SSLVERSION_SSLv3   3
2340 #define CURL_SSLVERSION_TLSv1_0 4
2341 #define CURL_SSLVERSION_TLSv1_1 5
2342 #define CURL_SSLVERSION_TLSv1_2 6
2343 #define CURL_SSLVERSION_TLSv1_3 7
2344 
2345 #define CURL_SSLVERSION_LAST 8 /* never use, keep last */
2346 
2347 #define CURL_SSLVERSION_MAX_NONE 0
2348 #define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
2349 #define CURL_SSLVERSION_MAX_TLSv1_0 (CURL_SSLVERSION_TLSv1_0 << 16)
2350 #define CURL_SSLVERSION_MAX_TLSv1_1 (CURL_SSLVERSION_TLSv1_1 << 16)
2351 #define CURL_SSLVERSION_MAX_TLSv1_2 (CURL_SSLVERSION_TLSv1_2 << 16)
2352 #define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
2353 
2354   /* never use, keep last */
2355 #define CURL_SSLVERSION_MAX_LAST    (CURL_SSLVERSION_LAST    << 16)
2356 
2357 enum CURL_TLSAUTH {
2358   CURL_TLSAUTH_NONE,
2359   CURL_TLSAUTH_SRP,
2360   CURL_TLSAUTH_LAST /* never use, keep last */
2361 };
2362 
2363 /* symbols to use with CURLOPT_POSTREDIR.
2364    CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303
2365    can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302
2366    | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */
2367 
2368 #define CURL_REDIR_GET_ALL  0
2369 #define CURL_REDIR_POST_301 1
2370 #define CURL_REDIR_POST_302 2
2371 #define CURL_REDIR_POST_303 4
2372 #define CURL_REDIR_POST_ALL \
2373     (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
2374 
2375 typedef enum {
2376   CURL_TIMECOND_NONE,
2377 
2378   CURL_TIMECOND_IFMODSINCE,
2379   CURL_TIMECOND_IFUNMODSINCE,
2380   CURL_TIMECOND_LASTMOD,
2381 
2382   CURL_TIMECOND_LAST
2383 } curl_TimeCond;
2384 
2385 /* Special size_t value signaling a null-terminated string. */
2386 #define CURL_ZERO_TERMINATED ((size_t) -1)
2387 
2388 /* curl_strequal() and curl_strnequal() are subject for removal in a future
2389    release */
2390 CURL_EXTERN int curl_strequal(const char *s1, const char *s2);
2391 CURL_EXTERN int curl_strnequal(const char *s1, const char *s2, size_t n);
2392 
2393 /* Mime/form handling support. */
2394 typedef struct curl_mime      curl_mime;      /* Mime context. */
2395 typedef struct curl_mimepart  curl_mimepart;  /* Mime part context. */
2396 
2397 /* CURLMIMEOPT_ defines are for the CURLOPT_MIME_OPTIONS option. */
2398 #define CURLMIMEOPT_FORMESCAPE  (1<<0) /* Use backslash-escaping for forms. */
2399 
2400 /*
2401  * NAME curl_mime_init()
2402  *
2403  * DESCRIPTION
2404  *
2405  * Create a mime context and return its handle. The easy parameter is the
2406  * target handle.
2407  */
2408 CURL_EXTERN curl_mime *curl_mime_init(CURL *easy);
2409 
2410 /*
2411  * NAME curl_mime_free()
2412  *
2413  * DESCRIPTION
2414  *
2415  * release a mime handle and its substructures.
2416  */
2417 CURL_EXTERN void curl_mime_free(curl_mime *mime);
2418 
2419 /*
2420  * NAME curl_mime_addpart()
2421  *
2422  * DESCRIPTION
2423  *
2424  * Append a new empty part to the given mime context and return a handle to
2425  * the created part.
2426  */
2427 CURL_EXTERN curl_mimepart *curl_mime_addpart(curl_mime *mime);
2428 
2429 /*
2430  * NAME curl_mime_name()
2431  *
2432  * DESCRIPTION
2433  *
2434  * Set mime/form part name.
2435  */
2436 CURL_EXTERN CURLcode curl_mime_name(curl_mimepart *part, const char *name);
2437 
2438 /*
2439  * NAME curl_mime_filename()
2440  *
2441  * DESCRIPTION
2442  *
2443  * Set mime part remote filename.
2444  */
2445 CURL_EXTERN CURLcode curl_mime_filename(curl_mimepart *part,
2446                                         const char *filename);
2447 
2448 /*
2449  * NAME curl_mime_type()
2450  *
2451  * DESCRIPTION
2452  *
2453  * Set mime part type.
2454  */
2455 CURL_EXTERN CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype);
2456 
2457 /*
2458  * NAME curl_mime_encoder()
2459  *
2460  * DESCRIPTION
2461  *
2462  * Set mime data transfer encoder.
2463  */
2464 CURL_EXTERN CURLcode curl_mime_encoder(curl_mimepart *part,
2465                                        const char *encoding);
2466 
2467 /*
2468  * NAME curl_mime_data()
2469  *
2470  * DESCRIPTION
2471  *
2472  * Set mime part data source from memory data,
2473  */
2474 CURL_EXTERN CURLcode curl_mime_data(curl_mimepart *part,
2475                                     const char *data, size_t datasize);
2476 
2477 /*
2478  * NAME curl_mime_filedata()
2479  *
2480  * DESCRIPTION
2481  *
2482  * Set mime part data source from named file.
2483  */
2484 CURL_EXTERN CURLcode curl_mime_filedata(curl_mimepart *part,
2485                                         const char *filename);
2486 
2487 /*
2488  * NAME curl_mime_data_cb()
2489  *
2490  * DESCRIPTION
2491  *
2492  * Set mime part data source from callback function.
2493  */
2494 CURL_EXTERN CURLcode curl_mime_data_cb(curl_mimepart *part,
2495                                        curl_off_t datasize,
2496                                        curl_read_callback readfunc,
2497                                        curl_seek_callback seekfunc,
2498                                        curl_free_callback freefunc,
2499                                        void *arg);
2500 
2501 /*
2502  * NAME curl_mime_subparts()
2503  *
2504  * DESCRIPTION
2505  *
2506  * Set mime part data source from subparts.
2507  */
2508 CURL_EXTERN CURLcode curl_mime_subparts(curl_mimepart *part,
2509                                         curl_mime *subparts);
2510 /*
2511  * NAME curl_mime_headers()
2512  *
2513  * DESCRIPTION
2514  *
2515  * Set mime part headers.
2516  */
2517 CURL_EXTERN CURLcode curl_mime_headers(curl_mimepart *part,
2518                                        struct curl_slist *headers,
2519                                        int take_ownership);
2520 
2521 typedef enum {
2522   /********* the first one is unused ************/
2523   CURLFORM_NOTHING         CURL_DEPRECATED(7.56.0, ""),
2524   CURLFORM_COPYNAME        CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
2525   CURLFORM_PTRNAME         CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
2526   CURLFORM_NAMELENGTH      CURL_DEPRECATED(7.56.0, ""),
2527   CURLFORM_COPYCONTENTS    CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
2528   CURLFORM_PTRCONTENTS     CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
2529   CURLFORM_CONTENTSLENGTH  CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
2530   CURLFORM_FILECONTENT     CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
2531   CURLFORM_ARRAY           CURL_DEPRECATED(7.56.0, ""),
2532   CURLFORM_OBSOLETE,
2533   CURLFORM_FILE            CURL_DEPRECATED(7.56.0, "Use curl_mime_filedata()"),
2534 
2535   CURLFORM_BUFFER          CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
2536   CURLFORM_BUFFERPTR       CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
2537   CURLFORM_BUFFERLENGTH    CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
2538 
2539   CURLFORM_CONTENTTYPE     CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"),
2540   CURLFORM_CONTENTHEADER   CURL_DEPRECATED(7.56.0, "Use curl_mime_headers()"),
2541   CURLFORM_FILENAME        CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
2542   CURLFORM_END,
2543   CURLFORM_OBSOLETE2,
2544 
2545   CURLFORM_STREAM          CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
2546   CURLFORM_CONTENTLEN  /* added in 7.46.0, provide a curl_off_t length */
2547                            CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
2548 
2549   CURLFORM_LASTENTRY /* the last unused */
2550 } CURLformoption;
2551 
2552 /* structure to be used as parameter for CURLFORM_ARRAY */
2553 struct curl_forms {
2554   CURLformoption option;
2555   const char     *value;
2556 };
2557 
2558 /* use this for multipart formpost building */
2559 /* Returns code for curl_formadd()
2560  *
2561  * Returns:
2562  * CURL_FORMADD_OK             on success
2563  * CURL_FORMADD_MEMORY         if the FormInfo allocation fails
2564  * CURL_FORMADD_OPTION_TWICE   if one option is given twice for one Form
2565  * CURL_FORMADD_NULL           if a null pointer was given for a char
2566  * CURL_FORMADD_MEMORY         if the allocation of a FormInfo struct failed
2567  * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used
2568  * CURL_FORMADD_INCOMPLETE     if the some FormInfo is not complete (or error)
2569  * CURL_FORMADD_MEMORY         if a curl_httppost struct cannot be allocated
2570  * CURL_FORMADD_MEMORY         if some allocation for string copying failed.
2571  * CURL_FORMADD_ILLEGAL_ARRAY  if an illegal option is used in an array
2572  *
2573  ***************************************************************************/
2574 typedef enum {
2575   CURL_FORMADD_OK             CURL_DEPRECATED(7.56.0, ""), /* 1st, no error */
2576 
2577   CURL_FORMADD_MEMORY         CURL_DEPRECATED(7.56.0, ""),
2578   CURL_FORMADD_OPTION_TWICE   CURL_DEPRECATED(7.56.0, ""),
2579   CURL_FORMADD_NULL           CURL_DEPRECATED(7.56.0, ""),
2580   CURL_FORMADD_UNKNOWN_OPTION CURL_DEPRECATED(7.56.0, ""),
2581   CURL_FORMADD_INCOMPLETE     CURL_DEPRECATED(7.56.0, ""),
2582   CURL_FORMADD_ILLEGAL_ARRAY  CURL_DEPRECATED(7.56.0, ""),
2583   /* libcurl was built with form api disabled */
2584   CURL_FORMADD_DISABLED       CURL_DEPRECATED(7.56.0, ""),
2585 
2586   CURL_FORMADD_LAST /* last */
2587 } CURLFORMcode;
2588 
2589 /*
2590  * NAME curl_formadd()
2591  *
2592  * DESCRIPTION
2593  *
2594  * Pretty advanced function for building multi-part formposts. Each invoke
2595  * adds one part that together construct a full post. Then use
2596  * CURLOPT_HTTPPOST to send it off to libcurl.
2597  */
2598 CURL_EXTERN CURLFORMcode CURL_DEPRECATED(7.56.0, "Use curl_mime_init()")
2599 curl_formadd(struct curl_httppost **httppost,
2600              struct curl_httppost **last_post,
2601              ...);
2602 
2603 /*
2604  * callback function for curl_formget()
2605  * The void *arg pointer will be the one passed as second argument to
2606  *   curl_formget().
2607  * The character buffer passed to it must not be freed.
2608  * Should return the buffer length passed to it as the argument "len" on
2609  *   success.
2610  */
2611 typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
2612                                         size_t len);
2613 
2614 /*
2615  * NAME curl_formget()
2616  *
2617  * DESCRIPTION
2618  *
2619  * Serialize a curl_httppost struct built with curl_formadd().
2620  * Accepts a void pointer as second argument which will be passed to
2621  * the curl_formget_callback function.
2622  * Returns 0 on success.
2623  */
2624 CURL_EXTERN int CURL_DEPRECATED(7.56.0, "")
2625 curl_formget(struct curl_httppost *form, void *arg,
2626              curl_formget_callback append);
2627 /*
2628  * NAME curl_formfree()
2629  *
2630  * DESCRIPTION
2631  *
2632  * Free a multipart formpost previously built with curl_formadd().
2633  */
2634 CURL_EXTERN void CURL_DEPRECATED(7.56.0, "Use curl_mime_free()")
2635 curl_formfree(struct curl_httppost *form);
2636 
2637 /*
2638  * NAME curl_getenv()
2639  *
2640  * DESCRIPTION
2641  *
2642  * Returns a malloc()'ed string that MUST be curl_free()ed after usage is
2643  * complete. DEPRECATED - see lib/README.curlx
2644  */
2645 CURL_EXTERN char *curl_getenv(const char *variable);
2646 
2647 /*
2648  * NAME curl_version()
2649  *
2650  * DESCRIPTION
2651  *
2652  * Returns a static ASCII string of the libcurl version.
2653  */
2654 CURL_EXTERN char *curl_version(void);
2655 
2656 /*
2657  * NAME curl_easy_escape()
2658  *
2659  * DESCRIPTION
2660  *
2661  * Escapes URL strings (converts all letters consider illegal in URLs to their
2662  * %XX versions). This function returns a new allocated string or NULL if an
2663  * error occurred.
2664  */
2665 CURL_EXTERN char *curl_easy_escape(CURL *handle,
2666                                    const char *string,
2667                                    int length);
2668 
2669 /* the previous version: */
2670 CURL_EXTERN char *curl_escape(const char *string,
2671                               int length);
2672 
2673 
2674 /*
2675  * NAME curl_easy_unescape()
2676  *
2677  * DESCRIPTION
2678  *
2679  * Unescapes URL encoding in strings (converts all %XX codes to their 8bit
2680  * versions). This function returns a new allocated string or NULL if an error
2681  * occurred.
2682  * Conversion Note: On non-ASCII platforms the ASCII %XX codes are
2683  * converted into the host encoding.
2684  */
2685 CURL_EXTERN char *curl_easy_unescape(CURL *handle,
2686                                      const char *string,
2687                                      int length,
2688                                      int *outlength);
2689 
2690 /* the previous version */
2691 CURL_EXTERN char *curl_unescape(const char *string,
2692                                 int length);
2693 
2694 /*
2695  * NAME curl_free()
2696  *
2697  * DESCRIPTION
2698  *
2699  * Provided for de-allocation in the same translation unit that did the
2700  * allocation. Added in libcurl 7.10
2701  */
2702 CURL_EXTERN void curl_free(void *p);
2703 
2704 /*
2705  * NAME curl_global_init()
2706  *
2707  * DESCRIPTION
2708  *
2709  * curl_global_init() should be invoked exactly once for each application that
2710  * uses libcurl and before any call of other libcurl functions.
2711 
2712  * This function is thread-safe if CURL_VERSION_THREADSAFE is set in the
2713  * curl_version_info_data.features flag (fetch by curl_version_info()).
2714 
2715  */
2716 CURL_EXTERN CURLcode curl_global_init(long flags);
2717 
2718 /*
2719  * NAME curl_global_init_mem()
2720  *
2721  * DESCRIPTION
2722  *
2723  * curl_global_init() or curl_global_init_mem() should be invoked exactly once
2724  * for each application that uses libcurl. This function can be used to
2725  * initialize libcurl and set user defined memory management callback
2726  * functions. Users can implement memory management routines to check for
2727  * memory leaks, check for mis-use of the curl library etc. User registered
2728  * callback routines will be invoked by this library instead of the system
2729  * memory management routines like malloc, free etc.
2730  */
2731 CURL_EXTERN CURLcode curl_global_init_mem(long flags,
2732                                           curl_malloc_callback m,
2733                                           curl_free_callback f,
2734                                           curl_realloc_callback r,
2735                                           curl_strdup_callback s,
2736                                           curl_calloc_callback c);
2737 
2738 /*
2739  * NAME curl_global_cleanup()
2740  *
2741  * DESCRIPTION
2742  *
2743  * curl_global_cleanup() should be invoked exactly once for each application
2744  * that uses libcurl
2745  */
2746 CURL_EXTERN void curl_global_cleanup(void);
2747 
2748 /*
2749  * NAME curl_global_trace()
2750  *
2751  * DESCRIPTION
2752  *
2753  * curl_global_trace() can be invoked at application start to
2754  * configure which components in curl should participate in tracing.
2755 
2756  * This function is thread-safe if CURL_VERSION_THREADSAFE is set in the
2757  * curl_version_info_data.features flag (fetch by curl_version_info()).
2758 
2759  */
2760 CURL_EXTERN CURLcode curl_global_trace(const char *config);
2761 
2762 /* linked-list structure for the CURLOPT_QUOTE option (and other) */
2763 struct curl_slist {
2764   char *data;
2765   struct curl_slist *next;
2766 };
2767 
2768 /*
2769  * NAME curl_global_sslset()
2770  *
2771  * DESCRIPTION
2772  *
2773  * When built with multiple SSL backends, curl_global_sslset() allows to
2774  * choose one. This function can only be called once, and it must be called
2775  * *before* curl_global_init().
2776  *
2777  * The backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL). The
2778  * backend can also be specified via the name parameter (passing -1 as id).
2779  * If both id and name are specified, the name will be ignored. If neither id
2780  * nor name are specified, the function will fail with
2781  * CURLSSLSET_UNKNOWN_BACKEND and set the "avail" pointer to the
2782  * NULL-terminated list of available backends.
2783  *
2784  * Upon success, the function returns CURLSSLSET_OK.
2785  *
2786  * If the specified SSL backend is not available, the function returns
2787  * CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a NULL-terminated
2788  * list of available SSL backends.
2789  *
2790  * The SSL backend can be set only once. If it has already been set, a
2791  * subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE.
2792  */
2793 
2794 struct curl_ssl_backend {
2795   curl_sslbackend id;
2796   const char *name;
2797 };
2798 typedef struct curl_ssl_backend curl_ssl_backend;
2799 
2800 typedef enum {
2801   CURLSSLSET_OK = 0,
2802   CURLSSLSET_UNKNOWN_BACKEND,
2803   CURLSSLSET_TOO_LATE,
2804   CURLSSLSET_NO_BACKENDS /* libcurl was built without any SSL support */
2805 } CURLsslset;
2806 
2807 CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
2808                                           const curl_ssl_backend ***avail);
2809 
2810 /*
2811  * NAME curl_slist_append()
2812  *
2813  * DESCRIPTION
2814  *
2815  * Appends a string to a linked list. If no list exists, it will be created
2816  * first. Returns the new list, after appending.
2817  */
2818 CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *list,
2819                                                  const char *data);
2820 
2821 /*
2822  * NAME curl_slist_free_all()
2823  *
2824  * DESCRIPTION
2825  *
2826  * free a previously built curl_slist.
2827  */
2828 CURL_EXTERN void curl_slist_free_all(struct curl_slist *list);
2829 
2830 /*
2831  * NAME curl_getdate()
2832  *
2833  * DESCRIPTION
2834  *
2835  * Returns the time, in seconds since 1 Jan 1970 of the time string given in
2836  * the first argument. The time argument in the second parameter is unused
2837  * and should be set to NULL.
2838  */
2839 CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused);
2840 
2841 /* info about the certificate chain, for SSL backends that support it. Asked
2842    for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */
2843 struct curl_certinfo {
2844   int num_of_certs;             /* number of certificates with information */
2845   struct curl_slist **certinfo; /* for each index in this array, there is a
2846                                    linked list with textual information for a
2847                                    certificate in the format "name:content".
2848                                    eg "Subject:foo", "Issuer:bar", etc. */
2849 };
2850 
2851 /* Information about the SSL library used and the respective internal SSL
2852    handle, which can be used to obtain further information regarding the
2853    connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */
2854 struct curl_tlssessioninfo {
2855   curl_sslbackend backend;
2856   void *internals;
2857 };
2858 
2859 #define CURLINFO_STRING   0x100000
2860 #define CURLINFO_LONG     0x200000
2861 #define CURLINFO_DOUBLE   0x300000
2862 #define CURLINFO_SLIST    0x400000
2863 #define CURLINFO_PTR      0x400000 /* same as SLIST */
2864 #define CURLINFO_SOCKET   0x500000
2865 #define CURLINFO_OFF_T    0x600000
2866 #define CURLINFO_MASK     0x0fffff
2867 #define CURLINFO_TYPEMASK 0xf00000
2868 
2869 typedef enum {
2870   CURLINFO_NONE, /* first, never use this */
2871   CURLINFO_EFFECTIVE_URL    = CURLINFO_STRING + 1,
2872   CURLINFO_RESPONSE_CODE    = CURLINFO_LONG   + 2,
2873   CURLINFO_TOTAL_TIME       = CURLINFO_DOUBLE + 3,
2874   CURLINFO_NAMELOOKUP_TIME  = CURLINFO_DOUBLE + 4,
2875   CURLINFO_CONNECT_TIME     = CURLINFO_DOUBLE + 5,
2876   CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,
2877   CURLINFO_SIZE_UPLOAD CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_UPLOAD_T")
2878                             = CURLINFO_DOUBLE + 7,
2879   CURLINFO_SIZE_UPLOAD_T    = CURLINFO_OFF_T  + 7,
2880   CURLINFO_SIZE_DOWNLOAD
2881                        CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_DOWNLOAD_T")
2882                             = CURLINFO_DOUBLE + 8,
2883   CURLINFO_SIZE_DOWNLOAD_T  = CURLINFO_OFF_T  + 8,
2884   CURLINFO_SPEED_DOWNLOAD
2885                        CURL_DEPRECATED(7.55.0, "Use CURLINFO_SPEED_DOWNLOAD_T")
2886                             = CURLINFO_DOUBLE + 9,
2887   CURLINFO_SPEED_DOWNLOAD_T = CURLINFO_OFF_T  + 9,
2888   CURLINFO_SPEED_UPLOAD
2889                        CURL_DEPRECATED(7.55.0, "Use CURLINFO_SPEED_UPLOAD_T")
2890                             = CURLINFO_DOUBLE + 10,
2891   CURLINFO_SPEED_UPLOAD_T   = CURLINFO_OFF_T  + 10,
2892   CURLINFO_HEADER_SIZE      = CURLINFO_LONG   + 11,
2893   CURLINFO_REQUEST_SIZE     = CURLINFO_LONG   + 12,
2894   CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG   + 13,
2895   CURLINFO_FILETIME         = CURLINFO_LONG   + 14,
2896   CURLINFO_FILETIME_T       = CURLINFO_OFF_T  + 14,
2897   CURLINFO_CONTENT_LENGTH_DOWNLOAD
2898                        CURL_DEPRECATED(7.55.0,
2899                                       "Use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T")
2900                             = CURLINFO_DOUBLE + 15,
2901   CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = CURLINFO_OFF_T  + 15,
2902   CURLINFO_CONTENT_LENGTH_UPLOAD
2903                        CURL_DEPRECATED(7.55.0,
2904                                        "Use CURLINFO_CONTENT_LENGTH_UPLOAD_T")
2905                             = CURLINFO_DOUBLE + 16,
2906   CURLINFO_CONTENT_LENGTH_UPLOAD_T   = CURLINFO_OFF_T  + 16,
2907   CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
2908   CURLINFO_CONTENT_TYPE     = CURLINFO_STRING + 18,
2909   CURLINFO_REDIRECT_TIME    = CURLINFO_DOUBLE + 19,
2910   CURLINFO_REDIRECT_COUNT   = CURLINFO_LONG   + 20,
2911   CURLINFO_PRIVATE          = CURLINFO_STRING + 21,
2912   CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG   + 22,
2913   CURLINFO_HTTPAUTH_AVAIL   = CURLINFO_LONG   + 23,
2914   CURLINFO_PROXYAUTH_AVAIL  = CURLINFO_LONG   + 24,
2915   CURLINFO_OS_ERRNO         = CURLINFO_LONG   + 25,
2916   CURLINFO_NUM_CONNECTS     = CURLINFO_LONG   + 26,
2917   CURLINFO_SSL_ENGINES      = CURLINFO_SLIST  + 27,
2918   CURLINFO_COOKIELIST       = CURLINFO_SLIST  + 28,
2919   CURLINFO_LASTSOCKET  CURL_DEPRECATED(7.45.0, "Use CURLINFO_ACTIVESOCKET")
2920                             = CURLINFO_LONG   + 29,
2921   CURLINFO_FTP_ENTRY_PATH   = CURLINFO_STRING + 30,
2922   CURLINFO_REDIRECT_URL     = CURLINFO_STRING + 31,
2923   CURLINFO_PRIMARY_IP       = CURLINFO_STRING + 32,
2924   CURLINFO_APPCONNECT_TIME  = CURLINFO_DOUBLE + 33,
2925   CURLINFO_CERTINFO         = CURLINFO_PTR    + 34,
2926   CURLINFO_CONDITION_UNMET  = CURLINFO_LONG   + 35,
2927   CURLINFO_RTSP_SESSION_ID  = CURLINFO_STRING + 36,
2928   CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG   + 37,
2929   CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG   + 38,
2930   CURLINFO_RTSP_CSEQ_RECV   = CURLINFO_LONG   + 39,
2931   CURLINFO_PRIMARY_PORT     = CURLINFO_LONG   + 40,
2932   CURLINFO_LOCAL_IP         = CURLINFO_STRING + 41,
2933   CURLINFO_LOCAL_PORT       = CURLINFO_LONG   + 42,
2934   CURLINFO_TLS_SESSION CURL_DEPRECATED(7.48.0, "Use CURLINFO_TLS_SSL_PTR")
2935                             = CURLINFO_PTR    + 43,
2936   CURLINFO_ACTIVESOCKET     = CURLINFO_SOCKET + 44,
2937   CURLINFO_TLS_SSL_PTR      = CURLINFO_PTR    + 45,
2938   CURLINFO_HTTP_VERSION     = CURLINFO_LONG   + 46,
2939   CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47,
2940   CURLINFO_PROTOCOL    CURL_DEPRECATED(7.85.0, "Use CURLINFO_SCHEME")
2941                             = CURLINFO_LONG   + 48,
2942   CURLINFO_SCHEME           = CURLINFO_STRING + 49,
2943   CURLINFO_TOTAL_TIME_T     = CURLINFO_OFF_T + 50,
2944   CURLINFO_NAMELOOKUP_TIME_T = CURLINFO_OFF_T + 51,
2945   CURLINFO_CONNECT_TIME_T   = CURLINFO_OFF_T + 52,
2946   CURLINFO_PRETRANSFER_TIME_T = CURLINFO_OFF_T + 53,
2947   CURLINFO_STARTTRANSFER_TIME_T = CURLINFO_OFF_T + 54,
2948   CURLINFO_REDIRECT_TIME_T  = CURLINFO_OFF_T + 55,
2949   CURLINFO_APPCONNECT_TIME_T = CURLINFO_OFF_T + 56,
2950   CURLINFO_RETRY_AFTER      = CURLINFO_OFF_T + 57,
2951   CURLINFO_EFFECTIVE_METHOD = CURLINFO_STRING + 58,
2952   CURLINFO_PROXY_ERROR      = CURLINFO_LONG + 59,
2953   CURLINFO_REFERER          = CURLINFO_STRING + 60,
2954   CURLINFO_CAINFO           = CURLINFO_STRING + 61,
2955   CURLINFO_CAPATH           = CURLINFO_STRING + 62,
2956   CURLINFO_XFER_ID          = CURLINFO_OFF_T + 63,
2957   CURLINFO_CONN_ID          = CURLINFO_OFF_T + 64,
2958   CURLINFO_QUEUE_TIME_T     = CURLINFO_OFF_T + 65,
2959   CURLINFO_USED_PROXY       = CURLINFO_LONG + 66,
2960   CURLINFO_POSTTRANSFER_TIME_T = CURLINFO_OFF_T + 67,
2961   CURLINFO_EARLYDATA_SENT_T = CURLINFO_OFF_T + 68,
2962   CURLINFO_LASTONE          = 68
2963 } CURLINFO;
2964 
2965 /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
2966    CURLINFO_HTTP_CODE */
2967 #define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE
2968 
2969 typedef enum {
2970   CURLCLOSEPOLICY_NONE, /* first, never use this */
2971 
2972   CURLCLOSEPOLICY_OLDEST,
2973   CURLCLOSEPOLICY_LEAST_RECENTLY_USED,
2974   CURLCLOSEPOLICY_LEAST_TRAFFIC,
2975   CURLCLOSEPOLICY_SLOWEST,
2976   CURLCLOSEPOLICY_CALLBACK,
2977 
2978   CURLCLOSEPOLICY_LAST /* last, never use this */
2979 } curl_closepolicy;
2980 
2981 #define CURL_GLOBAL_SSL (1<<0) /* no purpose since 7.57.0 */
2982 #define CURL_GLOBAL_WIN32 (1<<1)
2983 #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
2984 #define CURL_GLOBAL_NOTHING 0
2985 #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
2986 #define CURL_GLOBAL_ACK_EINTR (1<<2)
2987 
2988 
2989 /*****************************************************************************
2990  * Setup defines, protos etc for the sharing stuff.
2991  */
2992 
2993 /* Different data locks for a single share */
2994 typedef enum {
2995   CURL_LOCK_DATA_NONE = 0,
2996   /*  CURL_LOCK_DATA_SHARE is used internally to say that
2997    *  the locking is just made to change the internal state of the share
2998    *  itself.
2999    */
3000   CURL_LOCK_DATA_SHARE,
3001   CURL_LOCK_DATA_COOKIE,
3002   CURL_LOCK_DATA_DNS,
3003   CURL_LOCK_DATA_SSL_SESSION,
3004   CURL_LOCK_DATA_CONNECT,
3005   CURL_LOCK_DATA_PSL,
3006   CURL_LOCK_DATA_HSTS,
3007   CURL_LOCK_DATA_LAST
3008 } curl_lock_data;
3009 
3010 /* Different lock access types */
3011 typedef enum {
3012   CURL_LOCK_ACCESS_NONE = 0,   /* unspecified action */
3013   CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */
3014   CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */
3015   CURL_LOCK_ACCESS_LAST        /* never use */
3016 } curl_lock_access;
3017 
3018 typedef void (*curl_lock_function)(CURL *handle,
3019                                    curl_lock_data data,
3020                                    curl_lock_access locktype,
3021                                    void *userptr);
3022 typedef void (*curl_unlock_function)(CURL *handle,
3023                                      curl_lock_data data,
3024                                      void *userptr);
3025 
3026 
3027 typedef enum {
3028   CURLSHE_OK,  /* all is fine */
3029   CURLSHE_BAD_OPTION, /* 1 */
3030   CURLSHE_IN_USE,     /* 2 */
3031   CURLSHE_INVALID,    /* 3 */
3032   CURLSHE_NOMEM,      /* 4 out of memory */
3033   CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */
3034   CURLSHE_LAST        /* never use */
3035 } CURLSHcode;
3036 
3037 typedef enum {
3038   CURLSHOPT_NONE,  /* do not use */
3039   CURLSHOPT_SHARE,   /* specify a data type to share */
3040   CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */
3041   CURLSHOPT_LOCKFUNC,   /* pass in a 'curl_lock_function' pointer */
3042   CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */
3043   CURLSHOPT_USERDATA,   /* pass in a user data pointer used in the lock/unlock
3044                            callback functions */
3045   CURLSHOPT_LAST  /* never use */
3046 } CURLSHoption;
3047 
3048 CURL_EXTERN CURLSH *curl_share_init(void);
3049 CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option,
3050                                          ...);
3051 CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *share);
3052 
3053 /****************************************************************************
3054  * Structures for querying information about the curl library at runtime.
3055  */
3056 
3057 typedef enum {
3058   CURLVERSION_FIRST,    /* 7.10 */
3059   CURLVERSION_SECOND,   /* 7.11.1 */
3060   CURLVERSION_THIRD,    /* 7.12.0 */
3061   CURLVERSION_FOURTH,   /* 7.16.1 */
3062   CURLVERSION_FIFTH,    /* 7.57.0 */
3063   CURLVERSION_SIXTH,    /* 7.66.0 */
3064   CURLVERSION_SEVENTH,  /* 7.70.0 */
3065   CURLVERSION_EIGHTH,   /* 7.72.0 */
3066   CURLVERSION_NINTH,    /* 7.75.0 */
3067   CURLVERSION_TENTH,    /* 7.77.0 */
3068   CURLVERSION_ELEVENTH, /* 7.87.0 */
3069   CURLVERSION_TWELFTH,  /* 8.8.0 */
3070   CURLVERSION_LAST /* never actually use this */
3071 } CURLversion;
3072 
3073 /* The 'CURLVERSION_NOW' is the symbolic name meant to be used by
3074    basically all programs ever that want to get version information. It is
3075    meant to be a built-in version number for what kind of struct the caller
3076    expects. If the struct ever changes, we redefine the NOW to another enum
3077    from above. */
3078 #define CURLVERSION_NOW CURLVERSION_TWELFTH
3079 
3080 struct curl_version_info_data {
3081   CURLversion age;          /* age of the returned struct */
3082   const char *version;      /* LIBCURL_VERSION */
3083   unsigned int version_num; /* LIBCURL_VERSION_NUM */
3084   const char *host;         /* OS/host/cpu/machine when configured */
3085   int features;             /* bitmask, see defines below */
3086   const char *ssl_version;  /* human readable string */
3087   long ssl_version_num;     /* not used anymore, always 0 */
3088   const char *libz_version; /* human readable string */
3089   /* protocols is terminated by an entry with a NULL protoname */
3090   const char * const *protocols;
3091 
3092   /* The fields below this were added in CURLVERSION_SECOND */
3093   const char *ares;
3094   int ares_num;
3095 
3096   /* This field was added in CURLVERSION_THIRD */
3097   const char *libidn;
3098 
3099   /* These field were added in CURLVERSION_FOURTH */
3100 
3101   /* Same as '_libiconv_version' if built with HAVE_ICONV */
3102   int iconv_ver_num;
3103 
3104   const char *libssh_version; /* human readable string */
3105 
3106   /* These fields were added in CURLVERSION_FIFTH */
3107   unsigned int brotli_ver_num; /* Numeric Brotli version
3108                                   (MAJOR << 24) | (MINOR << 12) | PATCH */
3109   const char *brotli_version; /* human readable string. */
3110 
3111   /* These fields were added in CURLVERSION_SIXTH */
3112   unsigned int nghttp2_ver_num; /* Numeric nghttp2 version
3113                                    (MAJOR << 16) | (MINOR << 8) | PATCH */
3114   const char *nghttp2_version; /* human readable string. */
3115   const char *quic_version;    /* human readable quic (+ HTTP/3) library +
3116                                   version or NULL */
3117 
3118   /* These fields were added in CURLVERSION_SEVENTH */
3119   const char *cainfo;          /* the built-in default CURLOPT_CAINFO, might
3120                                   be NULL */
3121   const char *capath;          /* the built-in default CURLOPT_CAPATH, might
3122                                   be NULL */
3123 
3124   /* These fields were added in CURLVERSION_EIGHTH */
3125   unsigned int zstd_ver_num; /* Numeric Zstd version
3126                                   (MAJOR << 24) | (MINOR << 12) | PATCH */
3127   const char *zstd_version; /* human readable string. */
3128 
3129   /* These fields were added in CURLVERSION_NINTH */
3130   const char *hyper_version; /* human readable string. */
3131 
3132   /* These fields were added in CURLVERSION_TENTH */
3133   const char *gsasl_version; /* human readable string. */
3134 
3135   /* These fields were added in CURLVERSION_ELEVENTH */
3136   /* feature_names is terminated by an entry with a NULL feature name */
3137   const char * const *feature_names;
3138 
3139   /* These fields were added in CURLVERSION_TWELFTH */
3140   const char *rtmp_version; /* human readable string. */
3141 };
3142 typedef struct curl_version_info_data curl_version_info_data;
3143 
3144 #define CURL_VERSION_IPV6         (1<<0)  /* IPv6-enabled */
3145 #define CURL_VERSION_KERBEROS4    (1<<1)  /* Kerberos V4 auth is supported
3146                                              (deprecated) */
3147 #define CURL_VERSION_SSL          (1<<2)  /* SSL options are present */
3148 #define CURL_VERSION_LIBZ         (1<<3)  /* libz features are present */
3149 #define CURL_VERSION_NTLM         (1<<4)  /* NTLM auth is supported */
3150 #define CURL_VERSION_GSSNEGOTIATE (1<<5)  /* Negotiate auth is supported
3151                                              (deprecated) */
3152 #define CURL_VERSION_DEBUG        (1<<6)  /* Built with debug capabilities */
3153 #define CURL_VERSION_ASYNCHDNS    (1<<7)  /* Asynchronous DNS resolves */
3154 #define CURL_VERSION_SPNEGO       (1<<8)  /* SPNEGO auth is supported */
3155 #define CURL_VERSION_LARGEFILE    (1<<9)  /* Supports files larger than 2GB */
3156 #define CURL_VERSION_IDN          (1<<10) /* Internationized Domain Names are
3157                                              supported */
3158 #define CURL_VERSION_SSPI         (1<<11) /* Built against Windows SSPI */
3159 #define CURL_VERSION_CONV         (1<<12) /* Character conversions supported */
3160 #define CURL_VERSION_CURLDEBUG    (1<<13) /* Debug memory tracking supported */
3161 #define CURL_VERSION_TLSAUTH_SRP  (1<<14) /* TLS-SRP auth is supported */
3162 #define CURL_VERSION_NTLM_WB      (1<<15) /* NTLM delegation to winbind helper
3163                                              is supported */
3164 #define CURL_VERSION_HTTP2        (1<<16) /* HTTP2 support built-in */
3165 #define CURL_VERSION_GSSAPI       (1<<17) /* Built against a GSS-API library */
3166 #define CURL_VERSION_KERBEROS5    (1<<18) /* Kerberos V5 auth is supported */
3167 #define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
3168 #define CURL_VERSION_PSL          (1<<20) /* Mozilla's Public Suffix List, used
3169                                              for cookie domain verification */
3170 #define CURL_VERSION_HTTPS_PROXY  (1<<21) /* HTTPS-proxy support built-in */
3171 #define CURL_VERSION_MULTI_SSL    (1<<22) /* Multiple SSL backends available */
3172 #define CURL_VERSION_BROTLI       (1<<23) /* Brotli features are present. */
3173 #define CURL_VERSION_ALTSVC       (1<<24) /* Alt-Svc handling built-in */
3174 #define CURL_VERSION_HTTP3        (1<<25) /* HTTP3 support built-in */
3175 #define CURL_VERSION_ZSTD         (1<<26) /* zstd features are present */
3176 #define CURL_VERSION_UNICODE      (1<<27) /* Unicode support on Windows */
3177 #define CURL_VERSION_HSTS         (1<<28) /* HSTS is supported */
3178 #define CURL_VERSION_GSASL        (1<<29) /* libgsasl is supported */
3179 #define CURL_VERSION_THREADSAFE   (1<<30) /* libcurl API is thread-safe */
3180 
3181 /*
3182  * NAME curl_version_info()
3183  *
3184  * DESCRIPTION
3185  *
3186  * This function returns a pointer to a static copy of the version info
3187  * struct. See above.
3188  */
3189 CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
3190 
3191 /*
3192  * NAME curl_easy_strerror()
3193  *
3194  * DESCRIPTION
3195  *
3196  * The curl_easy_strerror function may be used to turn a CURLcode value
3197  * into the equivalent human readable error string. This is useful
3198  * for printing meaningful error messages.
3199  */
3200 CURL_EXTERN const char *curl_easy_strerror(CURLcode);
3201 
3202 /*
3203  * NAME curl_share_strerror()
3204  *
3205  * DESCRIPTION
3206  *
3207  * The curl_share_strerror function may be used to turn a CURLSHcode value
3208  * into the equivalent human readable error string. This is useful
3209  * for printing meaningful error messages.
3210  */
3211 CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
3212 
3213 /*
3214  * NAME curl_easy_pause()
3215  *
3216  * DESCRIPTION
3217  *
3218  * The curl_easy_pause function pauses or unpauses transfers. Select the new
3219  * state by setting the bitmask, use the convenience defines below.
3220  *
3221  */
3222 CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
3223 
3224 #define CURLPAUSE_RECV      (1<<0)
3225 #define CURLPAUSE_RECV_CONT (0)
3226 
3227 #define CURLPAUSE_SEND      (1<<2)
3228 #define CURLPAUSE_SEND_CONT (0)
3229 
3230 #define CURLPAUSE_ALL       (CURLPAUSE_RECV|CURLPAUSE_SEND)
3231 #define CURLPAUSE_CONT      (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
3232 
3233 #ifdef  __cplusplus
3234 } /* end of extern "C" */
3235 #endif
3236 
3237 /* unfortunately, the easy.h and multi.h include files need options and info
3238   stuff before they can be included! */
3239 #include "easy.h" /* nothing in curl is fun without the easy stuff */
3240 #include "multi.h"
3241 #include "urlapi.h"
3242 #include "options.h"
3243 #include "header.h"
3244 #include "websockets.h"
3245 #ifndef CURL_SKIP_INCLUDE_MPRINTF
3246 #include "mprintf.h"
3247 #endif
3248 
3249 /* the typechecker does not work in C++ (yet) */
3250 #if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
3251     ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \
3252     !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK)
3253 #include "typecheck-gcc.h"
3254 #else
3255 #if defined(__STDC__) && (__STDC__ >= 1)
3256 /* This preprocessor magic that replaces a call with the exact same call is
3257    only done to make sure application authors pass exactly three arguments
3258    to these functions. */
3259 #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
3260 #define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
3261 #define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
3262 #define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
3263 #endif /* __STDC__ >= 1 */
3264 #endif /* gcc >= 4.3 && !__cplusplus && !CURL_DISABLE_TYPECHECK */
3265 
3266 #endif /* CURLINC_CURL_H */