File indexing completed on 2025-01-18 09:55:11
0001 #ifndef CURLINC_CURL_H
0002 #define CURLINC_CURL_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 #ifdef CURL_NO_OLDIES
0033 #define CURL_STRICTER
0034 #endif
0035
0036
0037 #if (defined(__GNUC__) && \
0038 ((__GNUC__ > 12) || ((__GNUC__ == 12) && (__GNUC_MINOR__ >= 1 ))) || \
0039 defined(__IAR_SYSTEMS_ICC__)) && \
0040 !defined(__INTEL_COMPILER) && \
0041 !defined(CURL_DISABLE_DEPRECATION) && !defined(BUILDING_LIBCURL)
0042 #define CURL_DEPRECATED(version, message) \
0043 __attribute__((deprecated("since " # version ". " message)))
0044 #if defined(__IAR_SYSTEMS_ICC__)
0045 #define CURL_IGNORE_DEPRECATION(statements) \
0046 _Pragma("diag_suppress=Pe1444") \
0047 statements \
0048 _Pragma("diag_default=Pe1444")
0049 #else
0050 #define CURL_IGNORE_DEPRECATION(statements) \
0051 _Pragma("GCC diagnostic push") \
0052 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
0053 statements \
0054 _Pragma("GCC diagnostic pop")
0055 #endif
0056 #else
0057 #define CURL_DEPRECATED(version, message)
0058 #define CURL_IGNORE_DEPRECATION(statements) statements
0059 #endif
0060
0061 #include "curlver.h" /* libcurl version defines */
0062 #include "system.h" /* determine things runtime */
0063
0064 #include <stdio.h>
0065 #include <limits.h>
0066
0067 #if defined(__FreeBSD__) || defined(__MidnightBSD__)
0068
0069 #include <sys/param.h>
0070 #endif
0071
0072
0073 #include <sys/types.h>
0074 #include <time.h>
0075
0076 #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
0077 #if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \
0078 defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H))
0079
0080
0081 #include <winsock2.h>
0082 #include <ws2tcpip.h>
0083 #endif
0084 #endif
0085
0086
0087
0088
0089 #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
0090 defined(__minix) || defined(__INTEGRITY) || \
0091 defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
0092 defined(__CYGWIN__) || defined(AMIGA) || defined(__NuttX__) || \
0093 (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) || \
0094 (defined(__MidnightBSD_version) && (__MidnightBSD_version < 100000)) || \
0095 defined(__sun__) || defined(__serenity__) || defined(__vxworks__)
0096 #include <sys/select.h>
0097 #endif
0098
0099 #if !defined(_WIN32) && !defined(_WIN32_WCE)
0100 #include <sys/socket.h>
0101 #endif
0102
0103 #if !defined(_WIN32)
0104 #include <sys/time.h>
0105 #endif
0106
0107
0108 #ifndef __has_declspec_attribute
0109 # define __has_declspec_attribute(x) 0
0110 #endif
0111
0112 #ifdef __cplusplus
0113 extern "C" {
0114 #endif
0115
0116 #if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
0117 typedef struct Curl_easy CURL;
0118 typedef struct Curl_share CURLSH;
0119 #else
0120 typedef void CURL;
0121 typedef void CURLSH;
0122 #endif
0123
0124
0125
0126
0127
0128 #ifdef CURL_STATICLIB
0129 # define CURL_EXTERN
0130 #elif defined(_WIN32) || \
0131 (__has_declspec_attribute(dllexport) && \
0132 __has_declspec_attribute(dllimport))
0133 # if defined(BUILDING_LIBCURL)
0134 # define CURL_EXTERN __declspec(dllexport)
0135 # else
0136 # define CURL_EXTERN __declspec(dllimport)
0137 # endif
0138 #elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
0139 # define CURL_EXTERN CURL_EXTERN_SYMBOL
0140 #else
0141 # define CURL_EXTERN
0142 #endif
0143
0144 #ifndef curl_socket_typedef
0145
0146 #if defined(_WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)
0147 typedef SOCKET curl_socket_t;
0148 #define CURL_SOCKET_BAD INVALID_SOCKET
0149 #else
0150 typedef int curl_socket_t;
0151 #define CURL_SOCKET_BAD -1
0152 #endif
0153 #define curl_socket_typedef
0154 #endif
0155
0156
0157 typedef enum {
0158 CURLSSLBACKEND_NONE = 0,
0159 CURLSSLBACKEND_OPENSSL = 1,
0160 CURLSSLBACKEND_GNUTLS = 2,
0161 CURLSSLBACKEND_NSS CURL_DEPRECATED(8.3.0, "") = 3,
0162 CURLSSLBACKEND_OBSOLETE4 = 4,
0163 CURLSSLBACKEND_GSKIT CURL_DEPRECATED(8.3.0, "") = 5,
0164 CURLSSLBACKEND_POLARSSL CURL_DEPRECATED(7.69.0, "") = 6,
0165 CURLSSLBACKEND_WOLFSSL = 7,
0166 CURLSSLBACKEND_SCHANNEL = 8,
0167 CURLSSLBACKEND_SECURETRANSPORT = 9,
0168 CURLSSLBACKEND_AXTLS CURL_DEPRECATED(7.61.0, "") = 10,
0169 CURLSSLBACKEND_MBEDTLS = 11,
0170 CURLSSLBACKEND_MESALINK CURL_DEPRECATED(7.82.0, "") = 12,
0171 CURLSSLBACKEND_BEARSSL = 13,
0172 CURLSSLBACKEND_RUSTLS = 14
0173 } curl_sslbackend;
0174
0175
0176 #define CURLSSLBACKEND_AWSLC CURLSSLBACKEND_OPENSSL
0177 #define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL
0178 #define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL
0179
0180
0181 #define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL
0182 #define CURLSSLBACKEND_DARWINSSL CURLSSLBACKEND_SECURETRANSPORT
0183
0184 struct curl_httppost {
0185 struct curl_httppost *next;
0186 char *name;
0187 long namelength;
0188 char *contents;
0189 long contentslength;
0190
0191 char *buffer;
0192 long bufferlength;
0193 char *contenttype;
0194 struct curl_slist *contentheader;
0195 struct curl_httppost *more;
0196
0197
0198 long flags;
0199
0200
0201 #define CURL_HTTPPOST_FILENAME (1<<0)
0202
0203 #define CURL_HTTPPOST_READFILE (1<<1)
0204
0205 #define CURL_HTTPPOST_PTRNAME (1<<2)
0206
0207 #define CURL_HTTPPOST_PTRCONTENTS (1<<3)
0208
0209 #define CURL_HTTPPOST_BUFFER (1<<4)
0210
0211 #define CURL_HTTPPOST_PTRBUFFER (1<<5)
0212
0213
0214 #define CURL_HTTPPOST_CALLBACK (1<<6)
0215
0216 #define CURL_HTTPPOST_LARGE (1<<7)
0217
0218 char *showfilename;
0219
0220
0221 void *userp;
0222
0223 curl_off_t contentlen;
0224
0225
0226 };
0227
0228
0229
0230
0231 #define CURL_PROGRESSFUNC_CONTINUE 0x10000001
0232
0233
0234
0235 typedef int (*curl_progress_callback)(void *clientp,
0236 double dltotal,
0237 double dlnow,
0238 double ultotal,
0239 double ulnow);
0240
0241
0242
0243
0244 typedef int (*curl_xferinfo_callback)(void *clientp,
0245 curl_off_t dltotal,
0246 curl_off_t dlnow,
0247 curl_off_t ultotal,
0248 curl_off_t ulnow);
0249
0250 #ifndef CURL_MAX_READ_SIZE
0251
0252 #define CURL_MAX_READ_SIZE (10*1024*1024)
0253 #endif
0254
0255 #ifndef CURL_MAX_WRITE_SIZE
0256
0257
0258
0259
0260
0261
0262 #define CURL_MAX_WRITE_SIZE 16384
0263 #endif
0264
0265 #ifndef CURL_MAX_HTTP_HEADER
0266
0267
0268
0269 #define CURL_MAX_HTTP_HEADER (100*1024)
0270 #endif
0271
0272
0273
0274 #define CURL_WRITEFUNC_PAUSE 0x10000001
0275
0276
0277
0278 #define CURL_WRITEFUNC_ERROR 0xFFFFFFFF
0279
0280 typedef size_t (*curl_write_callback)(char *buffer,
0281 size_t size,
0282 size_t nitems,
0283 void *outstream);
0284
0285
0286 typedef int (*curl_resolver_start_callback)(void *resolver_state,
0287 void *reserved, void *userdata);
0288
0289
0290 typedef enum {
0291 CURLFILETYPE_FILE = 0,
0292 CURLFILETYPE_DIRECTORY,
0293 CURLFILETYPE_SYMLINK,
0294 CURLFILETYPE_DEVICE_BLOCK,
0295 CURLFILETYPE_DEVICE_CHAR,
0296 CURLFILETYPE_NAMEDPIPE,
0297 CURLFILETYPE_SOCKET,
0298 CURLFILETYPE_DOOR,
0299
0300 CURLFILETYPE_UNKNOWN
0301 } curlfiletype;
0302
0303 #define CURLFINFOFLAG_KNOWN_FILENAME (1<<0)
0304 #define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1)
0305 #define CURLFINFOFLAG_KNOWN_TIME (1<<2)
0306 #define CURLFINFOFLAG_KNOWN_PERM (1<<3)
0307 #define CURLFINFOFLAG_KNOWN_UID (1<<4)
0308 #define CURLFINFOFLAG_KNOWN_GID (1<<5)
0309 #define CURLFINFOFLAG_KNOWN_SIZE (1<<6)
0310 #define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7)
0311
0312
0313 struct curl_fileinfo {
0314 char *filename;
0315 curlfiletype filetype;
0316 time_t time;
0317 unsigned int perm;
0318 int uid;
0319 int gid;
0320 curl_off_t size;
0321 long int hardlinks;
0322
0323 struct {
0324
0325 char *time;
0326 char *perm;
0327 char *user;
0328 char *group;
0329 char *target;
0330 } strings;
0331
0332 unsigned int flags;
0333
0334
0335
0336 char *b_data;
0337 size_t b_size;
0338 size_t b_used;
0339 };
0340
0341
0342 #define CURL_CHUNK_BGN_FUNC_OK 0
0343 #define CURL_CHUNK_BGN_FUNC_FAIL 1
0344 #define CURL_CHUNK_BGN_FUNC_SKIP 2
0345
0346
0347
0348
0349 typedef long (*curl_chunk_bgn_callback)(const void *transfer_info,
0350 void *ptr,
0351 int remains);
0352
0353
0354 #define CURL_CHUNK_END_FUNC_OK 0
0355 #define CURL_CHUNK_END_FUNC_FAIL 1
0356
0357
0358
0359
0360
0361
0362
0363 typedef long (*curl_chunk_end_callback)(void *ptr);
0364
0365
0366 #define CURL_FNMATCHFUNC_MATCH 0
0367 #define CURL_FNMATCHFUNC_NOMATCH 1
0368 #define CURL_FNMATCHFUNC_FAIL 2
0369
0370
0371
0372 typedef int (*curl_fnmatch_callback)(void *ptr,
0373 const char *pattern,
0374 const char *string);
0375
0376
0377 #define CURL_SEEKFUNC_OK 0
0378 #define CURL_SEEKFUNC_FAIL 1
0379 #define CURL_SEEKFUNC_CANTSEEK 2
0380
0381 typedef int (*curl_seek_callback)(void *instream,
0382 curl_off_t offset,
0383 int origin);
0384
0385
0386
0387 #define CURL_READFUNC_ABORT 0x10000000
0388
0389
0390 #define CURL_READFUNC_PAUSE 0x10000001
0391
0392
0393
0394 #define CURL_TRAILERFUNC_OK 0
0395
0396
0397 #define CURL_TRAILERFUNC_ABORT 1
0398
0399 typedef size_t (*curl_read_callback)(char *buffer,
0400 size_t size,
0401 size_t nitems,
0402 void *instream);
0403
0404 typedef int (*curl_trailer_callback)(struct curl_slist **list,
0405 void *userdata);
0406
0407 typedef enum {
0408 CURLSOCKTYPE_IPCXN,
0409 CURLSOCKTYPE_ACCEPT,
0410 CURLSOCKTYPE_LAST
0411 } curlsocktype;
0412
0413
0414
0415 #define CURL_SOCKOPT_OK 0
0416 #define CURL_SOCKOPT_ERROR 1
0417
0418 #define CURL_SOCKOPT_ALREADY_CONNECTED 2
0419
0420 typedef int (*curl_sockopt_callback)(void *clientp,
0421 curl_socket_t curlfd,
0422 curlsocktype purpose);
0423
0424 struct curl_sockaddr {
0425 int family;
0426 int socktype;
0427 int protocol;
0428 unsigned int addrlen;
0429
0430
0431 struct sockaddr addr;
0432 };
0433
0434 typedef curl_socket_t
0435 (*curl_opensocket_callback)(void *clientp,
0436 curlsocktype purpose,
0437 struct curl_sockaddr *address);
0438
0439 typedef int
0440 (*curl_closesocket_callback)(void *clientp, curl_socket_t item);
0441
0442 typedef enum {
0443 CURLIOE_OK,
0444 CURLIOE_UNKNOWNCMD,
0445 CURLIOE_FAILRESTART,
0446 CURLIOE_LAST
0447 } curlioerr;
0448
0449 typedef enum {
0450 CURLIOCMD_NOP,
0451 CURLIOCMD_RESTARTREAD,
0452 CURLIOCMD_LAST
0453 } curliocmd;
0454
0455 typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
0456 int cmd,
0457 void *clientp);
0458
0459 #ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS
0460
0461
0462
0463
0464
0465
0466 typedef void *(*curl_malloc_callback)(size_t size);
0467 typedef void (*curl_free_callback)(void *ptr);
0468 typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
0469 typedef char *(*curl_strdup_callback)(const char *str);
0470 typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
0471
0472 #define CURL_DID_MEMORY_FUNC_TYPEDEFS
0473 #endif
0474
0475
0476 typedef enum {
0477 CURLINFO_TEXT = 0,
0478 CURLINFO_HEADER_IN,
0479 CURLINFO_HEADER_OUT,
0480 CURLINFO_DATA_IN,
0481 CURLINFO_DATA_OUT,
0482 CURLINFO_SSL_DATA_IN,
0483 CURLINFO_SSL_DATA_OUT,
0484 CURLINFO_END
0485 } curl_infotype;
0486
0487 typedef int (*curl_debug_callback)
0488 (CURL *handle,
0489 curl_infotype type,
0490 char *data,
0491 size_t size,
0492 void *userptr);
0493
0494
0495 typedef int (*curl_prereq_callback)(void *clientp,
0496 char *conn_primary_ip,
0497 char *conn_local_ip,
0498 int conn_primary_port,
0499 int conn_local_port);
0500
0501
0502
0503 #define CURL_PREREQFUNC_OK 0
0504
0505
0506 #define CURL_PREREQFUNC_ABORT 1
0507
0508
0509
0510
0511
0512
0513
0514
0515 typedef enum {
0516 CURLE_OK = 0,
0517 CURLE_UNSUPPORTED_PROTOCOL,
0518 CURLE_FAILED_INIT,
0519 CURLE_URL_MALFORMAT,
0520 CURLE_NOT_BUILT_IN,
0521
0522 CURLE_COULDNT_RESOLVE_PROXY,
0523 CURLE_COULDNT_RESOLVE_HOST,
0524 CURLE_COULDNT_CONNECT,
0525 CURLE_WEIRD_SERVER_REPLY,
0526 CURLE_REMOTE_ACCESS_DENIED,
0527
0528
0529 CURLE_FTP_ACCEPT_FAILED,
0530
0531 CURLE_FTP_WEIRD_PASS_REPLY,
0532 CURLE_FTP_ACCEPT_TIMEOUT,
0533
0534
0535 CURLE_FTP_WEIRD_PASV_REPLY,
0536 CURLE_FTP_WEIRD_227_FORMAT,
0537 CURLE_FTP_CANT_GET_HOST,
0538 CURLE_HTTP2,
0539
0540
0541 CURLE_FTP_COULDNT_SET_TYPE,
0542 CURLE_PARTIAL_FILE,
0543 CURLE_FTP_COULDNT_RETR_FILE,
0544 CURLE_OBSOLETE20,
0545 CURLE_QUOTE_ERROR,
0546 CURLE_HTTP_RETURNED_ERROR,
0547 CURLE_WRITE_ERROR,
0548 CURLE_OBSOLETE24,
0549 CURLE_UPLOAD_FAILED,
0550 CURLE_READ_ERROR,
0551 CURLE_OUT_OF_MEMORY,
0552 CURLE_OPERATION_TIMEDOUT,
0553 CURLE_OBSOLETE29,
0554 CURLE_FTP_PORT_FAILED,
0555 CURLE_FTP_COULDNT_USE_REST,
0556 CURLE_OBSOLETE32,
0557 CURLE_RANGE_ERROR,
0558 CURLE_HTTP_POST_ERROR,
0559 CURLE_SSL_CONNECT_ERROR,
0560 CURLE_BAD_DOWNLOAD_RESUME,
0561 CURLE_FILE_COULDNT_READ_FILE,
0562 CURLE_LDAP_CANNOT_BIND,
0563 CURLE_LDAP_SEARCH_FAILED,
0564 CURLE_OBSOLETE40,
0565 CURLE_FUNCTION_NOT_FOUND,
0566 CURLE_ABORTED_BY_CALLBACK,
0567 CURLE_BAD_FUNCTION_ARGUMENT,
0568 CURLE_OBSOLETE44,
0569 CURLE_INTERFACE_FAILED,
0570 CURLE_OBSOLETE46,
0571 CURLE_TOO_MANY_REDIRECTS,
0572 CURLE_UNKNOWN_OPTION,
0573 CURLE_SETOPT_OPTION_SYNTAX,
0574 CURLE_OBSOLETE50,
0575 CURLE_OBSOLETE51,
0576 CURLE_GOT_NOTHING,
0577 CURLE_SSL_ENGINE_NOTFOUND,
0578 CURLE_SSL_ENGINE_SETFAILED,
0579
0580 CURLE_SEND_ERROR,
0581 CURLE_RECV_ERROR,
0582 CURLE_OBSOLETE57,
0583 CURLE_SSL_CERTPROBLEM,
0584 CURLE_SSL_CIPHER,
0585 CURLE_PEER_FAILED_VERIFICATION,
0586
0587 CURLE_BAD_CONTENT_ENCODING,
0588 CURLE_OBSOLETE62,
0589 CURLE_FILESIZE_EXCEEDED,
0590 CURLE_USE_SSL_FAILED,
0591 CURLE_SEND_FAIL_REWIND,
0592
0593 CURLE_SSL_ENGINE_INITFAILED,
0594 CURLE_LOGIN_DENIED,
0595
0596 CURLE_TFTP_NOTFOUND,
0597 CURLE_TFTP_PERM,
0598 CURLE_REMOTE_DISK_FULL,
0599 CURLE_TFTP_ILLEGAL,
0600 CURLE_TFTP_UNKNOWNID,
0601 CURLE_REMOTE_FILE_EXISTS,
0602 CURLE_TFTP_NOSUCHUSER,
0603 CURLE_OBSOLETE75,
0604 CURLE_OBSOLETE76,
0605 CURLE_SSL_CACERT_BADFILE,
0606
0607 CURLE_REMOTE_FILE_NOT_FOUND,
0608 CURLE_SSH,
0609
0610
0611
0612 CURLE_SSL_SHUTDOWN_FAILED,
0613
0614 CURLE_AGAIN,
0615
0616
0617 CURLE_SSL_CRL_BADFILE,
0618
0619 CURLE_SSL_ISSUER_ERROR,
0620
0621 CURLE_FTP_PRET_FAILED,
0622 CURLE_RTSP_CSEQ_ERROR,
0623 CURLE_RTSP_SESSION_ERROR,
0624 CURLE_FTP_BAD_FILE_LIST,
0625 CURLE_CHUNK_FAILED,
0626 CURLE_NO_CONNECTION_AVAILABLE,
0627
0628 CURLE_SSL_PINNEDPUBKEYNOTMATCH,
0629
0630 CURLE_SSL_INVALIDCERTSTATUS,
0631 CURLE_HTTP2_STREAM,
0632
0633 CURLE_RECURSIVE_API_CALL,
0634
0635 CURLE_AUTH_ERROR,
0636
0637 CURLE_HTTP3,
0638 CURLE_QUIC_CONNECT_ERROR,
0639 CURLE_PROXY,
0640 CURLE_SSL_CLIENTCERT,
0641 CURLE_UNRECOVERABLE_POLL,
0642 CURLE_TOO_LARGE,
0643 CURLE_ECH_REQUIRED,
0644 CURL_LAST
0645 } CURLcode;
0646
0647 #ifndef CURL_NO_OLDIES
0648
0649
0650
0651 #define CURLE_OBSOLETE16 CURLE_HTTP2
0652
0653
0654 #define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED
0655 #define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT
0656
0657
0658 #define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
0659 #define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY
0660
0661
0662 #define CURLE_SSL_CACERT CURLE_PEER_FAILED_VERIFICATION
0663
0664
0665 #define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
0666
0667
0668 #define CURLE_TELNET_OPTION_SYNTAX CURLE_SETOPT_OPTION_SYNTAX
0669
0670
0671
0672 #define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION
0673
0674
0675
0676 #define CURLE_OBSOLETE CURLE_OBSOLETE50
0677 #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46
0678 #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44
0679 #define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10
0680 #define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16
0681 #define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32
0682 #define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29
0683 #define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12
0684 #define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20
0685 #define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40
0686 #define CURLE_MALFORMAT_USER CURLE_OBSOLETE24
0687 #define CURLE_SHARE_IN_USE CURLE_OBSOLETE57
0688 #define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN
0689
0690 #define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED
0691 #define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE
0692 #define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR
0693 #define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL
0694 #define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS
0695 #define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR
0696 #define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED
0697
0698
0699
0700 #define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT
0701 #define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR
0702 #define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED
0703 #define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED
0704 #define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE
0705 #define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME
0706 #define CURLE_LDAP_INVALID_URL CURLE_OBSOLETE62
0707 #define CURLE_CONV_REQD CURLE_OBSOLETE76
0708 #define CURLE_CONV_FAILED CURLE_OBSOLETE75
0709
0710
0711
0712
0713 #define CURLE_ALREADY_COMPLETE 99999
0714
0715
0716 #define CURLOPT_FILE CURLOPT_WRITEDATA
0717 #define CURLOPT_INFILE CURLOPT_READDATA
0718 #define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA
0719
0720
0721
0722 #define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40
0723 #define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72
0724 #define CURLOPT_OBSOLETE72 9999
0725 #define CURLOPT_OBSOLETE40 9999
0726
0727 #endif
0728
0729
0730
0731
0732
0733 typedef enum {
0734 CURLPX_OK,
0735 CURLPX_BAD_ADDRESS_TYPE,
0736 CURLPX_BAD_VERSION,
0737 CURLPX_CLOSED,
0738 CURLPX_GSSAPI,
0739 CURLPX_GSSAPI_PERMSG,
0740 CURLPX_GSSAPI_PROTECTION,
0741 CURLPX_IDENTD,
0742 CURLPX_IDENTD_DIFFER,
0743 CURLPX_LONG_HOSTNAME,
0744 CURLPX_LONG_PASSWD,
0745 CURLPX_LONG_USER,
0746 CURLPX_NO_AUTH,
0747 CURLPX_RECV_ADDRESS,
0748 CURLPX_RECV_AUTH,
0749 CURLPX_RECV_CONNECT,
0750 CURLPX_RECV_REQACK,
0751 CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED,
0752 CURLPX_REPLY_COMMAND_NOT_SUPPORTED,
0753 CURLPX_REPLY_CONNECTION_REFUSED,
0754 CURLPX_REPLY_GENERAL_SERVER_FAILURE,
0755 CURLPX_REPLY_HOST_UNREACHABLE,
0756 CURLPX_REPLY_NETWORK_UNREACHABLE,
0757 CURLPX_REPLY_NOT_ALLOWED,
0758 CURLPX_REPLY_TTL_EXPIRED,
0759 CURLPX_REPLY_UNASSIGNED,
0760 CURLPX_REQUEST_FAILED,
0761 CURLPX_RESOLVE_HOST,
0762 CURLPX_SEND_AUTH,
0763 CURLPX_SEND_CONNECT,
0764 CURLPX_SEND_REQUEST,
0765 CURLPX_UNKNOWN_FAIL,
0766 CURLPX_UNKNOWN_MODE,
0767 CURLPX_USER_REJECTED,
0768 CURLPX_LAST
0769 } CURLproxycode;
0770
0771
0772 typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);
0773
0774 typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl,
0775 void *ssl_ctx,
0776
0777
0778
0779 void *userptr);
0780
0781 typedef enum {
0782 CURLPROXY_HTTP = 0,
0783
0784 CURLPROXY_HTTP_1_0 = 1,
0785
0786 CURLPROXY_HTTPS = 2,
0787 CURLPROXY_HTTPS2 = 3,
0788 CURLPROXY_SOCKS4 = 4,
0789
0790 CURLPROXY_SOCKS5 = 5,
0791 CURLPROXY_SOCKS4A = 6,
0792 CURLPROXY_SOCKS5_HOSTNAME = 7
0793
0794
0795 } curl_proxytype;
0796
0797
0798
0799
0800
0801
0802
0803
0804
0805
0806
0807
0808
0809
0810
0811
0812
0813
0814
0815 #define CURLAUTH_NONE ((unsigned long)0)
0816 #define CURLAUTH_BASIC (((unsigned long)1)<<0)
0817 #define CURLAUTH_DIGEST (((unsigned long)1)<<1)
0818 #define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2)
0819
0820 #define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE
0821
0822 #define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
0823 #define CURLAUTH_NTLM (((unsigned long)1)<<3)
0824 #define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4)
0825 #ifndef CURL_NO_OLDIES
0826
0827 #define CURLAUTH_NTLM_WB (((unsigned long)1)<<5)
0828 #endif
0829 #define CURLAUTH_BEARER (((unsigned long)1)<<6)
0830 #define CURLAUTH_AWS_SIGV4 (((unsigned long)1)<<7)
0831 #define CURLAUTH_ONLY (((unsigned long)1)<<31)
0832 #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
0833 #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
0834
0835 #define CURLSSH_AUTH_ANY ~0
0836 #define CURLSSH_AUTH_NONE 0
0837 #define CURLSSH_AUTH_PUBLICKEY (1<<0)
0838 #define CURLSSH_AUTH_PASSWORD (1<<1)
0839 #define CURLSSH_AUTH_HOST (1<<2)
0840 #define CURLSSH_AUTH_KEYBOARD (1<<3)
0841 #define CURLSSH_AUTH_AGENT (1<<4)
0842 #define CURLSSH_AUTH_GSSAPI (1<<5)
0843 #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
0844
0845 #define CURLGSSAPI_DELEGATION_NONE 0
0846 #define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0)
0847 #define CURLGSSAPI_DELEGATION_FLAG (1<<1)
0848
0849 #define CURL_ERROR_SIZE 256
0850
0851 enum curl_khtype {
0852 CURLKHTYPE_UNKNOWN,
0853 CURLKHTYPE_RSA1,
0854 CURLKHTYPE_RSA,
0855 CURLKHTYPE_DSS,
0856 CURLKHTYPE_ECDSA,
0857 CURLKHTYPE_ED25519
0858 };
0859
0860 struct curl_khkey {
0861 const char *key;
0862
0863 size_t len;
0864 enum curl_khtype keytype;
0865 };
0866
0867
0868
0869 enum curl_khstat {
0870 CURLKHSTAT_FINE_ADD_TO_FILE,
0871 CURLKHSTAT_FINE,
0872 CURLKHSTAT_REJECT,
0873 CURLKHSTAT_DEFER,
0874
0875
0876 CURLKHSTAT_FINE_REPLACE,
0877 CURLKHSTAT_LAST
0878 };
0879
0880
0881 enum curl_khmatch {
0882 CURLKHMATCH_OK,
0883 CURLKHMATCH_MISMATCH,
0884 CURLKHMATCH_MISSING,
0885 CURLKHMATCH_LAST
0886 };
0887
0888 typedef int
0889 (*curl_sshkeycallback) (CURL *easy,
0890 const struct curl_khkey *knownkey,
0891 const struct curl_khkey *foundkey,
0892 enum curl_khmatch,
0893 void *clientp);
0894
0895
0896 typedef int
0897 (*curl_sshhostkeycallback) (void *clientp,
0898
0899 int keytype,
0900 const char *key,
0901 size_t keylen);
0902
0903
0904
0905
0906
0907 typedef enum {
0908 CURLUSESSL_NONE,
0909 CURLUSESSL_TRY,
0910 CURLUSESSL_CONTROL,
0911 CURLUSESSL_ALL,
0912 CURLUSESSL_LAST
0913 } curl_usessl;
0914
0915
0916
0917
0918
0919
0920
0921
0922 #define CURLSSLOPT_ALLOW_BEAST (1<<0)
0923
0924
0925
0926 #define CURLSSLOPT_NO_REVOKE (1<<1)
0927
0928
0929
0930 #define CURLSSLOPT_NO_PARTIALCHAIN (1<<2)
0931
0932
0933
0934
0935 #define CURLSSLOPT_REVOKE_BEST_EFFORT (1<<3)
0936
0937
0938
0939 #define CURLSSLOPT_NATIVE_CA (1<<4)
0940
0941
0942
0943 #define CURLSSLOPT_AUTO_CLIENT_CERT (1<<5)
0944
0945
0946
0947
0948 #define CURL_HET_DEFAULT 200L
0949
0950
0951 #define CURL_UPKEEP_INTERVAL_DEFAULT 60000L
0952
0953 #ifndef CURL_NO_OLDIES
0954
0955
0956
0957
0958
0959 #define CURLFTPSSL_NONE CURLUSESSL_NONE
0960 #define CURLFTPSSL_TRY CURLUSESSL_TRY
0961 #define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL
0962 #define CURLFTPSSL_ALL CURLUSESSL_ALL
0963 #define CURLFTPSSL_LAST CURLUSESSL_LAST
0964 #define curl_ftpssl curl_usessl
0965 #endif
0966
0967
0968 typedef enum {
0969 CURLFTPSSL_CCC_NONE,
0970 CURLFTPSSL_CCC_PASSIVE,
0971 CURLFTPSSL_CCC_ACTIVE,
0972 CURLFTPSSL_CCC_LAST
0973 } curl_ftpccc;
0974
0975
0976 typedef enum {
0977 CURLFTPAUTH_DEFAULT,
0978 CURLFTPAUTH_SSL,
0979 CURLFTPAUTH_TLS,
0980 CURLFTPAUTH_LAST
0981 } curl_ftpauth;
0982
0983
0984 typedef enum {
0985 CURLFTP_CREATE_DIR_NONE,
0986 CURLFTP_CREATE_DIR,
0987
0988
0989 CURLFTP_CREATE_DIR_RETRY,
0990
0991 CURLFTP_CREATE_DIR_LAST
0992 } curl_ftpcreatedir;
0993
0994
0995 typedef enum {
0996 CURLFTPMETHOD_DEFAULT,
0997 CURLFTPMETHOD_MULTICWD,
0998 CURLFTPMETHOD_NOCWD,
0999 CURLFTPMETHOD_SINGLECWD,
1000 CURLFTPMETHOD_LAST
1001 } curl_ftpmethod;
1002
1003
1004 #define CURLHEADER_UNIFIED 0
1005 #define CURLHEADER_SEPARATE (1<<0)
1006
1007
1008 #define CURLALTSVC_READONLYFILE (1<<2)
1009 #define CURLALTSVC_H1 (1<<3)
1010 #define CURLALTSVC_H2 (1<<4)
1011 #define CURLALTSVC_H3 (1<<5)
1012
1013
1014 struct curl_hstsentry {
1015 char *name;
1016 size_t namelen;
1017 unsigned int includeSubDomains:1;
1018 char expire[18];
1019 };
1020
1021 struct curl_index {
1022 size_t index;
1023 size_t total;
1024 };
1025
1026 typedef enum {
1027 CURLSTS_OK,
1028 CURLSTS_DONE,
1029 CURLSTS_FAIL
1030 } CURLSTScode;
1031
1032 typedef CURLSTScode (*curl_hstsread_callback)(CURL *easy,
1033 struct curl_hstsentry *e,
1034 void *userp);
1035 typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
1036 struct curl_hstsentry *e,
1037 struct curl_index *i,
1038 void *userp);
1039
1040
1041 #define CURLHSTS_ENABLE (long)(1<<0)
1042 #define CURLHSTS_READONLYFILE (long)(1<<1)
1043
1044
1045
1046 #define CURLPROTO_HTTP (1<<0)
1047 #define CURLPROTO_HTTPS (1<<1)
1048 #define CURLPROTO_FTP (1<<2)
1049 #define CURLPROTO_FTPS (1<<3)
1050 #define CURLPROTO_SCP (1<<4)
1051 #define CURLPROTO_SFTP (1<<5)
1052 #define CURLPROTO_TELNET (1<<6)
1053 #define CURLPROTO_LDAP (1<<7)
1054 #define CURLPROTO_LDAPS (1<<8)
1055 #define CURLPROTO_DICT (1<<9)
1056 #define CURLPROTO_FILE (1<<10)
1057 #define CURLPROTO_TFTP (1<<11)
1058 #define CURLPROTO_IMAP (1<<12)
1059 #define CURLPROTO_IMAPS (1<<13)
1060 #define CURLPROTO_POP3 (1<<14)
1061 #define CURLPROTO_POP3S (1<<15)
1062 #define CURLPROTO_SMTP (1<<16)
1063 #define CURLPROTO_SMTPS (1<<17)
1064 #define CURLPROTO_RTSP (1<<18)
1065 #define CURLPROTO_RTMP (1<<19)
1066 #define CURLPROTO_RTMPT (1<<20)
1067 #define CURLPROTO_RTMPE (1<<21)
1068 #define CURLPROTO_RTMPTE (1<<22)
1069 #define CURLPROTO_RTMPS (1<<23)
1070 #define CURLPROTO_RTMPTS (1<<24)
1071 #define CURLPROTO_GOPHER (1<<25)
1072 #define CURLPROTO_SMB (1<<26)
1073 #define CURLPROTO_SMBS (1<<27)
1074 #define CURLPROTO_MQTT (1<<28)
1075 #define CURLPROTO_GOPHERS (1<<29)
1076 #define CURLPROTO_ALL (~0)
1077
1078
1079
1080 #define CURLOPTTYPE_LONG 0
1081 #define CURLOPTTYPE_OBJECTPOINT 10000
1082 #define CURLOPTTYPE_FUNCTIONPOINT 20000
1083 #define CURLOPTTYPE_OFF_T 30000
1084 #define CURLOPTTYPE_BLOB 40000
1085
1086
1087
1088
1089
1090 #define CURLOPT(na,t,nu) na = t + nu
1091 #define CURLOPTDEPRECATED(na,t,nu,v,m) na CURL_DEPRECATED(v,m) = t + nu
1092
1093
1094
1095
1096 #define CURLOPTTYPE_STRINGPOINT CURLOPTTYPE_OBJECTPOINT
1097
1098
1099 #define CURLOPTTYPE_SLISTPOINT CURLOPTTYPE_OBJECTPOINT
1100
1101
1102 #define CURLOPTTYPE_CBPOINT CURLOPTTYPE_OBJECTPOINT
1103
1104
1105 #define CURLOPTTYPE_VALUES CURLOPTTYPE_LONG
1106
1107
1108
1109
1110
1111 typedef enum {
1112
1113 CURLOPT(CURLOPT_WRITEDATA, CURLOPTTYPE_CBPOINT, 1),
1114
1115
1116 CURLOPT(CURLOPT_URL, CURLOPTTYPE_STRINGPOINT, 2),
1117
1118
1119 CURLOPT(CURLOPT_PORT, CURLOPTTYPE_LONG, 3),
1120
1121
1122 CURLOPT(CURLOPT_PROXY, CURLOPTTYPE_STRINGPOINT, 4),
1123
1124
1125 CURLOPT(CURLOPT_USERPWD, CURLOPTTYPE_STRINGPOINT, 5),
1126
1127
1128 CURLOPT(CURLOPT_PROXYUSERPWD, CURLOPTTYPE_STRINGPOINT, 6),
1129
1130
1131 CURLOPT(CURLOPT_RANGE, CURLOPTTYPE_STRINGPOINT, 7),
1132
1133
1134
1135
1136 CURLOPT(CURLOPT_READDATA, CURLOPTTYPE_CBPOINT, 9),
1137
1138
1139
1140 CURLOPT(CURLOPT_ERRORBUFFER, CURLOPTTYPE_OBJECTPOINT, 10),
1141
1142
1143
1144 CURLOPT(CURLOPT_WRITEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 11),
1145
1146
1147
1148 CURLOPT(CURLOPT_READFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 12),
1149
1150
1151 CURLOPT(CURLOPT_TIMEOUT, CURLOPTTYPE_LONG, 13),
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162 CURLOPT(CURLOPT_INFILESIZE, CURLOPTTYPE_LONG, 14),
1163
1164
1165 CURLOPT(CURLOPT_POSTFIELDS, CURLOPTTYPE_OBJECTPOINT, 15),
1166
1167
1168 CURLOPT(CURLOPT_REFERER, CURLOPTTYPE_STRINGPOINT, 16),
1169
1170
1171
1172 CURLOPT(CURLOPT_FTPPORT, CURLOPTTYPE_STRINGPOINT, 17),
1173
1174
1175 CURLOPT(CURLOPT_USERAGENT, CURLOPTTYPE_STRINGPOINT, 18),
1176
1177
1178
1179
1180
1181
1182
1183
1184 CURLOPT(CURLOPT_LOW_SPEED_LIMIT, CURLOPTTYPE_LONG, 19),
1185
1186
1187 CURLOPT(CURLOPT_LOW_SPEED_TIME, CURLOPTTYPE_LONG, 20),
1188
1189
1190
1191
1192
1193
1194
1195 CURLOPT(CURLOPT_RESUME_FROM, CURLOPTTYPE_LONG, 21),
1196
1197
1198 CURLOPT(CURLOPT_COOKIE, CURLOPTTYPE_STRINGPOINT, 22),
1199
1200
1201
1202 CURLOPT(CURLOPT_HTTPHEADER, CURLOPTTYPE_SLISTPOINT, 23),
1203
1204
1205 CURLOPTDEPRECATED(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24,
1206 7.56.0, "Use CURLOPT_MIMEPOST"),
1207
1208
1209 CURLOPT(CURLOPT_SSLCERT, CURLOPTTYPE_STRINGPOINT, 25),
1210
1211
1212 CURLOPT(CURLOPT_KEYPASSWD, CURLOPTTYPE_STRINGPOINT, 26),
1213
1214
1215 CURLOPT(CURLOPT_CRLF, CURLOPTTYPE_LONG, 27),
1216
1217
1218 CURLOPT(CURLOPT_QUOTE, CURLOPTTYPE_SLISTPOINT, 28),
1219
1220
1221
1222 CURLOPT(CURLOPT_HEADERDATA, CURLOPTTYPE_CBPOINT, 29),
1223
1224
1225
1226 CURLOPT(CURLOPT_COOKIEFILE, CURLOPTTYPE_STRINGPOINT, 31),
1227
1228
1229
1230 CURLOPT(CURLOPT_SSLVERSION, CURLOPTTYPE_VALUES, 32),
1231
1232
1233 CURLOPT(CURLOPT_TIMECONDITION, CURLOPTTYPE_VALUES, 33),
1234
1235
1236
1237 CURLOPT(CURLOPT_TIMEVALUE, CURLOPTTYPE_LONG, 34),
1238
1239
1240
1241
1242
1243
1244
1245 CURLOPT(CURLOPT_CUSTOMREQUEST, CURLOPTTYPE_STRINGPOINT, 36),
1246
1247
1248 CURLOPT(CURLOPT_STDERR, CURLOPTTYPE_OBJECTPOINT, 37),
1249
1250
1251
1252
1253 CURLOPT(CURLOPT_POSTQUOTE, CURLOPTTYPE_SLISTPOINT, 39),
1254
1255
1256
1257
1258 CURLOPT(CURLOPT_VERBOSE, CURLOPTTYPE_LONG, 41),
1259
1260
1261 CURLOPT(CURLOPT_HEADER, CURLOPTTYPE_LONG, 42),
1262
1263
1264 CURLOPT(CURLOPT_NOPROGRESS, CURLOPTTYPE_LONG, 43),
1265
1266
1267 CURLOPT(CURLOPT_NOBODY, CURLOPTTYPE_LONG, 44),
1268
1269
1270 CURLOPT(CURLOPT_FAILONERROR, CURLOPTTYPE_LONG, 45),
1271
1272
1273 CURLOPT(CURLOPT_UPLOAD, CURLOPTTYPE_LONG, 46),
1274
1275
1276 CURLOPT(CURLOPT_POST, CURLOPTTYPE_LONG, 47),
1277
1278
1279 CURLOPT(CURLOPT_DIRLISTONLY, CURLOPTTYPE_LONG, 48),
1280
1281
1282 CURLOPT(CURLOPT_APPEND, CURLOPTTYPE_LONG, 50),
1283
1284
1285
1286 CURLOPT(CURLOPT_NETRC, CURLOPTTYPE_VALUES, 51),
1287
1288
1289 CURLOPT(CURLOPT_FOLLOWLOCATION, CURLOPTTYPE_LONG, 52),
1290
1291
1292 CURLOPT(CURLOPT_TRANSFERTEXT, CURLOPTTYPE_LONG, 53),
1293
1294
1295 CURLOPTDEPRECATED(CURLOPT_PUT, CURLOPTTYPE_LONG, 54,
1296 7.12.1, "Use CURLOPT_UPLOAD"),
1297
1298
1299
1300
1301
1302
1303
1304 CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
1305 7.32.0, "Use CURLOPT_XFERINFOFUNCTION"),
1306
1307
1308
1309 CURLOPT(CURLOPT_XFERINFODATA, CURLOPTTYPE_CBPOINT, 57),
1310 #define CURLOPT_PROGRESSDATA CURLOPT_XFERINFODATA
1311
1312
1313 CURLOPT(CURLOPT_AUTOREFERER, CURLOPTTYPE_LONG, 58),
1314
1315
1316
1317 CURLOPT(CURLOPT_PROXYPORT, CURLOPTTYPE_LONG, 59),
1318
1319
1320 CURLOPT(CURLOPT_POSTFIELDSIZE, CURLOPTTYPE_LONG, 60),
1321
1322
1323 CURLOPT(CURLOPT_HTTPPROXYTUNNEL, CURLOPTTYPE_LONG, 61),
1324
1325
1326 CURLOPT(CURLOPT_INTERFACE, CURLOPTTYPE_STRINGPOINT, 62),
1327
1328
1329
1330
1331 CURLOPT(CURLOPT_KRBLEVEL, CURLOPTTYPE_STRINGPOINT, 63),
1332
1333
1334 CURLOPT(CURLOPT_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 64),
1335
1336
1337
1338 CURLOPT(CURLOPT_CAINFO, CURLOPTTYPE_STRINGPOINT, 65),
1339
1340
1341
1342
1343
1344 CURLOPT(CURLOPT_MAXREDIRS, CURLOPTTYPE_LONG, 68),
1345
1346
1347
1348 CURLOPT(CURLOPT_FILETIME, CURLOPTTYPE_LONG, 69),
1349
1350
1351 CURLOPT(CURLOPT_TELNETOPTIONS, CURLOPTTYPE_SLISTPOINT, 70),
1352
1353
1354 CURLOPT(CURLOPT_MAXCONNECTS, CURLOPTTYPE_LONG, 71),
1355
1356
1357
1358
1359
1360
1361
1362 CURLOPT(CURLOPT_FRESH_CONNECT, CURLOPTTYPE_LONG, 74),
1363
1364
1365
1366
1367 CURLOPT(CURLOPT_FORBID_REUSE, CURLOPTTYPE_LONG, 75),
1368
1369
1370
1371 CURLOPTDEPRECATED(CURLOPT_RANDOM_FILE, CURLOPTTYPE_STRINGPOINT, 76,
1372 7.84.0, "Serves no purpose anymore"),
1373
1374
1375 CURLOPTDEPRECATED(CURLOPT_EGDSOCKET, CURLOPTTYPE_STRINGPOINT, 77,
1376 7.84.0, "Serves no purpose anymore"),
1377
1378
1379
1380 CURLOPT(CURLOPT_CONNECTTIMEOUT, CURLOPTTYPE_LONG, 78),
1381
1382
1383
1384 CURLOPT(CURLOPT_HEADERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 79),
1385
1386
1387
1388
1389 CURLOPT(CURLOPT_HTTPGET, CURLOPTTYPE_LONG, 80),
1390
1391
1392
1393
1394 CURLOPT(CURLOPT_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 81),
1395
1396
1397
1398 CURLOPT(CURLOPT_COOKIEJAR, CURLOPTTYPE_STRINGPOINT, 82),
1399
1400
1401 CURLOPT(CURLOPT_SSL_CIPHER_LIST, CURLOPTTYPE_STRINGPOINT, 83),
1402
1403
1404
1405 CURLOPT(CURLOPT_HTTP_VERSION, CURLOPTTYPE_VALUES, 84),
1406
1407
1408
1409
1410 CURLOPT(CURLOPT_FTP_USE_EPSV, CURLOPTTYPE_LONG, 85),
1411
1412
1413 CURLOPT(CURLOPT_SSLCERTTYPE, CURLOPTTYPE_STRINGPOINT, 86),
1414
1415
1416 CURLOPT(CURLOPT_SSLKEY, CURLOPTTYPE_STRINGPOINT, 87),
1417
1418
1419 CURLOPT(CURLOPT_SSLKEYTYPE, CURLOPTTYPE_STRINGPOINT, 88),
1420
1421
1422 CURLOPT(CURLOPT_SSLENGINE, CURLOPTTYPE_STRINGPOINT, 89),
1423
1424
1425
1426
1427 CURLOPT(CURLOPT_SSLENGINE_DEFAULT, CURLOPTTYPE_LONG, 90),
1428
1429
1430
1431 CURLOPTDEPRECATED(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91,
1432 7.11.1, "Use CURLOPT_SHARE"),
1433
1434
1435 CURLOPT(CURLOPT_DNS_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 92),
1436
1437
1438 CURLOPT(CURLOPT_PREQUOTE, CURLOPTTYPE_SLISTPOINT, 93),
1439
1440
1441 CURLOPT(CURLOPT_DEBUGFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 94),
1442
1443
1444 CURLOPT(CURLOPT_DEBUGDATA, CURLOPTTYPE_CBPOINT, 95),
1445
1446
1447 CURLOPT(CURLOPT_COOKIESESSION, CURLOPTTYPE_LONG, 96),
1448
1449
1450
1451 CURLOPT(CURLOPT_CAPATH, CURLOPTTYPE_STRINGPOINT, 97),
1452
1453
1454 CURLOPT(CURLOPT_BUFFERSIZE, CURLOPTTYPE_LONG, 98),
1455
1456
1457
1458
1459 CURLOPT(CURLOPT_NOSIGNAL, CURLOPTTYPE_LONG, 99),
1460
1461
1462 CURLOPT(CURLOPT_SHARE, CURLOPTTYPE_OBJECTPOINT, 100),
1463
1464
1465
1466
1467 CURLOPT(CURLOPT_PROXYTYPE, CURLOPTTYPE_VALUES, 101),
1468
1469
1470
1471
1472 CURLOPT(CURLOPT_ACCEPT_ENCODING, CURLOPTTYPE_STRINGPOINT, 102),
1473
1474
1475 CURLOPT(CURLOPT_PRIVATE, CURLOPTTYPE_OBJECTPOINT, 103),
1476
1477
1478 CURLOPT(CURLOPT_HTTP200ALIASES, CURLOPTTYPE_SLISTPOINT, 104),
1479
1480
1481
1482
1483 CURLOPT(CURLOPT_UNRESTRICTED_AUTH, CURLOPTTYPE_LONG, 105),
1484
1485
1486
1487
1488 CURLOPT(CURLOPT_FTP_USE_EPRT, CURLOPTTYPE_LONG, 106),
1489
1490
1491
1492
1493 CURLOPT(CURLOPT_HTTPAUTH, CURLOPTTYPE_VALUES, 107),
1494
1495
1496
1497
1498 CURLOPT(CURLOPT_SSL_CTX_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 108),
1499
1500
1501
1502 CURLOPT(CURLOPT_SSL_CTX_DATA, CURLOPTTYPE_CBPOINT, 109),
1503
1504
1505
1506
1507
1508 CURLOPT(CURLOPT_FTP_CREATE_MISSING_DIRS, CURLOPTTYPE_LONG, 110),
1509
1510
1511
1512
1513 CURLOPT(CURLOPT_PROXYAUTH, CURLOPTTYPE_VALUES, 111),
1514
1515
1516
1517
1518
1519 CURLOPT(CURLOPT_SERVER_RESPONSE_TIMEOUT, CURLOPTTYPE_LONG, 112),
1520
1521
1522
1523
1524 CURLOPT(CURLOPT_IPRESOLVE, CURLOPTTYPE_VALUES, 113),
1525
1526
1527
1528
1529
1530
1531 CURLOPT(CURLOPT_MAXFILESIZE, CURLOPTTYPE_LONG, 114),
1532
1533
1534
1535
1536 CURLOPT(CURLOPT_INFILESIZE_LARGE, CURLOPTTYPE_OFF_T, 115),
1537
1538
1539
1540
1541 CURLOPT(CURLOPT_RESUME_FROM_LARGE, CURLOPTTYPE_OFF_T, 116),
1542
1543
1544
1545
1546 CURLOPT(CURLOPT_MAXFILESIZE_LARGE, CURLOPTTYPE_OFF_T, 117),
1547
1548
1549
1550
1551
1552 CURLOPT(CURLOPT_NETRC_FILE, CURLOPTTYPE_STRINGPOINT, 118),
1553
1554
1555
1556
1557
1558
1559 CURLOPT(CURLOPT_USE_SSL, CURLOPTTYPE_VALUES, 119),
1560
1561
1562 CURLOPT(CURLOPT_POSTFIELDSIZE_LARGE, CURLOPTTYPE_OFF_T, 120),
1563
1564
1565 CURLOPT(CURLOPT_TCP_NODELAY, CURLOPTTYPE_LONG, 121),
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585 CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_VALUES, 129),
1586
1587 CURLOPTDEPRECATED(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130,
1588 7.18.0, "Use CURLOPT_SEEKFUNCTION"),
1589 CURLOPTDEPRECATED(CURLOPT_IOCTLDATA, CURLOPTTYPE_CBPOINT, 131,
1590 7.18.0, "Use CURLOPT_SEEKDATA"),
1591
1592
1593
1594
1595
1596
1597 CURLOPT(CURLOPT_FTP_ACCOUNT, CURLOPTTYPE_STRINGPOINT, 134),
1598
1599
1600 CURLOPT(CURLOPT_COOKIELIST, CURLOPTTYPE_STRINGPOINT, 135),
1601
1602
1603 CURLOPT(CURLOPT_IGNORE_CONTENT_LENGTH, CURLOPTTYPE_LONG, 136),
1604
1605
1606
1607
1608
1609 CURLOPT(CURLOPT_FTP_SKIP_PASV_IP, CURLOPTTYPE_LONG, 137),
1610
1611
1612
1613 CURLOPT(CURLOPT_FTP_FILEMETHOD, CURLOPTTYPE_VALUES, 138),
1614
1615
1616 CURLOPT(CURLOPT_LOCALPORT, CURLOPTTYPE_LONG, 139),
1617
1618
1619
1620
1621 CURLOPT(CURLOPT_LOCALPORTRANGE, CURLOPTTYPE_LONG, 140),
1622
1623
1624
1625 CURLOPT(CURLOPT_CONNECT_ONLY, CURLOPTTYPE_LONG, 141),
1626
1627
1628
1629 CURLOPTDEPRECATED(CURLOPT_CONV_FROM_NETWORK_FUNCTION,
1630 CURLOPTTYPE_FUNCTIONPOINT, 142,
1631 7.82.0, "Serves no purpose anymore"),
1632
1633
1634
1635 CURLOPTDEPRECATED(CURLOPT_CONV_TO_NETWORK_FUNCTION,
1636 CURLOPTTYPE_FUNCTIONPOINT, 143,
1637 7.82.0, "Serves no purpose anymore"),
1638
1639
1640
1641
1642 CURLOPTDEPRECATED(CURLOPT_CONV_FROM_UTF8_FUNCTION,
1643 CURLOPTTYPE_FUNCTIONPOINT, 144,
1644 7.82.0, "Serves no purpose anymore"),
1645
1646
1647
1648 CURLOPT(CURLOPT_MAX_SEND_SPEED_LARGE, CURLOPTTYPE_OFF_T, 145),
1649 CURLOPT(CURLOPT_MAX_RECV_SPEED_LARGE, CURLOPTTYPE_OFF_T, 146),
1650
1651
1652 CURLOPT(CURLOPT_FTP_ALTERNATIVE_TO_USER, CURLOPTTYPE_STRINGPOINT, 147),
1653
1654
1655 CURLOPT(CURLOPT_SOCKOPTFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 148),
1656 CURLOPT(CURLOPT_SOCKOPTDATA, CURLOPTTYPE_CBPOINT, 149),
1657
1658
1659
1660 CURLOPT(CURLOPT_SSL_SESSIONID_CACHE, CURLOPTTYPE_LONG, 150),
1661
1662
1663 CURLOPT(CURLOPT_SSH_AUTH_TYPES, CURLOPTTYPE_VALUES, 151),
1664
1665
1666 CURLOPT(CURLOPT_SSH_PUBLIC_KEYFILE, CURLOPTTYPE_STRINGPOINT, 152),
1667 CURLOPT(CURLOPT_SSH_PRIVATE_KEYFILE, CURLOPTTYPE_STRINGPOINT, 153),
1668
1669
1670 CURLOPT(CURLOPT_FTP_SSL_CCC, CURLOPTTYPE_LONG, 154),
1671
1672
1673 CURLOPT(CURLOPT_TIMEOUT_MS, CURLOPTTYPE_LONG, 155),
1674 CURLOPT(CURLOPT_CONNECTTIMEOUT_MS, CURLOPTTYPE_LONG, 156),
1675
1676
1677
1678 CURLOPT(CURLOPT_HTTP_TRANSFER_DECODING, CURLOPTTYPE_LONG, 157),
1679 CURLOPT(CURLOPT_HTTP_CONTENT_DECODING, CURLOPTTYPE_LONG, 158),
1680
1681
1682
1683 CURLOPT(CURLOPT_NEW_FILE_PERMS, CURLOPTTYPE_LONG, 159),
1684 CURLOPT(CURLOPT_NEW_DIRECTORY_PERMS, CURLOPTTYPE_LONG, 160),
1685
1686
1687
1688 CURLOPT(CURLOPT_POSTREDIR, CURLOPTTYPE_VALUES, 161),
1689
1690
1691 CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5, CURLOPTTYPE_STRINGPOINT, 162),
1692
1693
1694
1695
1696
1697 CURLOPT(CURLOPT_OPENSOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 163),
1698 CURLOPT(CURLOPT_OPENSOCKETDATA, CURLOPTTYPE_CBPOINT, 164),
1699
1700
1701 CURLOPT(CURLOPT_COPYPOSTFIELDS, CURLOPTTYPE_OBJECTPOINT, 165),
1702
1703
1704 CURLOPT(CURLOPT_PROXY_TRANSFER_MODE, CURLOPTTYPE_LONG, 166),
1705
1706
1707 CURLOPT(CURLOPT_SEEKFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 167),
1708 CURLOPT(CURLOPT_SEEKDATA, CURLOPTTYPE_CBPOINT, 168),
1709
1710
1711 CURLOPT(CURLOPT_CRLFILE, CURLOPTTYPE_STRINGPOINT, 169),
1712
1713
1714 CURLOPT(CURLOPT_ISSUERCERT, CURLOPTTYPE_STRINGPOINT, 170),
1715
1716
1717 CURLOPT(CURLOPT_ADDRESS_SCOPE, CURLOPTTYPE_LONG, 171),
1718
1719
1720
1721 CURLOPT(CURLOPT_CERTINFO, CURLOPTTYPE_LONG, 172),
1722
1723
1724 CURLOPT(CURLOPT_USERNAME, CURLOPTTYPE_STRINGPOINT, 173),
1725 CURLOPT(CURLOPT_PASSWORD, CURLOPTTYPE_STRINGPOINT, 174),
1726
1727
1728 CURLOPT(CURLOPT_PROXYUSERNAME, CURLOPTTYPE_STRINGPOINT, 175),
1729 CURLOPT(CURLOPT_PROXYPASSWORD, CURLOPTTYPE_STRINGPOINT, 176),
1730
1731
1732
1733
1734
1735
1736
1737
1738 CURLOPT(CURLOPT_NOPROXY, CURLOPTTYPE_STRINGPOINT, 177),
1739
1740
1741 CURLOPT(CURLOPT_TFTP_BLKSIZE, CURLOPTTYPE_LONG, 178),
1742
1743
1744
1745 CURLOPTDEPRECATED(CURLOPT_SOCKS5_GSSAPI_SERVICE,
1746 CURLOPTTYPE_STRINGPOINT, 179,
1747 7.49.0, "Use CURLOPT_PROXY_SERVICE_NAME"),
1748
1749
1750 CURLOPT(CURLOPT_SOCKS5_GSSAPI_NEC, CURLOPTTYPE_LONG, 180),
1751
1752
1753
1754
1755
1756 CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
1757 7.85.0, "Use CURLOPT_PROTOCOLS_STR"),
1758
1759
1760
1761
1762 CURLOPTDEPRECATED(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182,
1763 7.85.0, "Use CURLOPT_REDIR_PROTOCOLS_STR"),
1764
1765
1766 CURLOPT(CURLOPT_SSH_KNOWNHOSTS, CURLOPTTYPE_STRINGPOINT, 183),
1767
1768
1769
1770 CURLOPT(CURLOPT_SSH_KEYFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 184),
1771
1772
1773 CURLOPT(CURLOPT_SSH_KEYDATA, CURLOPTTYPE_CBPOINT, 185),
1774
1775
1776 CURLOPT(CURLOPT_MAIL_FROM, CURLOPTTYPE_STRINGPOINT, 186),
1777
1778
1779 CURLOPT(CURLOPT_MAIL_RCPT, CURLOPTTYPE_SLISTPOINT, 187),
1780
1781
1782 CURLOPT(CURLOPT_FTP_USE_PRET, CURLOPTTYPE_LONG, 188),
1783
1784
1785 CURLOPT(CURLOPT_RTSP_REQUEST, CURLOPTTYPE_VALUES, 189),
1786
1787
1788 CURLOPT(CURLOPT_RTSP_SESSION_ID, CURLOPTTYPE_STRINGPOINT, 190),
1789
1790
1791 CURLOPT(CURLOPT_RTSP_STREAM_URI, CURLOPTTYPE_STRINGPOINT, 191),
1792
1793
1794 CURLOPT(CURLOPT_RTSP_TRANSPORT, CURLOPTTYPE_STRINGPOINT, 192),
1795
1796
1797 CURLOPT(CURLOPT_RTSP_CLIENT_CSEQ, CURLOPTTYPE_LONG, 193),
1798
1799
1800 CURLOPT(CURLOPT_RTSP_SERVER_CSEQ, CURLOPTTYPE_LONG, 194),
1801
1802
1803 CURLOPT(CURLOPT_INTERLEAVEDATA, CURLOPTTYPE_CBPOINT, 195),
1804
1805
1806 CURLOPT(CURLOPT_INTERLEAVEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 196),
1807
1808
1809 CURLOPT(CURLOPT_WILDCARDMATCH, CURLOPTTYPE_LONG, 197),
1810
1811
1812
1813 CURLOPT(CURLOPT_CHUNK_BGN_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 198),
1814
1815
1816
1817 CURLOPT(CURLOPT_CHUNK_END_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 199),
1818
1819
1820 CURLOPT(CURLOPT_FNMATCH_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 200),
1821
1822
1823 CURLOPT(CURLOPT_CHUNK_DATA, CURLOPTTYPE_CBPOINT, 201),
1824
1825
1826 CURLOPT(CURLOPT_FNMATCH_DATA, CURLOPTTYPE_CBPOINT, 202),
1827
1828
1829 CURLOPT(CURLOPT_RESOLVE, CURLOPTTYPE_SLISTPOINT, 203),
1830
1831
1832 CURLOPT(CURLOPT_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 204),
1833
1834
1835 CURLOPT(CURLOPT_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 205),
1836
1837
1838 CURLOPT(CURLOPT_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 206),
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850 CURLOPT(CURLOPT_TRANSFER_ENCODING, CURLOPTTYPE_LONG, 207),
1851
1852
1853
1854 CURLOPT(CURLOPT_CLOSESOCKETFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 208),
1855 CURLOPT(CURLOPT_CLOSESOCKETDATA, CURLOPTTYPE_CBPOINT, 209),
1856
1857
1858 CURLOPT(CURLOPT_GSSAPI_DELEGATION, CURLOPTTYPE_VALUES, 210),
1859
1860
1861
1862 CURLOPT(CURLOPT_DNS_SERVERS, CURLOPTTYPE_STRINGPOINT, 211),
1863
1864
1865
1866 CURLOPT(CURLOPT_ACCEPTTIMEOUT_MS, CURLOPTTYPE_LONG, 212),
1867
1868
1869 CURLOPT(CURLOPT_TCP_KEEPALIVE, CURLOPTTYPE_LONG, 213),
1870
1871
1872 CURLOPT(CURLOPT_TCP_KEEPIDLE, CURLOPTTYPE_LONG, 214),
1873 CURLOPT(CURLOPT_TCP_KEEPINTVL, CURLOPTTYPE_LONG, 215),
1874
1875
1876 CURLOPT(CURLOPT_SSL_OPTIONS, CURLOPTTYPE_VALUES, 216),
1877
1878
1879 CURLOPT(CURLOPT_MAIL_AUTH, CURLOPTTYPE_STRINGPOINT, 217),
1880
1881
1882 CURLOPT(CURLOPT_SASL_IR, CURLOPTTYPE_LONG, 218),
1883
1884
1885
1886
1887 CURLOPT(CURLOPT_XFERINFOFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 219),
1888
1889
1890 CURLOPT(CURLOPT_XOAUTH2_BEARER, CURLOPTTYPE_STRINGPOINT, 220),
1891
1892
1893
1894
1895 CURLOPT(CURLOPT_DNS_INTERFACE, CURLOPTTYPE_STRINGPOINT, 221),
1896
1897
1898
1899 CURLOPT(CURLOPT_DNS_LOCAL_IP4, CURLOPTTYPE_STRINGPOINT, 222),
1900
1901
1902
1903 CURLOPT(CURLOPT_DNS_LOCAL_IP6, CURLOPTTYPE_STRINGPOINT, 223),
1904
1905
1906 CURLOPT(CURLOPT_LOGIN_OPTIONS, CURLOPTTYPE_STRINGPOINT, 224),
1907
1908
1909 CURLOPTDEPRECATED(CURLOPT_SSL_ENABLE_NPN, CURLOPTTYPE_LONG, 225,
1910 7.86.0, "Has no function"),
1911
1912
1913 CURLOPT(CURLOPT_SSL_ENABLE_ALPN, CURLOPTTYPE_LONG, 226),
1914
1915
1916
1917 CURLOPT(CURLOPT_EXPECT_100_TIMEOUT_MS, CURLOPTTYPE_LONG, 227),
1918
1919
1920
1921 CURLOPT(CURLOPT_PROXYHEADER, CURLOPTTYPE_SLISTPOINT, 228),
1922
1923
1924 CURLOPT(CURLOPT_HEADEROPT, CURLOPTTYPE_VALUES, 229),
1925
1926
1927
1928 CURLOPT(CURLOPT_PINNEDPUBLICKEY, CURLOPTTYPE_STRINGPOINT, 230),
1929
1930
1931 CURLOPT(CURLOPT_UNIX_SOCKET_PATH, CURLOPTTYPE_STRINGPOINT, 231),
1932
1933
1934 CURLOPT(CURLOPT_SSL_VERIFYSTATUS, CURLOPTTYPE_LONG, 232),
1935
1936
1937 CURLOPT(CURLOPT_SSL_FALSESTART, CURLOPTTYPE_LONG, 233),
1938
1939
1940 CURLOPT(CURLOPT_PATH_AS_IS, CURLOPTTYPE_LONG, 234),
1941
1942
1943 CURLOPT(CURLOPT_PROXY_SERVICE_NAME, CURLOPTTYPE_STRINGPOINT, 235),
1944
1945
1946 CURLOPT(CURLOPT_SERVICE_NAME, CURLOPTTYPE_STRINGPOINT, 236),
1947
1948
1949 CURLOPT(CURLOPT_PIPEWAIT, CURLOPTTYPE_LONG, 237),
1950
1951
1952 CURLOPT(CURLOPT_DEFAULT_PROTOCOL, CURLOPTTYPE_STRINGPOINT, 238),
1953
1954
1955 CURLOPT(CURLOPT_STREAM_WEIGHT, CURLOPTTYPE_LONG, 239),
1956
1957
1958 CURLOPT(CURLOPT_STREAM_DEPENDS, CURLOPTTYPE_OBJECTPOINT, 240),
1959
1960
1961 CURLOPT(CURLOPT_STREAM_DEPENDS_E, CURLOPTTYPE_OBJECTPOINT, 241),
1962
1963
1964 CURLOPT(CURLOPT_TFTP_NO_OPTIONS, CURLOPTTYPE_LONG, 242),
1965
1966
1967
1968 CURLOPT(CURLOPT_CONNECT_TO, CURLOPTTYPE_SLISTPOINT, 243),
1969
1970
1971 CURLOPT(CURLOPT_TCP_FASTOPEN, CURLOPTTYPE_LONG, 244),
1972
1973
1974
1975 CURLOPT(CURLOPT_KEEP_SENDING_ON_ERROR, CURLOPTTYPE_LONG, 245),
1976
1977
1978
1979 CURLOPT(CURLOPT_PROXY_CAINFO, CURLOPTTYPE_STRINGPOINT, 246),
1980
1981
1982
1983 CURLOPT(CURLOPT_PROXY_CAPATH, CURLOPTTYPE_STRINGPOINT, 247),
1984
1985
1986
1987 CURLOPT(CURLOPT_PROXY_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 248),
1988
1989
1990
1991
1992 CURLOPT(CURLOPT_PROXY_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 249),
1993
1994
1995
1996 CURLOPT(CURLOPT_PROXY_SSLVERSION, CURLOPTTYPE_VALUES, 250),
1997
1998
1999 CURLOPT(CURLOPT_PROXY_TLSAUTH_USERNAME, CURLOPTTYPE_STRINGPOINT, 251),
2000
2001
2002 CURLOPT(CURLOPT_PROXY_TLSAUTH_PASSWORD, CURLOPTTYPE_STRINGPOINT, 252),
2003
2004
2005 CURLOPT(CURLOPT_PROXY_TLSAUTH_TYPE, CURLOPTTYPE_STRINGPOINT, 253),
2006
2007
2008 CURLOPT(CURLOPT_PROXY_SSLCERT, CURLOPTTYPE_STRINGPOINT, 254),
2009
2010
2011
2012 CURLOPT(CURLOPT_PROXY_SSLCERTTYPE, CURLOPTTYPE_STRINGPOINT, 255),
2013
2014
2015 CURLOPT(CURLOPT_PROXY_SSLKEY, CURLOPTTYPE_STRINGPOINT, 256),
2016
2017
2018
2019 CURLOPT(CURLOPT_PROXY_SSLKEYTYPE, CURLOPTTYPE_STRINGPOINT, 257),
2020
2021
2022 CURLOPT(CURLOPT_PROXY_KEYPASSWD, CURLOPTTYPE_STRINGPOINT, 258),
2023
2024
2025 CURLOPT(CURLOPT_PROXY_SSL_CIPHER_LIST, CURLOPTTYPE_STRINGPOINT, 259),
2026
2027
2028 CURLOPT(CURLOPT_PROXY_CRLFILE, CURLOPTTYPE_STRINGPOINT, 260),
2029
2030
2031
2032 CURLOPT(CURLOPT_PROXY_SSL_OPTIONS, CURLOPTTYPE_LONG, 261),
2033
2034
2035 CURLOPT(CURLOPT_PRE_PROXY, CURLOPTTYPE_STRINGPOINT, 262),
2036
2037
2038
2039 CURLOPT(CURLOPT_PROXY_PINNEDPUBLICKEY, CURLOPTTYPE_STRINGPOINT, 263),
2040
2041
2042 CURLOPT(CURLOPT_ABSTRACT_UNIX_SOCKET, CURLOPTTYPE_STRINGPOINT, 264),
2043
2044
2045 CURLOPT(CURLOPT_SUPPRESS_CONNECT_HEADERS, CURLOPTTYPE_LONG, 265),
2046
2047
2048 CURLOPT(CURLOPT_REQUEST_TARGET, CURLOPTTYPE_STRINGPOINT, 266),
2049
2050
2051 CURLOPT(CURLOPT_SOCKS5_AUTH, CURLOPTTYPE_LONG, 267),
2052
2053
2054 CURLOPT(CURLOPT_SSH_COMPRESSION, CURLOPTTYPE_LONG, 268),
2055
2056
2057 CURLOPT(CURLOPT_MIMEPOST, CURLOPTTYPE_OBJECTPOINT, 269),
2058
2059
2060
2061 CURLOPT(CURLOPT_TIMEVALUE_LARGE, CURLOPTTYPE_OFF_T, 270),
2062
2063
2064 CURLOPT(CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, CURLOPTTYPE_LONG, 271),
2065
2066
2067 CURLOPT(CURLOPT_RESOLVER_START_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 272),
2068
2069
2070 CURLOPT(CURLOPT_RESOLVER_START_DATA, CURLOPTTYPE_CBPOINT, 273),
2071
2072
2073 CURLOPT(CURLOPT_HAPROXYPROTOCOL, CURLOPTTYPE_LONG, 274),
2074
2075
2076 CURLOPT(CURLOPT_DNS_SHUFFLE_ADDRESSES, CURLOPTTYPE_LONG, 275),
2077
2078
2079 CURLOPT(CURLOPT_TLS13_CIPHERS, CURLOPTTYPE_STRINGPOINT, 276),
2080 CURLOPT(CURLOPT_PROXY_TLS13_CIPHERS, CURLOPTTYPE_STRINGPOINT, 277),
2081
2082
2083 CURLOPT(CURLOPT_DISALLOW_USERNAME_IN_URL, CURLOPTTYPE_LONG, 278),
2084
2085
2086 CURLOPT(CURLOPT_DOH_URL, CURLOPTTYPE_STRINGPOINT, 279),
2087
2088
2089 CURLOPT(CURLOPT_UPLOAD_BUFFERSIZE, CURLOPTTYPE_LONG, 280),
2090
2091
2092 CURLOPT(CURLOPT_UPKEEP_INTERVAL_MS, CURLOPTTYPE_LONG, 281),
2093
2094
2095 CURLOPT(CURLOPT_CURLU, CURLOPTTYPE_OBJECTPOINT, 282),
2096
2097
2098 CURLOPT(CURLOPT_TRAILERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 283),
2099
2100
2101 CURLOPT(CURLOPT_TRAILERDATA, CURLOPTTYPE_CBPOINT, 284),
2102
2103
2104 CURLOPT(CURLOPT_HTTP09_ALLOWED, CURLOPTTYPE_LONG, 285),
2105
2106
2107 CURLOPT(CURLOPT_ALTSVC_CTRL, CURLOPTTYPE_LONG, 286),
2108
2109
2110 CURLOPT(CURLOPT_ALTSVC, CURLOPTTYPE_STRINGPOINT, 287),
2111
2112
2113
2114 CURLOPT(CURLOPT_MAXAGE_CONN, CURLOPTTYPE_LONG, 288),
2115
2116
2117 CURLOPT(CURLOPT_SASL_AUTHZID, CURLOPTTYPE_STRINGPOINT, 289),
2118
2119
2120 CURLOPT(CURLOPT_MAIL_RCPT_ALLOWFAILS, CURLOPTTYPE_LONG, 290),
2121
2122
2123 CURLOPT(CURLOPT_SSLCERT_BLOB, CURLOPTTYPE_BLOB, 291),
2124 CURLOPT(CURLOPT_SSLKEY_BLOB, CURLOPTTYPE_BLOB, 292),
2125 CURLOPT(CURLOPT_PROXY_SSLCERT_BLOB, CURLOPTTYPE_BLOB, 293),
2126 CURLOPT(CURLOPT_PROXY_SSLKEY_BLOB, CURLOPTTYPE_BLOB, 294),
2127 CURLOPT(CURLOPT_ISSUERCERT_BLOB, CURLOPTTYPE_BLOB, 295),
2128
2129
2130 CURLOPT(CURLOPT_PROXY_ISSUERCERT, CURLOPTTYPE_STRINGPOINT, 296),
2131 CURLOPT(CURLOPT_PROXY_ISSUERCERT_BLOB, CURLOPTTYPE_BLOB, 297),
2132
2133
2134
2135
2136
2137 CURLOPT(CURLOPT_SSL_EC_CURVES, CURLOPTTYPE_STRINGPOINT, 298),
2138
2139
2140 CURLOPT(CURLOPT_HSTS_CTRL, CURLOPTTYPE_LONG, 299),
2141
2142 CURLOPT(CURLOPT_HSTS, CURLOPTTYPE_STRINGPOINT, 300),
2143
2144
2145 CURLOPT(CURLOPT_HSTSREADFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 301),
2146 CURLOPT(CURLOPT_HSTSREADDATA, CURLOPTTYPE_CBPOINT, 302),
2147
2148
2149 CURLOPT(CURLOPT_HSTSWRITEFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 303),
2150 CURLOPT(CURLOPT_HSTSWRITEDATA, CURLOPTTYPE_CBPOINT, 304),
2151
2152
2153 CURLOPT(CURLOPT_AWS_SIGV4, CURLOPTTYPE_STRINGPOINT, 305),
2154
2155
2156 CURLOPT(CURLOPT_DOH_SSL_VERIFYPEER, CURLOPTTYPE_LONG, 306),
2157
2158
2159 CURLOPT(CURLOPT_DOH_SSL_VERIFYHOST, CURLOPTTYPE_LONG, 307),
2160
2161
2162 CURLOPT(CURLOPT_DOH_SSL_VERIFYSTATUS, CURLOPTTYPE_LONG, 308),
2163
2164
2165
2166 CURLOPT(CURLOPT_CAINFO_BLOB, CURLOPTTYPE_BLOB, 309),
2167
2168
2169
2170 CURLOPT(CURLOPT_PROXY_CAINFO_BLOB, CURLOPTTYPE_BLOB, 310),
2171
2172
2173 CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256, CURLOPTTYPE_STRINGPOINT, 311),
2174
2175
2176
2177 CURLOPT(CURLOPT_PREREQFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 312),
2178
2179
2180 CURLOPT(CURLOPT_PREREQDATA, CURLOPTTYPE_CBPOINT, 313),
2181
2182
2183
2184 CURLOPT(CURLOPT_MAXLIFETIME_CONN, CURLOPTTYPE_LONG, 314),
2185
2186
2187 CURLOPT(CURLOPT_MIME_OPTIONS, CURLOPTTYPE_LONG, 315),
2188
2189
2190
2191 CURLOPT(CURLOPT_SSH_HOSTKEYFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 316),
2192
2193
2194 CURLOPT(CURLOPT_SSH_HOSTKEYDATA, CURLOPTTYPE_CBPOINT, 317),
2195
2196
2197
2198
2199
2200 CURLOPT(CURLOPT_PROTOCOLS_STR, CURLOPTTYPE_STRINGPOINT, 318),
2201
2202
2203 CURLOPT(CURLOPT_REDIR_PROTOCOLS_STR, CURLOPTTYPE_STRINGPOINT, 319),
2204
2205
2206 CURLOPT(CURLOPT_WS_OPTIONS, CURLOPTTYPE_LONG, 320),
2207
2208
2209 CURLOPT(CURLOPT_CA_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 321),
2210
2211
2212 CURLOPT(CURLOPT_QUICK_EXIT, CURLOPTTYPE_LONG, 322),
2213
2214
2215 CURLOPT(CURLOPT_HAPROXY_CLIENT_IP, CURLOPTTYPE_STRINGPOINT, 323),
2216
2217
2218 CURLOPT(CURLOPT_SERVER_RESPONSE_TIMEOUT_MS, CURLOPTTYPE_LONG, 324),
2219
2220
2221 CURLOPT(CURLOPT_ECH, CURLOPTTYPE_STRINGPOINT, 325),
2222
2223
2224 CURLOPT(CURLOPT_TCP_KEEPCNT, CURLOPTTYPE_LONG, 326),
2225
2226 CURLOPT_LASTENTRY
2227 } CURLoption;
2228
2229 #ifndef CURL_NO_OLDIES
2230
2231
2232
2233
2234
2235
2236 #define CURLOPT_POST301 CURLOPT_POSTREDIR
2237
2238
2239
2240
2241 #define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD
2242 #define CURLOPT_FTPAPPEND CURLOPT_APPEND
2243 #define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY
2244 #define CURLOPT_FTP_SSL CURLOPT_USE_SSL
2245
2246
2247
2248 #define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
2249 #define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
2250
2251
2252 #define CURLOPT_FTP_RESPONSE_TIMEOUT CURLOPT_SERVER_RESPONSE_TIMEOUT
2253
2254
2255 #define CURLOPT_MAIL_RCPT_ALLLOWFAILS CURLOPT_MAIL_RCPT_ALLOWFAILS
2256
2257 #else
2258
2259 #undef CURLOPT_DNS_USE_GLOBAL_CACHE
2260 #endif
2261
2262
2263
2264
2265
2266 #define CURL_IPRESOLVE_WHATEVER 0
2267
2268 #define CURL_IPRESOLVE_V4 1
2269 #define CURL_IPRESOLVE_V6 2
2270
2271
2272 #define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
2273
2274
2275 enum {
2276 CURL_HTTP_VERSION_NONE,
2277
2278
2279 CURL_HTTP_VERSION_1_0,
2280 CURL_HTTP_VERSION_1_1,
2281 CURL_HTTP_VERSION_2_0,
2282 CURL_HTTP_VERSION_2TLS,
2283 CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE,
2284
2285 CURL_HTTP_VERSION_3 = 30,
2286
2287
2288 CURL_HTTP_VERSION_3ONLY = 31,
2289
2290
2291
2292 CURL_HTTP_VERSION_LAST
2293 };
2294
2295
2296
2297
2298 #define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0
2299
2300
2301
2302
2303 enum {
2304 CURL_RTSPREQ_NONE,
2305 CURL_RTSPREQ_OPTIONS,
2306 CURL_RTSPREQ_DESCRIBE,
2307 CURL_RTSPREQ_ANNOUNCE,
2308 CURL_RTSPREQ_SETUP,
2309 CURL_RTSPREQ_PLAY,
2310 CURL_RTSPREQ_PAUSE,
2311 CURL_RTSPREQ_TEARDOWN,
2312 CURL_RTSPREQ_GET_PARAMETER,
2313 CURL_RTSPREQ_SET_PARAMETER,
2314 CURL_RTSPREQ_RECORD,
2315 CURL_RTSPREQ_RECEIVE,
2316 CURL_RTSPREQ_LAST
2317 };
2318
2319
2320 enum CURL_NETRC_OPTION {
2321 CURL_NETRC_IGNORED,
2322
2323 CURL_NETRC_OPTIONAL,
2324
2325 CURL_NETRC_REQUIRED,
2326
2327
2328 CURL_NETRC_LAST
2329 };
2330
2331 #define CURL_SSLVERSION_DEFAULT 0
2332 #define CURL_SSLVERSION_TLSv1 1
2333 #define CURL_SSLVERSION_SSLv2 2
2334 #define CURL_SSLVERSION_SSLv3 3
2335 #define CURL_SSLVERSION_TLSv1_0 4
2336 #define CURL_SSLVERSION_TLSv1_1 5
2337 #define CURL_SSLVERSION_TLSv1_2 6
2338 #define CURL_SSLVERSION_TLSv1_3 7
2339
2340 #define CURL_SSLVERSION_LAST 8
2341
2342 #define CURL_SSLVERSION_MAX_NONE 0
2343 #define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1 << 16)
2344 #define CURL_SSLVERSION_MAX_TLSv1_0 (CURL_SSLVERSION_TLSv1_0 << 16)
2345 #define CURL_SSLVERSION_MAX_TLSv1_1 (CURL_SSLVERSION_TLSv1_1 << 16)
2346 #define CURL_SSLVERSION_MAX_TLSv1_2 (CURL_SSLVERSION_TLSv1_2 << 16)
2347 #define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
2348
2349
2350 #define CURL_SSLVERSION_MAX_LAST (CURL_SSLVERSION_LAST << 16)
2351
2352 enum CURL_TLSAUTH {
2353 CURL_TLSAUTH_NONE,
2354 CURL_TLSAUTH_SRP,
2355 CURL_TLSAUTH_LAST
2356 };
2357
2358
2359
2360
2361
2362
2363 #define CURL_REDIR_GET_ALL 0
2364 #define CURL_REDIR_POST_301 1
2365 #define CURL_REDIR_POST_302 2
2366 #define CURL_REDIR_POST_303 4
2367 #define CURL_REDIR_POST_ALL \
2368 (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
2369
2370 typedef enum {
2371 CURL_TIMECOND_NONE,
2372
2373 CURL_TIMECOND_IFMODSINCE,
2374 CURL_TIMECOND_IFUNMODSINCE,
2375 CURL_TIMECOND_LASTMOD,
2376
2377 CURL_TIMECOND_LAST
2378 } curl_TimeCond;
2379
2380
2381 #define CURL_ZERO_TERMINATED ((size_t) -1)
2382
2383
2384
2385 CURL_EXTERN int curl_strequal(const char *s1, const char *s2);
2386 CURL_EXTERN int curl_strnequal(const char *s1, const char *s2, size_t n);
2387
2388
2389 typedef struct curl_mime curl_mime;
2390 typedef struct curl_mimepart curl_mimepart;
2391
2392
2393 #define CURLMIMEOPT_FORMESCAPE (1<<0)
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403 CURL_EXTERN curl_mime *curl_mime_init(CURL *easy);
2404
2405
2406
2407
2408
2409
2410
2411
2412 CURL_EXTERN void curl_mime_free(curl_mime *mime);
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422 CURL_EXTERN curl_mimepart *curl_mime_addpart(curl_mime *mime);
2423
2424
2425
2426
2427
2428
2429
2430
2431 CURL_EXTERN CURLcode curl_mime_name(curl_mimepart *part, const char *name);
2432
2433
2434
2435
2436
2437
2438
2439
2440 CURL_EXTERN CURLcode curl_mime_filename(curl_mimepart *part,
2441 const char *filename);
2442
2443
2444
2445
2446
2447
2448
2449
2450 CURL_EXTERN CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype);
2451
2452
2453
2454
2455
2456
2457
2458
2459 CURL_EXTERN CURLcode curl_mime_encoder(curl_mimepart *part,
2460 const char *encoding);
2461
2462
2463
2464
2465
2466
2467
2468
2469 CURL_EXTERN CURLcode curl_mime_data(curl_mimepart *part,
2470 const char *data, size_t datasize);
2471
2472
2473
2474
2475
2476
2477
2478
2479 CURL_EXTERN CURLcode curl_mime_filedata(curl_mimepart *part,
2480 const char *filename);
2481
2482
2483
2484
2485
2486
2487
2488
2489 CURL_EXTERN CURLcode curl_mime_data_cb(curl_mimepart *part,
2490 curl_off_t datasize,
2491 curl_read_callback readfunc,
2492 curl_seek_callback seekfunc,
2493 curl_free_callback freefunc,
2494 void *arg);
2495
2496
2497
2498
2499
2500
2501
2502
2503 CURL_EXTERN CURLcode curl_mime_subparts(curl_mimepart *part,
2504 curl_mime *subparts);
2505
2506
2507
2508
2509
2510
2511
2512 CURL_EXTERN CURLcode curl_mime_headers(curl_mimepart *part,
2513 struct curl_slist *headers,
2514 int take_ownership);
2515
2516 typedef enum {
2517
2518 CURLFORM_NOTHING CURL_DEPRECATED(7.56.0, ""),
2519 CURLFORM_COPYNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
2520 CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
2521 CURLFORM_NAMELENGTH CURL_DEPRECATED(7.56.0, ""),
2522 CURLFORM_COPYCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
2523 CURLFORM_PTRCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
2524 CURLFORM_CONTENTSLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
2525 CURLFORM_FILECONTENT CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
2526 CURLFORM_ARRAY CURL_DEPRECATED(7.56.0, ""),
2527 CURLFORM_OBSOLETE,
2528 CURLFORM_FILE CURL_DEPRECATED(7.56.0, "Use curl_mime_filedata()"),
2529
2530 CURLFORM_BUFFER CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
2531 CURLFORM_BUFFERPTR CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
2532 CURLFORM_BUFFERLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
2533
2534 CURLFORM_CONTENTTYPE CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"),
2535 CURLFORM_CONTENTHEADER CURL_DEPRECATED(7.56.0, "Use curl_mime_headers()"),
2536 CURLFORM_FILENAME CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
2537 CURLFORM_END,
2538 CURLFORM_OBSOLETE2,
2539
2540 CURLFORM_STREAM CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
2541 CURLFORM_CONTENTLEN
2542 CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
2543
2544 CURLFORM_LASTENTRY
2545 } CURLformoption;
2546
2547
2548 struct curl_forms {
2549 CURLformoption option;
2550 const char *value;
2551 };
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569 typedef enum {
2570 CURL_FORMADD_OK CURL_DEPRECATED(7.56.0, ""),
2571
2572 CURL_FORMADD_MEMORY CURL_DEPRECATED(7.56.0, ""),
2573 CURL_FORMADD_OPTION_TWICE CURL_DEPRECATED(7.56.0, ""),
2574 CURL_FORMADD_NULL CURL_DEPRECATED(7.56.0, ""),
2575 CURL_FORMADD_UNKNOWN_OPTION CURL_DEPRECATED(7.56.0, ""),
2576 CURL_FORMADD_INCOMPLETE CURL_DEPRECATED(7.56.0, ""),
2577 CURL_FORMADD_ILLEGAL_ARRAY CURL_DEPRECATED(7.56.0, ""),
2578
2579 CURL_FORMADD_DISABLED CURL_DEPRECATED(7.56.0, ""),
2580
2581 CURL_FORMADD_LAST
2582 } CURLFORMcode;
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593 CURL_EXTERN CURLFORMcode CURL_DEPRECATED(7.56.0, "Use curl_mime_init()")
2594 curl_formadd(struct curl_httppost **httppost,
2595 struct curl_httppost **last_post,
2596 ...);
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606 typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
2607 size_t len);
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619 CURL_EXTERN int CURL_DEPRECATED(7.56.0, "")
2620 curl_formget(struct curl_httppost *form, void *arg,
2621 curl_formget_callback append);
2622
2623
2624
2625
2626
2627
2628
2629 CURL_EXTERN void CURL_DEPRECATED(7.56.0, "Use curl_mime_free()")
2630 curl_formfree(struct curl_httppost *form);
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640 CURL_EXTERN char *curl_getenv(const char *variable);
2641
2642
2643
2644
2645
2646
2647
2648
2649 CURL_EXTERN char *curl_version(void);
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660 CURL_EXTERN char *curl_easy_escape(CURL *handle,
2661 const char *string,
2662 int length);
2663
2664
2665 CURL_EXTERN char *curl_escape(const char *string,
2666 int length);
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680 CURL_EXTERN char *curl_easy_unescape(CURL *handle,
2681 const char *string,
2682 int length,
2683 int *outlength);
2684
2685
2686 CURL_EXTERN char *curl_unescape(const char *string,
2687 int length);
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697 CURL_EXTERN void curl_free(void *p);
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711 CURL_EXTERN CURLcode curl_global_init(long flags);
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726 CURL_EXTERN CURLcode curl_global_init_mem(long flags,
2727 curl_malloc_callback m,
2728 curl_free_callback f,
2729 curl_realloc_callback r,
2730 curl_strdup_callback s,
2731 curl_calloc_callback c);
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741 CURL_EXTERN void curl_global_cleanup(void);
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755 CURL_EXTERN CURLcode curl_global_trace(const char *config);
2756
2757
2758 struct curl_slist {
2759 char *data;
2760 struct curl_slist *next;
2761 };
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789 struct curl_ssl_backend {
2790 curl_sslbackend id;
2791 const char *name;
2792 };
2793 typedef struct curl_ssl_backend curl_ssl_backend;
2794
2795 typedef enum {
2796 CURLSSLSET_OK = 0,
2797 CURLSSLSET_UNKNOWN_BACKEND,
2798 CURLSSLSET_TOO_LATE,
2799 CURLSSLSET_NO_BACKENDS
2800 } CURLsslset;
2801
2802 CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
2803 const curl_ssl_backend ***avail);
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813 CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *list,
2814 const char *data);
2815
2816
2817
2818
2819
2820
2821
2822
2823 CURL_EXTERN void curl_slist_free_all(struct curl_slist *list);
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834 CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused);
2835
2836
2837
2838 struct curl_certinfo {
2839 int num_of_certs;
2840 struct curl_slist **certinfo;
2841
2842
2843
2844 };
2845
2846
2847
2848
2849 struct curl_tlssessioninfo {
2850 curl_sslbackend backend;
2851 void *internals;
2852 };
2853
2854 #define CURLINFO_STRING 0x100000
2855 #define CURLINFO_LONG 0x200000
2856 #define CURLINFO_DOUBLE 0x300000
2857 #define CURLINFO_SLIST 0x400000
2858 #define CURLINFO_PTR 0x400000
2859 #define CURLINFO_SOCKET 0x500000
2860 #define CURLINFO_OFF_T 0x600000
2861 #define CURLINFO_MASK 0x0fffff
2862 #define CURLINFO_TYPEMASK 0xf00000
2863
2864 typedef enum {
2865 CURLINFO_NONE,
2866 CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1,
2867 CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2,
2868 CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3,
2869 CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4,
2870 CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5,
2871 CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,
2872 CURLINFO_SIZE_UPLOAD CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_UPLOAD_T")
2873 = CURLINFO_DOUBLE + 7,
2874 CURLINFO_SIZE_UPLOAD_T = CURLINFO_OFF_T + 7,
2875 CURLINFO_SIZE_DOWNLOAD
2876 CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_DOWNLOAD_T")
2877 = CURLINFO_DOUBLE + 8,
2878 CURLINFO_SIZE_DOWNLOAD_T = CURLINFO_OFF_T + 8,
2879 CURLINFO_SPEED_DOWNLOAD
2880 CURL_DEPRECATED(7.55.0, "Use CURLINFO_SPEED_DOWNLOAD_T")
2881 = CURLINFO_DOUBLE + 9,
2882 CURLINFO_SPEED_DOWNLOAD_T = CURLINFO_OFF_T + 9,
2883 CURLINFO_SPEED_UPLOAD
2884 CURL_DEPRECATED(7.55.0, "Use CURLINFO_SPEED_UPLOAD_T")
2885 = CURLINFO_DOUBLE + 10,
2886 CURLINFO_SPEED_UPLOAD_T = CURLINFO_OFF_T + 10,
2887 CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11,
2888 CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12,
2889 CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13,
2890 CURLINFO_FILETIME = CURLINFO_LONG + 14,
2891 CURLINFO_FILETIME_T = CURLINFO_OFF_T + 14,
2892 CURLINFO_CONTENT_LENGTH_DOWNLOAD
2893 CURL_DEPRECATED(7.55.0,
2894 "Use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T")
2895 = CURLINFO_DOUBLE + 15,
2896 CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = CURLINFO_OFF_T + 15,
2897 CURLINFO_CONTENT_LENGTH_UPLOAD
2898 CURL_DEPRECATED(7.55.0,
2899 "Use CURLINFO_CONTENT_LENGTH_UPLOAD_T")
2900 = CURLINFO_DOUBLE + 16,
2901 CURLINFO_CONTENT_LENGTH_UPLOAD_T = CURLINFO_OFF_T + 16,
2902 CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
2903 CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18,
2904 CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19,
2905 CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20,
2906 CURLINFO_PRIVATE = CURLINFO_STRING + 21,
2907 CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22,
2908 CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23,
2909 CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24,
2910 CURLINFO_OS_ERRNO = CURLINFO_LONG + 25,
2911 CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26,
2912 CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27,
2913 CURLINFO_COOKIELIST = CURLINFO_SLIST + 28,
2914 CURLINFO_LASTSOCKET CURL_DEPRECATED(7.45.0, "Use CURLINFO_ACTIVESOCKET")
2915 = CURLINFO_LONG + 29,
2916 CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30,
2917 CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31,
2918 CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,
2919 CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33,
2920 CURLINFO_CERTINFO = CURLINFO_PTR + 34,
2921 CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35,
2922 CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36,
2923 CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37,
2924 CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38,
2925 CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39,
2926 CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40,
2927 CURLINFO_LOCAL_IP = CURLINFO_STRING + 41,
2928 CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
2929 CURLINFO_TLS_SESSION CURL_DEPRECATED(7.48.0, "Use CURLINFO_TLS_SSL_PTR")
2930 = CURLINFO_PTR + 43,
2931 CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,
2932 CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45,
2933 CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46,
2934 CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47,
2935 CURLINFO_PROTOCOL CURL_DEPRECATED(7.85.0, "Use CURLINFO_SCHEME")
2936 = CURLINFO_LONG + 48,
2937 CURLINFO_SCHEME = CURLINFO_STRING + 49,
2938 CURLINFO_TOTAL_TIME_T = CURLINFO_OFF_T + 50,
2939 CURLINFO_NAMELOOKUP_TIME_T = CURLINFO_OFF_T + 51,
2940 CURLINFO_CONNECT_TIME_T = CURLINFO_OFF_T + 52,
2941 CURLINFO_PRETRANSFER_TIME_T = CURLINFO_OFF_T + 53,
2942 CURLINFO_STARTTRANSFER_TIME_T = CURLINFO_OFF_T + 54,
2943 CURLINFO_REDIRECT_TIME_T = CURLINFO_OFF_T + 55,
2944 CURLINFO_APPCONNECT_TIME_T = CURLINFO_OFF_T + 56,
2945 CURLINFO_RETRY_AFTER = CURLINFO_OFF_T + 57,
2946 CURLINFO_EFFECTIVE_METHOD = CURLINFO_STRING + 58,
2947 CURLINFO_PROXY_ERROR = CURLINFO_LONG + 59,
2948 CURLINFO_REFERER = CURLINFO_STRING + 60,
2949 CURLINFO_CAINFO = CURLINFO_STRING + 61,
2950 CURLINFO_CAPATH = CURLINFO_STRING + 62,
2951 CURLINFO_XFER_ID = CURLINFO_OFF_T + 63,
2952 CURLINFO_CONN_ID = CURLINFO_OFF_T + 64,
2953 CURLINFO_QUEUE_TIME_T = CURLINFO_OFF_T + 65,
2954 CURLINFO_USED_PROXY = CURLINFO_LONG + 66,
2955 CURLINFO_POSTTRANSFER_TIME_T = CURLINFO_OFF_T + 67,
2956 CURLINFO_LASTONE = 67
2957 } CURLINFO;
2958
2959
2960
2961 #define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE
2962
2963 typedef enum {
2964 CURLCLOSEPOLICY_NONE,
2965
2966 CURLCLOSEPOLICY_OLDEST,
2967 CURLCLOSEPOLICY_LEAST_RECENTLY_USED,
2968 CURLCLOSEPOLICY_LEAST_TRAFFIC,
2969 CURLCLOSEPOLICY_SLOWEST,
2970 CURLCLOSEPOLICY_CALLBACK,
2971
2972 CURLCLOSEPOLICY_LAST
2973 } curl_closepolicy;
2974
2975 #define CURL_GLOBAL_SSL (1<<0)
2976 #define CURL_GLOBAL_WIN32 (1<<1)
2977 #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
2978 #define CURL_GLOBAL_NOTHING 0
2979 #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
2980 #define CURL_GLOBAL_ACK_EINTR (1<<2)
2981
2982
2983
2984
2985
2986
2987
2988 typedef enum {
2989 CURL_LOCK_DATA_NONE = 0,
2990
2991
2992
2993
2994 CURL_LOCK_DATA_SHARE,
2995 CURL_LOCK_DATA_COOKIE,
2996 CURL_LOCK_DATA_DNS,
2997 CURL_LOCK_DATA_SSL_SESSION,
2998 CURL_LOCK_DATA_CONNECT,
2999 CURL_LOCK_DATA_PSL,
3000 CURL_LOCK_DATA_HSTS,
3001 CURL_LOCK_DATA_LAST
3002 } curl_lock_data;
3003
3004
3005 typedef enum {
3006 CURL_LOCK_ACCESS_NONE = 0,
3007 CURL_LOCK_ACCESS_SHARED = 1,
3008 CURL_LOCK_ACCESS_SINGLE = 2,
3009 CURL_LOCK_ACCESS_LAST
3010 } curl_lock_access;
3011
3012 typedef void (*curl_lock_function)(CURL *handle,
3013 curl_lock_data data,
3014 curl_lock_access locktype,
3015 void *userptr);
3016 typedef void (*curl_unlock_function)(CURL *handle,
3017 curl_lock_data data,
3018 void *userptr);
3019
3020
3021 typedef enum {
3022 CURLSHE_OK,
3023 CURLSHE_BAD_OPTION,
3024 CURLSHE_IN_USE,
3025 CURLSHE_INVALID,
3026 CURLSHE_NOMEM,
3027 CURLSHE_NOT_BUILT_IN,
3028 CURLSHE_LAST
3029 } CURLSHcode;
3030
3031 typedef enum {
3032 CURLSHOPT_NONE,
3033 CURLSHOPT_SHARE,
3034 CURLSHOPT_UNSHARE,
3035 CURLSHOPT_LOCKFUNC,
3036 CURLSHOPT_UNLOCKFUNC,
3037 CURLSHOPT_USERDATA,
3038
3039 CURLSHOPT_LAST
3040 } CURLSHoption;
3041
3042 CURL_EXTERN CURLSH *curl_share_init(void);
3043 CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option,
3044 ...);
3045 CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *share);
3046
3047
3048
3049
3050
3051 typedef enum {
3052 CURLVERSION_FIRST,
3053 CURLVERSION_SECOND,
3054 CURLVERSION_THIRD,
3055 CURLVERSION_FOURTH,
3056 CURLVERSION_FIFTH,
3057 CURLVERSION_SIXTH,
3058 CURLVERSION_SEVENTH,
3059 CURLVERSION_EIGHTH,
3060 CURLVERSION_NINTH,
3061 CURLVERSION_TENTH,
3062 CURLVERSION_ELEVENTH,
3063 CURLVERSION_TWELFTH,
3064 CURLVERSION_LAST
3065 } CURLversion;
3066
3067
3068
3069
3070
3071
3072 #define CURLVERSION_NOW CURLVERSION_TWELFTH
3073
3074 struct curl_version_info_data {
3075 CURLversion age;
3076 const char *version;
3077 unsigned int version_num;
3078 const char *host;
3079 int features;
3080 const char *ssl_version;
3081 long ssl_version_num;
3082 const char *libz_version;
3083
3084 const char * const *protocols;
3085
3086
3087 const char *ares;
3088 int ares_num;
3089
3090
3091 const char *libidn;
3092
3093
3094
3095
3096 int iconv_ver_num;
3097
3098 const char *libssh_version;
3099
3100
3101 unsigned int brotli_ver_num;
3102
3103 const char *brotli_version;
3104
3105
3106 unsigned int nghttp2_ver_num;
3107
3108 const char *nghttp2_version;
3109 const char *quic_version;
3110
3111
3112
3113 const char *cainfo;
3114
3115 const char *capath;
3116
3117
3118
3119 unsigned int zstd_ver_num;
3120
3121 const char *zstd_version;
3122
3123
3124 const char *hyper_version;
3125
3126
3127 const char *gsasl_version;
3128
3129
3130
3131 const char * const *feature_names;
3132
3133
3134 const char *rtmp_version;
3135 };
3136 typedef struct curl_version_info_data curl_version_info_data;
3137
3138 #define CURL_VERSION_IPV6 (1<<0)
3139 #define CURL_VERSION_KERBEROS4 (1<<1)
3140
3141 #define CURL_VERSION_SSL (1<<2)
3142 #define CURL_VERSION_LIBZ (1<<3)
3143 #define CURL_VERSION_NTLM (1<<4)
3144 #define CURL_VERSION_GSSNEGOTIATE (1<<5)
3145
3146 #define CURL_VERSION_DEBUG (1<<6)
3147 #define CURL_VERSION_ASYNCHDNS (1<<7)
3148 #define CURL_VERSION_SPNEGO (1<<8)
3149 #define CURL_VERSION_LARGEFILE (1<<9)
3150 #define CURL_VERSION_IDN (1<<10)
3151
3152 #define CURL_VERSION_SSPI (1<<11)
3153 #define CURL_VERSION_CONV (1<<12)
3154 #define CURL_VERSION_CURLDEBUG (1<<13)
3155 #define CURL_VERSION_TLSAUTH_SRP (1<<14)
3156 #define CURL_VERSION_NTLM_WB (1<<15)
3157
3158 #define CURL_VERSION_HTTP2 (1<<16)
3159 #define CURL_VERSION_GSSAPI (1<<17)
3160 #define CURL_VERSION_KERBEROS5 (1<<18)
3161 #define CURL_VERSION_UNIX_SOCKETS (1<<19)
3162 #define CURL_VERSION_PSL (1<<20)
3163
3164 #define CURL_VERSION_HTTPS_PROXY (1<<21)
3165 #define CURL_VERSION_MULTI_SSL (1<<22)
3166 #define CURL_VERSION_BROTLI (1<<23)
3167 #define CURL_VERSION_ALTSVC (1<<24)
3168 #define CURL_VERSION_HTTP3 (1<<25)
3169 #define CURL_VERSION_ZSTD (1<<26)
3170 #define CURL_VERSION_UNICODE (1<<27)
3171 #define CURL_VERSION_HSTS (1<<28)
3172 #define CURL_VERSION_GSASL (1<<29)
3173 #define CURL_VERSION_THREADSAFE (1<<30)
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183 CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194 CURL_EXTERN const char *curl_easy_strerror(CURLcode);
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205 CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216 CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
3217
3218 #define CURLPAUSE_RECV (1<<0)
3219 #define CURLPAUSE_RECV_CONT (0)
3220
3221 #define CURLPAUSE_SEND (1<<2)
3222 #define CURLPAUSE_SEND_CONT (0)
3223
3224 #define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND)
3225 #define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
3226
3227 #ifdef __cplusplus
3228 }
3229 #endif
3230
3231
3232
3233 #include "easy.h" /* nothing in curl is fun without the easy stuff */
3234 #include "multi.h"
3235 #include "urlapi.h"
3236 #include "options.h"
3237 #include "header.h"
3238 #include "websockets.h"
3239 #ifndef CURL_SKIP_INCLUDE_MPRINTF
3240 #include "mprintf.h"
3241 #endif
3242
3243
3244 #if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
3245 ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \
3246 !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK)
3247 #include "typecheck-gcc.h"
3248 #else
3249 #if defined(__STDC__) && (__STDC__ >= 1)
3250
3251
3252
3253 #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
3254 #define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
3255 #define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
3256 #define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
3257 #endif
3258 #endif
3259
3260 #endif