Path: blob/master/cpp/linux/curl/curl.h
644 views
#ifndef __CURL_CURL_H1#define __CURL_CURL_H2/***************************************************************************3* _ _ ____ _4* Project ___| | | | _ \| |5* / __| | | | |_) | |6* | (__| |_| | _ <| |___7* \___|\___/|_| \_\_____|8*9* Copyright (C) 1998 - 2019, Daniel Stenberg, <[email protected]>, et al.10*11* This software is licensed as described in the file COPYING, which12* you should have received as part of this distribution. The terms13* are also available at https://curl.haxx.se/docs/copyright.html.14*15* You may opt to use, copy, modify, merge, publish, distribute and/or sell16* copies of the Software, and permit persons to whom the Software is17* furnished to do so, under the terms of the COPYING file.18*19* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY20* KIND, either express or implied.21*22***************************************************************************/2324/*25* If you have libcurl problems, all docs and details are found here:26* https://curl.haxx.se/libcurl/27*28* curl-library mailing list subscription and unsubscription web interface:29* https://cool.haxx.se/mailman/listinfo/curl-library/30*/3132#ifdef CURL_NO_OLDIES33#define CURL_STRICTER34#endif3536#include "curlver.h" /* libcurl version defines */37#include "system.h" /* determine things run-time */3839/*40* Define WIN32 when build target is Win32 API41*/4243#if (defined(_WIN32) || defined(__WIN32__)) && \44!defined(WIN32) && !defined(__SYMBIAN32__)45#define WIN3246#endif4748#include <stdio.h>49#include <limits.h>5051#if defined(__FreeBSD__) && (__FreeBSD__ >= 2)52/* Needed for __FreeBSD_version symbol definition */53#include <osreldate.h>54#endif5556/* The include stuff here below is mainly for time_t! */57#include <sys/types.h>58#include <time.h>5960#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)61#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \62defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H))63/* The check above prevents the winsock2 inclusion if winsock.h already was64included, since they can't co-exist without problems */65#include <winsock2.h>66#include <ws2tcpip.h>67#endif68#endif6970/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish71libc5-based Linux systems. Only include it on systems that are known to72require it! */73#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \74defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \75defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \76defined(__CYGWIN__) || \77(defined(__FreeBSD_version) && (__FreeBSD_version < 800000))78#include <sys/select.h>79#endif8081#if !defined(WIN32) && !defined(_WIN32_WCE)82#include <sys/socket.h>83#endif8485#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)86#include <sys/time.h>87#endif8889#ifdef __BEOS__90#include <support/SupportDefs.h>91#endif9293/* Compatibility for non-Clang compilers */94#ifndef __has_declspec_attribute95# define __has_declspec_attribute(x) 096#endif9798#ifdef __cplusplus99extern "C" {100#endif101102#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)103typedef struct Curl_easy CURL;104typedef struct Curl_share CURLSH;105#else106typedef void CURL;107typedef void CURLSH;108#endif109110/*111* libcurl external API function linkage decorations.112*/113114#ifdef CURL_STATICLIB115# define CURL_EXTERN116#elif defined(WIN32) || defined(__SYMBIAN32__) || \117(__has_declspec_attribute(dllexport) && \118__has_declspec_attribute(dllimport))119# if defined(BUILDING_LIBCURL)120# define CURL_EXTERN __declspec(dllexport)121# else122# define CURL_EXTERN __declspec(dllimport)123# endif124#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)125# define CURL_EXTERN CURL_EXTERN_SYMBOL126#else127# define CURL_EXTERN128#endif129130#ifndef curl_socket_typedef131/* socket typedef */132#if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)133typedef SOCKET curl_socket_t;134#define CURL_SOCKET_BAD INVALID_SOCKET135#else136typedef int curl_socket_t;137#define CURL_SOCKET_BAD -1138#endif139#define curl_socket_typedef140#endif /* curl_socket_typedef */141142/* enum for the different supported SSL backends */143typedef enum {144CURLSSLBACKEND_NONE = 0,145CURLSSLBACKEND_OPENSSL = 1,146CURLSSLBACKEND_GNUTLS = 2,147CURLSSLBACKEND_NSS = 3,148CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */149CURLSSLBACKEND_GSKIT = 5,150CURLSSLBACKEND_POLARSSL = 6,151CURLSSLBACKEND_WOLFSSL = 7,152CURLSSLBACKEND_SCHANNEL = 8,153CURLSSLBACKEND_SECURETRANSPORT = 9,154CURLSSLBACKEND_AXTLS = 10, /* never used since 7.63.0 */155CURLSSLBACKEND_MBEDTLS = 11,156CURLSSLBACKEND_MESALINK = 12157} curl_sslbackend;158159/* aliases for library clones and renames */160#define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL161#define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL162163/* deprecated names: */164#define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL165#define CURLSSLBACKEND_DARWINSSL CURLSSLBACKEND_SECURETRANSPORT166167struct curl_httppost {168struct curl_httppost *next; /* next entry in the list */169char *name; /* pointer to allocated name */170long namelength; /* length of name length */171char *contents; /* pointer to allocated data contents */172long contentslength; /* length of contents field, see also173CURL_HTTPPOST_LARGE */174char *buffer; /* pointer to allocated buffer contents */175long bufferlength; /* length of buffer field */176char *contenttype; /* Content-Type */177struct curl_slist *contentheader; /* list of extra headers for this form */178struct curl_httppost *more; /* if one field name has more than one179file, this link should link to following180files */181long flags; /* as defined below */182183/* specified content is a file name */184#define CURL_HTTPPOST_FILENAME (1<<0)185/* specified content is a file name */186#define CURL_HTTPPOST_READFILE (1<<1)187/* name is only stored pointer do not free in formfree */188#define CURL_HTTPPOST_PTRNAME (1<<2)189/* contents is only stored pointer do not free in formfree */190#define CURL_HTTPPOST_PTRCONTENTS (1<<3)191/* upload file from buffer */192#define CURL_HTTPPOST_BUFFER (1<<4)193/* upload file from pointer contents */194#define CURL_HTTPPOST_PTRBUFFER (1<<5)195/* upload file contents by using the regular read callback to get the data and196pass the given pointer as custom pointer */197#define CURL_HTTPPOST_CALLBACK (1<<6)198/* use size in 'contentlen', added in 7.46.0 */199#define CURL_HTTPPOST_LARGE (1<<7)200201char *showfilename; /* The file name to show. If not set, the202actual file name will be used (if this203is a file part) */204void *userp; /* custom pointer used for205HTTPPOST_CALLBACK posts */206curl_off_t contentlen; /* alternative length of contents207field. Used if CURL_HTTPPOST_LARGE is208set. Added in 7.46.0 */209};210211/* This is the CURLOPT_PROGRESSFUNCTION callback prototype. It is now212considered deprecated but was the only choice up until 7.31.0 */213typedef int (*curl_progress_callback)(void *clientp,214double dltotal,215double dlnow,216double ultotal,217double ulnow);218219/* This is the CURLOPT_XFERINFOFUNCTION callback prototype. It was introduced220in 7.32.0, avoids the use of floating point numbers and provides more221detailed information. */222typedef int (*curl_xferinfo_callback)(void *clientp,223curl_off_t dltotal,224curl_off_t dlnow,225curl_off_t ultotal,226curl_off_t ulnow);227228#ifndef CURL_MAX_READ_SIZE229/* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */230#define CURL_MAX_READ_SIZE 524288231#endif232233#ifndef CURL_MAX_WRITE_SIZE234/* Tests have proven that 20K is a very bad buffer size for uploads on235Windows, while 16K for some odd reason performed a lot better.236We do the ifndef check to allow this value to easier be changed at build237time for those who feel adventurous. The practical minimum is about238400 bytes since libcurl uses a buffer of this size as a scratch area239(unrelated to network send operations). */240#define CURL_MAX_WRITE_SIZE 16384241#endif242243#ifndef CURL_MAX_HTTP_HEADER244/* The only reason to have a max limit for this is to avoid the risk of a bad245server feeding libcurl with a never-ending header that will cause reallocs246infinitely */247#define CURL_MAX_HTTP_HEADER (100*1024)248#endif249250/* This is a magic return code for the write callback that, when returned,251will signal libcurl to pause receiving on the current transfer. */252#define CURL_WRITEFUNC_PAUSE 0x10000001253254typedef size_t (*curl_write_callback)(char *buffer,255size_t size,256size_t nitems,257void *outstream);258259/* This callback will be called when a new resolver request is made */260typedef int (*curl_resolver_start_callback)(void *resolver_state,261void *reserved, void *userdata);262263/* enumeration of file types */264typedef enum {265CURLFILETYPE_FILE = 0,266CURLFILETYPE_DIRECTORY,267CURLFILETYPE_SYMLINK,268CURLFILETYPE_DEVICE_BLOCK,269CURLFILETYPE_DEVICE_CHAR,270CURLFILETYPE_NAMEDPIPE,271CURLFILETYPE_SOCKET,272CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */273274CURLFILETYPE_UNKNOWN /* should never occur */275} curlfiletype;276277#define CURLFINFOFLAG_KNOWN_FILENAME (1<<0)278#define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1)279#define CURLFINFOFLAG_KNOWN_TIME (1<<2)280#define CURLFINFOFLAG_KNOWN_PERM (1<<3)281#define CURLFINFOFLAG_KNOWN_UID (1<<4)282#define CURLFINFOFLAG_KNOWN_GID (1<<5)283#define CURLFINFOFLAG_KNOWN_SIZE (1<<6)284#define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7)285286/* Content of this structure depends on information which is known and is287achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man288page for callbacks returning this structure -- some fields are mandatory,289some others are optional. The FLAG field has special meaning. */290struct curl_fileinfo {291char *filename;292curlfiletype filetype;293time_t time; /* always zero! */294unsigned int perm;295int uid;296int gid;297curl_off_t size;298long int hardlinks;299300struct {301/* If some of these fields is not NULL, it is a pointer to b_data. */302char *time;303char *perm;304char *user;305char *group;306char *target; /* pointer to the target filename of a symlink */307} strings;308309unsigned int flags;310311/* used internally */312char *b_data;313size_t b_size;314size_t b_used;315};316317/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */318#define CURL_CHUNK_BGN_FUNC_OK 0319#define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */320#define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */321322/* if splitting of data transfer is enabled, this callback is called before323download of an individual chunk started. Note that parameter "remains" works324only for FTP wildcard downloading (for now), otherwise is not used */325typedef long (*curl_chunk_bgn_callback)(const void *transfer_info,326void *ptr,327int remains);328329/* return codes for CURLOPT_CHUNK_END_FUNCTION */330#define CURL_CHUNK_END_FUNC_OK 0331#define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */332333/* If splitting of data transfer is enabled this callback is called after334download of an individual chunk finished.335Note! After this callback was set then it have to be called FOR ALL chunks.336Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC.337This is the reason why we don't need "transfer_info" parameter in this338callback and we are not interested in "remains" parameter too. */339typedef long (*curl_chunk_end_callback)(void *ptr);340341/* return codes for FNMATCHFUNCTION */342#define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */343#define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */344#define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */345346/* callback type for wildcard downloading pattern matching. If the347string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */348typedef int (*curl_fnmatch_callback)(void *ptr,349const char *pattern,350const char *string);351352/* These are the return codes for the seek callbacks */353#define CURL_SEEKFUNC_OK 0354#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */355#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so356libcurl might try other means instead */357typedef int (*curl_seek_callback)(void *instream,358curl_off_t offset,359int origin); /* 'whence' */360361/* This is a return code for the read callback that, when returned, will362signal libcurl to immediately abort the current transfer. */363#define CURL_READFUNC_ABORT 0x10000000364/* This is a return code for the read callback that, when returned, will365signal libcurl to pause sending data on the current transfer. */366#define CURL_READFUNC_PAUSE 0x10000001367368/* Return code for when the trailing headers' callback has terminated369without any errors*/370#define CURL_TRAILERFUNC_OK 0371/* Return code for when was an error in the trailing header's list and we372want to abort the request */373#define CURL_TRAILERFUNC_ABORT 1374375typedef size_t (*curl_read_callback)(char *buffer,376size_t size,377size_t nitems,378void *instream);379380typedef int (*curl_trailer_callback)(struct curl_slist **list,381void *userdata);382383typedef enum {384CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */385CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */386CURLSOCKTYPE_LAST /* never use */387} curlsocktype;388389/* The return code from the sockopt_callback can signal information back390to libcurl: */391#define CURL_SOCKOPT_OK 0392#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return393CURLE_ABORTED_BY_CALLBACK */394#define CURL_SOCKOPT_ALREADY_CONNECTED 2395396typedef int (*curl_sockopt_callback)(void *clientp,397curl_socket_t curlfd,398curlsocktype purpose);399400struct curl_sockaddr {401int family;402int socktype;403int protocol;404unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it405turned really ugly and painful on the systems that406lack this type */407struct sockaddr addr;408};409410typedef curl_socket_t411(*curl_opensocket_callback)(void *clientp,412curlsocktype purpose,413struct curl_sockaddr *address);414415typedef int416(*curl_closesocket_callback)(void *clientp, curl_socket_t item);417418typedef enum {419CURLIOE_OK, /* I/O operation successful */420CURLIOE_UNKNOWNCMD, /* command was unknown to callback */421CURLIOE_FAILRESTART, /* failed to restart the read */422CURLIOE_LAST /* never use */423} curlioerr;424425typedef enum {426CURLIOCMD_NOP, /* no operation */427CURLIOCMD_RESTARTREAD, /* restart the read stream from start */428CURLIOCMD_LAST /* never use */429} curliocmd;430431typedef curlioerr (*curl_ioctl_callback)(CURL *handle,432int cmd,433void *clientp);434435#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS436/*437* The following typedef's are signatures of malloc, free, realloc, strdup and438* calloc respectively. Function pointers of these types can be passed to the439* curl_global_init_mem() function to set user defined memory management440* callback routines.441*/442typedef void *(*curl_malloc_callback)(size_t size);443typedef void (*curl_free_callback)(void *ptr);444typedef void *(*curl_realloc_callback)(void *ptr, size_t size);445typedef char *(*curl_strdup_callback)(const char *str);446typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);447448#define CURL_DID_MEMORY_FUNC_TYPEDEFS449#endif450451/* the kind of data that is passed to information_callback*/452typedef enum {453CURLINFO_TEXT = 0,454CURLINFO_HEADER_IN, /* 1 */455CURLINFO_HEADER_OUT, /* 2 */456CURLINFO_DATA_IN, /* 3 */457CURLINFO_DATA_OUT, /* 4 */458CURLINFO_SSL_DATA_IN, /* 5 */459CURLINFO_SSL_DATA_OUT, /* 6 */460CURLINFO_END461} curl_infotype;462463typedef int (*curl_debug_callback)464(CURL *handle, /* the handle/transfer this concerns */465curl_infotype type, /* what kind of data */466char *data, /* points to the data */467size_t size, /* size of the data pointed to */468void *userptr); /* whatever the user please */469470/* All possible error codes from all sorts of curl functions. Future versions471may return other values, stay prepared.472473Always add new return codes last. Never *EVER* remove any. The return474codes must remain the same!475*/476477typedef enum {478CURLE_OK = 0,479CURLE_UNSUPPORTED_PROTOCOL, /* 1 */480CURLE_FAILED_INIT, /* 2 */481CURLE_URL_MALFORMAT, /* 3 */482CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for4837.17.0, reused in April 2011 for 7.21.5] */484CURLE_COULDNT_RESOLVE_PROXY, /* 5 */485CURLE_COULDNT_RESOLVE_HOST, /* 6 */486CURLE_COULDNT_CONNECT, /* 7 */487CURLE_WEIRD_SERVER_REPLY, /* 8 */488CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server489due to lack of access - when login fails490this is not returned. */491CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for4927.15.4, reused in Dec 2011 for 7.24.0]*/493CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */494CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server495[was obsoleted in August 2007 for 7.17.0,496reused in Dec 2011 for 7.24.0]*/497CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */498CURLE_FTP_WEIRD_227_FORMAT, /* 14 */499CURLE_FTP_CANT_GET_HOST, /* 15 */500CURLE_HTTP2, /* 16 - A problem in the http2 framing layer.501[was obsoleted in August 2007 for 7.17.0,502reused in July 2014 for 7.38.0] */503CURLE_FTP_COULDNT_SET_TYPE, /* 17 */504CURLE_PARTIAL_FILE, /* 18 */505CURLE_FTP_COULDNT_RETR_FILE, /* 19 */506CURLE_OBSOLETE20, /* 20 - NOT USED */507CURLE_QUOTE_ERROR, /* 21 - quote command failure */508CURLE_HTTP_RETURNED_ERROR, /* 22 */509CURLE_WRITE_ERROR, /* 23 */510CURLE_OBSOLETE24, /* 24 - NOT USED */511CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */512CURLE_READ_ERROR, /* 26 - couldn't open/read from file */513CURLE_OUT_OF_MEMORY, /* 27 */514/* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error515instead of a memory allocation error if CURL_DOES_CONVERSIONS516is defined517*/518CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */519CURLE_OBSOLETE29, /* 29 - NOT USED */520CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */521CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */522CURLE_OBSOLETE32, /* 32 - NOT USED */523CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */524CURLE_HTTP_POST_ERROR, /* 34 */525CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */526CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */527CURLE_FILE_COULDNT_READ_FILE, /* 37 */528CURLE_LDAP_CANNOT_BIND, /* 38 */529CURLE_LDAP_SEARCH_FAILED, /* 39 */530CURLE_OBSOLETE40, /* 40 - NOT USED */531CURLE_FUNCTION_NOT_FOUND, /* 41 - NOT USED starting with 7.53.0 */532CURLE_ABORTED_BY_CALLBACK, /* 42 */533CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */534CURLE_OBSOLETE44, /* 44 - NOT USED */535CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */536CURLE_OBSOLETE46, /* 46 - NOT USED */537CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */538CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */539CURLE_TELNET_OPTION_SYNTAX, /* 49 - Malformed telnet option */540CURLE_OBSOLETE50, /* 50 - NOT USED */541CURLE_OBSOLETE51, /* 51 - NOT USED */542CURLE_GOT_NOTHING, /* 52 - when this is a specific error */543CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */544CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as545default */546CURLE_SEND_ERROR, /* 55 - failed sending network data */547CURLE_RECV_ERROR, /* 56 - failure in receiving network data */548CURLE_OBSOLETE57, /* 57 - NOT IN USE */549CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */550CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */551CURLE_PEER_FAILED_VERIFICATION, /* 60 - peer's certificate or fingerprint552wasn't verified fine */553CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */554CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */555CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */556CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */557CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind558that failed */559CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */560CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not561accepted and we failed to login */562CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */563CURLE_TFTP_PERM, /* 69 - permission problem on server */564CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */565CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */566CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */567CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */568CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */569CURLE_CONV_FAILED, /* 75 - conversion failed */570CURLE_CONV_REQD, /* 76 - caller must register conversion571callbacks using curl_easy_setopt options572CURLOPT_CONV_FROM_NETWORK_FUNCTION,573CURLOPT_CONV_TO_NETWORK_FUNCTION, and574CURLOPT_CONV_FROM_UTF8_FUNCTION */575CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing576or wrong format */577CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */578CURLE_SSH, /* 79 - error from the SSH layer, somewhat579generic so the error message will be of580interest when this has happened */581582CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL583connection */584CURLE_AGAIN, /* 81 - socket is not ready for send/recv,585wait till it's ready and try again (Added586in 7.18.2) */587CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or588wrong format (Added in 7.19.0) */589CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in5907.19.0) */591CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */592CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */593CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */594CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */595CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */596CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the597session will be queued */598CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not599match */600CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */601CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer602*/603CURLE_RECURSIVE_API_CALL, /* 93 - an api function was called from604inside a callback */605CURL_LAST /* never use! */606} CURLcode;607608#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all609the obsolete stuff removed! */610611/* Previously obsolete error code re-used in 7.38.0 */612#define CURLE_OBSOLETE16 CURLE_HTTP2613614/* Previously obsolete error codes re-used in 7.24.0 */615#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED616#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT617618/* compatibility with older names */619#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING620#define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY621622/* The following were added in 7.62.0 */623#define CURLE_SSL_CACERT CURLE_PEER_FAILED_VERIFICATION624625/* The following were added in 7.21.5, April 2011 */626#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION627628/* The following were added in 7.17.1 */629/* These are scheduled to disappear by 2009 */630#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION631632/* The following were added in 7.17.0 */633/* These are scheduled to disappear by 2009 */634#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */635#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46636#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44637#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10638#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16639#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32640#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29641#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12642#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20643#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40644#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24645#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57646#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN647648#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED649#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE650#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR651#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL652#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS653#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR654#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED655656/* The following were added earlier */657658#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT659660#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR661#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED662#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED663664#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE665#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME666667/* This was the error code 50 in 7.7.3 and a few earlier versions, this668is no longer used by libcurl but is instead #defined here only to not669make programs break */670#define CURLE_ALREADY_COMPLETE 99999671672/* Provide defines for really old option names */673#define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */674#define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */675#define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA676677/* Since long deprecated options with no code in the lib that does anything678with them. */679#define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40680#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72681682#endif /*!CURL_NO_OLDIES*/683684/* This prototype applies to all conversion callbacks */685typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);686687typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */688void *ssl_ctx, /* actually an OpenSSL689or WolfSSL SSL_CTX,690or an mbedTLS691mbedtls_ssl_config */692void *userptr);693694typedef enum {695CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use696CONNECT HTTP/1.1 */697CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT698HTTP/1.0 */699CURLPROXY_HTTPS = 2, /* added in 7.52.0 */700CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already701in 7.10 */702CURLPROXY_SOCKS5 = 5, /* added in 7.10 */703CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */704CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the705host name rather than the IP address. added706in 7.18.0 */707} curl_proxytype; /* this enum was added in 7.10 */708709/*710* Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options:711*712* CURLAUTH_NONE - No HTTP authentication713* CURLAUTH_BASIC - HTTP Basic authentication (default)714* CURLAUTH_DIGEST - HTTP Digest authentication715* CURLAUTH_NEGOTIATE - HTTP Negotiate (SPNEGO) authentication716* CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated)717* CURLAUTH_NTLM - HTTP NTLM authentication718* CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour719* CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper720* CURLAUTH_BEARER - HTTP Bearer token authentication721* CURLAUTH_ONLY - Use together with a single other type to force no722* authentication or just that single type723* CURLAUTH_ANY - All fine types set724* CURLAUTH_ANYSAFE - All fine types except Basic725*/726727#define CURLAUTH_NONE ((unsigned long)0)728#define CURLAUTH_BASIC (((unsigned long)1)<<0)729#define CURLAUTH_DIGEST (((unsigned long)1)<<1)730#define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2)731/* Deprecated since the advent of CURLAUTH_NEGOTIATE */732#define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE733/* Used for CURLOPT_SOCKS5_AUTH to stay terminologically correct */734#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE735#define CURLAUTH_NTLM (((unsigned long)1)<<3)736#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4)737#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5)738#define CURLAUTH_BEARER (((unsigned long)1)<<6)739#define CURLAUTH_ONLY (((unsigned long)1)<<31)740#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)741#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))742743#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */744#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */745#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */746#define CURLSSH_AUTH_PASSWORD (1<<1) /* password */747#define CURLSSH_AUTH_HOST (1<<2) /* host key files */748#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */749#define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */750#define CURLSSH_AUTH_GSSAPI (1<<5) /* gssapi (kerberos, ...) */751#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY752753#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */754#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */755#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */756757#define CURL_ERROR_SIZE 256758759enum curl_khtype {760CURLKHTYPE_UNKNOWN,761CURLKHTYPE_RSA1,762CURLKHTYPE_RSA,763CURLKHTYPE_DSS,764CURLKHTYPE_ECDSA,765CURLKHTYPE_ED25519766};767768struct curl_khkey {769const char *key; /* points to a zero-terminated string encoded with base64770if len is zero, otherwise to the "raw" data */771size_t len;772enum curl_khtype keytype;773};774775/* this is the set of return values expected from the curl_sshkeycallback776callback */777enum curl_khstat {778CURLKHSTAT_FINE_ADD_TO_FILE,779CURLKHSTAT_FINE,780CURLKHSTAT_REJECT, /* reject the connection, return an error */781CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so782this causes a CURLE_DEFER error but otherwise the783connection will be left intact etc */784CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */785};786787/* this is the set of status codes pass in to the callback */788enum curl_khmatch {789CURLKHMATCH_OK, /* match */790CURLKHMATCH_MISMATCH, /* host found, key mismatch! */791CURLKHMATCH_MISSING, /* no matching host/key found */792CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */793};794795typedef int796(*curl_sshkeycallback) (CURL *easy, /* easy handle */797const struct curl_khkey *knownkey, /* known */798const struct curl_khkey *foundkey, /* found */799enum curl_khmatch, /* libcurl's view on the keys */800void *clientp); /* custom pointer passed from app */801802/* parameter for the CURLOPT_USE_SSL option */803typedef enum {804CURLUSESSL_NONE, /* do not attempt to use SSL */805CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */806CURLUSESSL_CONTROL, /* SSL for the control connection or fail */807CURLUSESSL_ALL, /* SSL for all communication or fail */808CURLUSESSL_LAST /* not an option, never use */809} curl_usessl;810811/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */812813/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the814name of improving interoperability with older servers. Some SSL libraries815have introduced work-arounds for this flaw but those work-arounds sometimes816make the SSL communication fail. To regain functionality with those broken817servers, a user can this way allow the vulnerability back. */818#define CURLSSLOPT_ALLOW_BEAST (1<<0)819820/* - NO_REVOKE tells libcurl to disable certificate revocation checks for those821SSL backends where such behavior is present. */822#define CURLSSLOPT_NO_REVOKE (1<<1)823824/* The default connection attempt delay in milliseconds for happy eyeballs.825CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document826this value, keep them in sync. */827#define CURL_HET_DEFAULT 200L828829/* The default connection upkeep interval in milliseconds. */830#define CURL_UPKEEP_INTERVAL_DEFAULT 60000L831832#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all833the obsolete stuff removed! */834835/* Backwards compatibility with older names */836/* These are scheduled to disappear by 2009 */837838#define CURLFTPSSL_NONE CURLUSESSL_NONE839#define CURLFTPSSL_TRY CURLUSESSL_TRY840#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL841#define CURLFTPSSL_ALL CURLUSESSL_ALL842#define CURLFTPSSL_LAST CURLUSESSL_LAST843#define curl_ftpssl curl_usessl844#endif /*!CURL_NO_OLDIES*/845846/* parameter for the CURLOPT_FTP_SSL_CCC option */847typedef enum {848CURLFTPSSL_CCC_NONE, /* do not send CCC */849CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */850CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */851CURLFTPSSL_CCC_LAST /* not an option, never use */852} curl_ftpccc;853854/* parameter for the CURLOPT_FTPSSLAUTH option */855typedef enum {856CURLFTPAUTH_DEFAULT, /* let libcurl decide */857CURLFTPAUTH_SSL, /* use "AUTH SSL" */858CURLFTPAUTH_TLS, /* use "AUTH TLS" */859CURLFTPAUTH_LAST /* not an option, never use */860} curl_ftpauth;861862/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */863typedef enum {864CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */865CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD866again if MKD succeeded, for SFTP this does867similar magic */868CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD869again even if MKD failed! */870CURLFTP_CREATE_DIR_LAST /* not an option, never use */871} curl_ftpcreatedir;872873/* parameter for the CURLOPT_FTP_FILEMETHOD option */874typedef enum {875CURLFTPMETHOD_DEFAULT, /* let libcurl pick */876CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */877CURLFTPMETHOD_NOCWD, /* no CWD at all */878CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */879CURLFTPMETHOD_LAST /* not an option, never use */880} curl_ftpmethod;881882/* bitmask defines for CURLOPT_HEADEROPT */883#define CURLHEADER_UNIFIED 0884#define CURLHEADER_SEPARATE (1<<0)885886/* CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option */887#define CURLALTSVC_IMMEDIATELY (1<<0)888#define CURLALTSVC_ALTUSED (1<<1)889#define CURLALTSVC_READONLYFILE (1<<2)890#define CURLALTSVC_H1 (1<<3)891#define CURLALTSVC_H2 (1<<4)892#define CURLALTSVC_H3 (1<<5)893894/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */895#define CURLPROTO_HTTP (1<<0)896#define CURLPROTO_HTTPS (1<<1)897#define CURLPROTO_FTP (1<<2)898#define CURLPROTO_FTPS (1<<3)899#define CURLPROTO_SCP (1<<4)900#define CURLPROTO_SFTP (1<<5)901#define CURLPROTO_TELNET (1<<6)902#define CURLPROTO_LDAP (1<<7)903#define CURLPROTO_LDAPS (1<<8)904#define CURLPROTO_DICT (1<<9)905#define CURLPROTO_FILE (1<<10)906#define CURLPROTO_TFTP (1<<11)907#define CURLPROTO_IMAP (1<<12)908#define CURLPROTO_IMAPS (1<<13)909#define CURLPROTO_POP3 (1<<14)910#define CURLPROTO_POP3S (1<<15)911#define CURLPROTO_SMTP (1<<16)912#define CURLPROTO_SMTPS (1<<17)913#define CURLPROTO_RTSP (1<<18)914#define CURLPROTO_RTMP (1<<19)915#define CURLPROTO_RTMPT (1<<20)916#define CURLPROTO_RTMPE (1<<21)917#define CURLPROTO_RTMPTE (1<<22)918#define CURLPROTO_RTMPS (1<<23)919#define CURLPROTO_RTMPTS (1<<24)920#define CURLPROTO_GOPHER (1<<25)921#define CURLPROTO_SMB (1<<26)922#define CURLPROTO_SMBS (1<<27)923#define CURLPROTO_ALL (~0) /* enable everything */924925/* long may be 32 or 64 bits, but we should never depend on anything else926but 32 */927#define CURLOPTTYPE_LONG 0928#define CURLOPTTYPE_OBJECTPOINT 10000929#define CURLOPTTYPE_FUNCTIONPOINT 20000930#define CURLOPTTYPE_OFF_T 30000931932/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the933string options from the header file */934935/* name is uppercase CURLOPT_<name>,936type is one of the defined CURLOPTTYPE_<type>937number is unique identifier */938#ifdef CINIT939#undef CINIT940#endif941942#ifdef CURL_ISOCPP943#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu944#else945/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */946#define LONG CURLOPTTYPE_LONG947#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT948#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT949#define OFF_T CURLOPTTYPE_OFF_T950#define CINIT(name,type,number) CURLOPT_/**/name = type + number951#endif952953/* handy aliases that make no run-time difference */954#define CURLOPTTYPE_STRINGPOINT CURLOPTTYPE_OBJECTPOINT955#define CURLOPTTYPE_SLISTPOINT CURLOPTTYPE_OBJECTPOINT956957/*958* This macro-mania below setups the CURLOPT_[what] enum, to be used with959* curl_easy_setopt(). The first argument in the CINIT() macro is the [what]960* word.961*/962963typedef enum {964/* This is the FILE * or void * the regular output should be written to. */965CINIT(WRITEDATA, OBJECTPOINT, 1),966967/* The full URL to get/put */968CINIT(URL, STRINGPOINT, 2),969970/* Port number to connect to, if other than default. */971CINIT(PORT, LONG, 3),972973/* Name of proxy to use. */974CINIT(PROXY, STRINGPOINT, 4),975976/* "user:password;options" to use when fetching. */977CINIT(USERPWD, STRINGPOINT, 5),978979/* "user:password" to use with proxy. */980CINIT(PROXYUSERPWD, STRINGPOINT, 6),981982/* Range to get, specified as an ASCII string. */983CINIT(RANGE, STRINGPOINT, 7),984985/* not used */986987/* Specified file stream to upload from (use as input): */988CINIT(READDATA, OBJECTPOINT, 9),989990/* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE991* bytes big. */992CINIT(ERRORBUFFER, OBJECTPOINT, 10),993994/* Function that will be called to store the output (instead of fwrite). The995* parameters will use fwrite() syntax, make sure to follow them. */996CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11),997998/* Function that will be called to read the input (instead of fread). The999* parameters will use fread() syntax, make sure to follow them. */1000CINIT(READFUNCTION, FUNCTIONPOINT, 12),10011002/* Time-out the read operation after this amount of seconds */1003CINIT(TIMEOUT, LONG, 13),10041005/* If the CURLOPT_INFILE is used, this can be used to inform libcurl about1006* how large the file being sent really is. That allows better error1007* checking and better verifies that the upload was successful. -1 means1008* unknown size.1009*1010* For large file support, there is also a _LARGE version of the key1011* which takes an off_t type, allowing platforms with larger off_t1012* sizes to handle larger files. See below for INFILESIZE_LARGE.1013*/1014CINIT(INFILESIZE, LONG, 14),10151016/* POST static input fields. */1017CINIT(POSTFIELDS, OBJECTPOINT, 15),10181019/* Set the referrer page (needed by some CGIs) */1020CINIT(REFERER, STRINGPOINT, 16),10211022/* Set the FTP PORT string (interface name, named or numerical IP address)1023Use i.e '-' to use default address. */1024CINIT(FTPPORT, STRINGPOINT, 17),10251026/* Set the User-Agent string (examined by some CGIs) */1027CINIT(USERAGENT, STRINGPOINT, 18),10281029/* If the download receives less than "low speed limit" bytes/second1030* during "low speed time" seconds, the operations is aborted.1031* You could i.e if you have a pretty high speed connection, abort if1032* it is less than 2000 bytes/sec during 20 seconds.1033*/10341035/* Set the "low speed limit" */1036CINIT(LOW_SPEED_LIMIT, LONG, 19),10371038/* Set the "low speed time" */1039CINIT(LOW_SPEED_TIME, LONG, 20),10401041/* Set the continuation offset.1042*1043* Note there is also a _LARGE version of this key which uses1044* off_t types, allowing for large file offsets on platforms which1045* use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE.1046*/1047CINIT(RESUME_FROM, LONG, 21),10481049/* Set cookie in request: */1050CINIT(COOKIE, STRINGPOINT, 22),10511052/* This points to a linked list of headers, struct curl_slist kind. This1053list is also used for RTSP (in spite of its name) */1054CINIT(HTTPHEADER, SLISTPOINT, 23),10551056/* This points to a linked list of post entries, struct curl_httppost */1057CINIT(HTTPPOST, OBJECTPOINT, 24),10581059/* name of the file keeping your private SSL-certificate */1060CINIT(SSLCERT, STRINGPOINT, 25),10611062/* password for the SSL or SSH private key */1063CINIT(KEYPASSWD, STRINGPOINT, 26),10641065/* send TYPE parameter? */1066CINIT(CRLF, LONG, 27),10671068/* send linked-list of QUOTE commands */1069CINIT(QUOTE, SLISTPOINT, 28),10701071/* send FILE * or void * to store headers to, if you use a callback it1072is simply passed to the callback unmodified */1073CINIT(HEADERDATA, OBJECTPOINT, 29),10741075/* point to a file to read the initial cookies from, also enables1076"cookie awareness" */1077CINIT(COOKIEFILE, STRINGPOINT, 31),10781079/* What version to specifically try to use.1080See CURL_SSLVERSION defines below. */1081CINIT(SSLVERSION, LONG, 32),10821083/* What kind of HTTP time condition to use, see defines */1084CINIT(TIMECONDITION, LONG, 33),10851086/* Time to use with the above condition. Specified in number of seconds1087since 1 Jan 1970 */1088CINIT(TIMEVALUE, LONG, 34),10891090/* 35 = OBSOLETE */10911092/* Custom request, for customizing the get command like1093HTTP: DELETE, TRACE and others1094FTP: to use a different list command1095*/1096CINIT(CUSTOMREQUEST, STRINGPOINT, 36),10971098/* FILE handle to use instead of stderr */1099CINIT(STDERR, OBJECTPOINT, 37),11001101/* 38 is not used */11021103/* send linked-list of post-transfer QUOTE commands */1104CINIT(POSTQUOTE, SLISTPOINT, 39),11051106CINIT(OBSOLETE40, OBJECTPOINT, 40), /* OBSOLETE, do not use! */11071108CINIT(VERBOSE, LONG, 41), /* talk a lot */1109CINIT(HEADER, LONG, 42), /* throw the header out too */1110CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */1111CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */1112CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 400 */1113CINIT(UPLOAD, LONG, 46), /* this is an upload */1114CINIT(POST, LONG, 47), /* HTTP POST method */1115CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */11161117CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */11181119/* Specify whether to read the user+password from the .netrc or the URL.1120* This must be one of the CURL_NETRC_* enums below. */1121CINIT(NETRC, LONG, 51),11221123CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */11241125CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */1126CINIT(PUT, LONG, 54), /* HTTP PUT */11271128/* 55 = OBSOLETE */11291130/* DEPRECATED1131* Function that will be called instead of the internal progress display1132* function. This function should be defined as the curl_progress_callback1133* prototype defines. */1134CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56),11351136/* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION1137callbacks */1138CINIT(PROGRESSDATA, OBJECTPOINT, 57),1139#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA11401141/* We want the referrer field set automatically when following locations */1142CINIT(AUTOREFERER, LONG, 58),11431144/* Port of the proxy, can be set in the proxy string as well with:1145"[host]:[port]" */1146CINIT(PROXYPORT, LONG, 59),11471148/* size of the POST input data, if strlen() is not good to use */1149CINIT(POSTFIELDSIZE, LONG, 60),11501151/* tunnel non-http operations through a HTTP proxy */1152CINIT(HTTPPROXYTUNNEL, LONG, 61),11531154/* Set the interface string to use as outgoing network interface */1155CINIT(INTERFACE, STRINGPOINT, 62),11561157/* Set the krb4/5 security level, this also enables krb4/5 awareness. This1158* is a string, 'clear', 'safe', 'confidential' or 'private'. If the string1159* is set but doesn't match one of these, 'private' will be used. */1160CINIT(KRBLEVEL, STRINGPOINT, 63),11611162/* Set if we should verify the peer in ssl handshake, set 1 to verify. */1163CINIT(SSL_VERIFYPEER, LONG, 64),11641165/* The CApath or CAfile used to validate the peer certificate1166this option is used only if SSL_VERIFYPEER is true */1167CINIT(CAINFO, STRINGPOINT, 65),11681169/* 66 = OBSOLETE */1170/* 67 = OBSOLETE */11711172/* Maximum number of http redirects to follow */1173CINIT(MAXREDIRS, LONG, 68),11741175/* Pass a long set to 1 to get the date of the requested document (if1176possible)! Pass a zero to shut it off. */1177CINIT(FILETIME, LONG, 69),11781179/* This points to a linked list of telnet options */1180CINIT(TELNETOPTIONS, SLISTPOINT, 70),11811182/* Max amount of cached alive connections */1183CINIT(MAXCONNECTS, LONG, 71),11841185CINIT(OBSOLETE72, LONG, 72), /* OBSOLETE, do not use! */11861187/* 73 = OBSOLETE */11881189/* Set to explicitly use a new connection for the upcoming transfer.1190Do not use this unless you're absolutely sure of this, as it makes the1191operation slower and is less friendly for the network. */1192CINIT(FRESH_CONNECT, LONG, 74),11931194/* Set to explicitly forbid the upcoming transfer's connection to be re-used1195when done. Do not use this unless you're absolutely sure of this, as it1196makes the operation slower and is less friendly for the network. */1197CINIT(FORBID_REUSE, LONG, 75),11981199/* Set to a file name that contains random data for libcurl to use to1200seed the random engine when doing SSL connects. */1201CINIT(RANDOM_FILE, STRINGPOINT, 76),12021203/* Set to the Entropy Gathering Daemon socket pathname */1204CINIT(EGDSOCKET, STRINGPOINT, 77),12051206/* Time-out connect operations after this amount of seconds, if connects are1207OK within this time, then fine... This only aborts the connect phase. */1208CINIT(CONNECTTIMEOUT, LONG, 78),12091210/* Function that will be called to store headers (instead of fwrite). The1211* parameters will use fwrite() syntax, make sure to follow them. */1212CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79),12131214/* Set this to force the HTTP request to get back to GET. Only really usable1215if POST, PUT or a custom request have been used first.1216*/1217CINIT(HTTPGET, LONG, 80),12181219/* Set if we should verify the Common name from the peer certificate in ssl1220* handshake, set 1 to check existence, 2 to ensure that it matches the1221* provided hostname. */1222CINIT(SSL_VERIFYHOST, LONG, 81),12231224/* Specify which file name to write all known cookies in after completed1225operation. Set file name to "-" (dash) to make it go to stdout. */1226CINIT(COOKIEJAR, STRINGPOINT, 82),12271228/* Specify which SSL ciphers to use */1229CINIT(SSL_CIPHER_LIST, STRINGPOINT, 83),12301231/* Specify which HTTP version to use! This must be set to one of the1232CURL_HTTP_VERSION* enums set below. */1233CINIT(HTTP_VERSION, LONG, 84),12341235/* Specifically switch on or off the FTP engine's use of the EPSV command. By1236default, that one will always be attempted before the more traditional1237PASV command. */1238CINIT(FTP_USE_EPSV, LONG, 85),12391240/* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */1241CINIT(SSLCERTTYPE, STRINGPOINT, 86),12421243/* name of the file keeping your private SSL-key */1244CINIT(SSLKEY, STRINGPOINT, 87),12451246/* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */1247CINIT(SSLKEYTYPE, STRINGPOINT, 88),12481249/* crypto engine for the SSL-sub system */1250CINIT(SSLENGINE, STRINGPOINT, 89),12511252/* set the crypto engine for the SSL-sub system as default1253the param has no meaning...1254*/1255CINIT(SSLENGINE_DEFAULT, LONG, 90),12561257/* Non-zero value means to use the global dns cache */1258CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */12591260/* DNS cache timeout */1261CINIT(DNS_CACHE_TIMEOUT, LONG, 92),12621263/* send linked-list of pre-transfer QUOTE commands */1264CINIT(PREQUOTE, SLISTPOINT, 93),12651266/* set the debug function */1267CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94),12681269/* set the data for the debug function */1270CINIT(DEBUGDATA, OBJECTPOINT, 95),12711272/* mark this as start of a cookie session */1273CINIT(COOKIESESSION, LONG, 96),12741275/* The CApath directory used to validate the peer certificate1276this option is used only if SSL_VERIFYPEER is true */1277CINIT(CAPATH, STRINGPOINT, 97),12781279/* Instruct libcurl to use a smaller receive buffer */1280CINIT(BUFFERSIZE, LONG, 98),12811282/* Instruct libcurl to not use any signal/alarm handlers, even when using1283timeouts. This option is useful for multi-threaded applications.1284See libcurl-the-guide for more background information. */1285CINIT(NOSIGNAL, LONG, 99),12861287/* Provide a CURLShare for mutexing non-ts data */1288CINIT(SHARE, OBJECTPOINT, 100),12891290/* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),1291CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and1292CURLPROXY_SOCKS5. */1293CINIT(PROXYTYPE, LONG, 101),12941295/* Set the Accept-Encoding string. Use this to tell a server you would like1296the response to be compressed. Before 7.21.6, this was known as1297CURLOPT_ENCODING */1298CINIT(ACCEPT_ENCODING, STRINGPOINT, 102),12991300/* Set pointer to private data */1301CINIT(PRIVATE, OBJECTPOINT, 103),13021303/* Set aliases for HTTP 200 in the HTTP Response header */1304CINIT(HTTP200ALIASES, SLISTPOINT, 104),13051306/* Continue to send authentication (user+password) when following locations,1307even when hostname changed. This can potentially send off the name1308and password to whatever host the server decides. */1309CINIT(UNRESTRICTED_AUTH, LONG, 105),13101311/* Specifically switch on or off the FTP engine's use of the EPRT command (1312it also disables the LPRT attempt). By default, those ones will always be1313attempted before the good old traditional PORT command. */1314CINIT(FTP_USE_EPRT, LONG, 106),13151316/* Set this to a bitmask value to enable the particular authentications1317methods you like. Use this in combination with CURLOPT_USERPWD.1318Note that setting multiple bits may cause extra network round-trips. */1319CINIT(HTTPAUTH, LONG, 107),13201321/* Set the ssl context callback function, currently only for OpenSSL or1322WolfSSL ssl_ctx, or mbedTLS mbedtls_ssl_config in the second argument.1323The function must match the curl_ssl_ctx_callback prototype. */1324CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108),13251326/* Set the userdata for the ssl context callback function's third1327argument */1328CINIT(SSL_CTX_DATA, OBJECTPOINT, 109),13291330/* FTP Option that causes missing dirs to be created on the remote server.1331In 7.19.4 we introduced the convenience enums for this option using the1332CURLFTP_CREATE_DIR prefix.1333*/1334CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110),13351336/* Set this to a bitmask value to enable the particular authentications1337methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.1338Note that setting multiple bits may cause extra network round-trips. */1339CINIT(PROXYAUTH, LONG, 111),13401341/* FTP option that changes the timeout, in seconds, associated with1342getting a response. This is different from transfer timeout time and1343essentially places a demand on the FTP server to acknowledge commands1344in a timely manner. */1345CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112),1346#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT13471348/* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to1349tell libcurl to resolve names to those IP versions only. This only has1350affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */1351CINIT(IPRESOLVE, LONG, 113),13521353/* Set this option to limit the size of a file that will be downloaded from1354an HTTP or FTP server.13551356Note there is also _LARGE version which adds large file support for1357platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */1358CINIT(MAXFILESIZE, LONG, 114),13591360/* See the comment for INFILESIZE above, but in short, specifies1361* the size of the file being uploaded. -1 means unknown.1362*/1363CINIT(INFILESIZE_LARGE, OFF_T, 115),13641365/* Sets the continuation offset. There is also a LONG version of this;1366* look above for RESUME_FROM.1367*/1368CINIT(RESUME_FROM_LARGE, OFF_T, 116),13691370/* Sets the maximum size of data that will be downloaded from1371* an HTTP or FTP server. See MAXFILESIZE above for the LONG version.1372*/1373CINIT(MAXFILESIZE_LARGE, OFF_T, 117),13741375/* Set this option to the file name of your .netrc file you want libcurl1376to parse (using the CURLOPT_NETRC option). If not set, libcurl will do1377a poor attempt to find the user's home directory and check for a .netrc1378file in there. */1379CINIT(NETRC_FILE, STRINGPOINT, 118),13801381/* Enable SSL/TLS for FTP, pick one of:1382CURLUSESSL_TRY - try using SSL, proceed anyway otherwise1383CURLUSESSL_CONTROL - SSL for the control connection or fail1384CURLUSESSL_ALL - SSL for all communication or fail1385*/1386CINIT(USE_SSL, LONG, 119),13871388/* The _LARGE version of the standard POSTFIELDSIZE option */1389CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),13901391/* Enable/disable the TCP Nagle algorithm */1392CINIT(TCP_NODELAY, LONG, 121),13931394/* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */1395/* 123 OBSOLETE. Gone in 7.16.0 */1396/* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */1397/* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */1398/* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */1399/* 127 OBSOLETE. Gone in 7.16.0 */1400/* 128 OBSOLETE. Gone in 7.16.0 */14011402/* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option1403can be used to change libcurl's default action which is to first try1404"AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK1405response has been received.14061407Available parameters are:1408CURLFTPAUTH_DEFAULT - let libcurl decide1409CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS1410CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL1411*/1412CINIT(FTPSSLAUTH, LONG, 129),14131414CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130),1415CINIT(IOCTLDATA, OBJECTPOINT, 131),14161417/* 132 OBSOLETE. Gone in 7.16.0 */1418/* 133 OBSOLETE. Gone in 7.16.0 */14191420/* zero terminated string for pass on to the FTP server when asked for1421"account" info */1422CINIT(FTP_ACCOUNT, STRINGPOINT, 134),14231424/* feed cookie into cookie engine */1425CINIT(COOKIELIST, STRINGPOINT, 135),14261427/* ignore Content-Length */1428CINIT(IGNORE_CONTENT_LENGTH, LONG, 136),14291430/* Set to non-zero to skip the IP address received in a 227 PASV FTP server1431response. Typically used for FTP-SSL purposes but is not restricted to1432that. libcurl will then instead use the same IP address it used for the1433control connection. */1434CINIT(FTP_SKIP_PASV_IP, LONG, 137),14351436/* Select "file method" to use when doing FTP, see the curl_ftpmethod1437above. */1438CINIT(FTP_FILEMETHOD, LONG, 138),14391440/* Local port number to bind the socket to */1441CINIT(LOCALPORT, LONG, 139),14421443/* Number of ports to try, including the first one set with LOCALPORT.1444Thus, setting it to 1 will make no additional attempts but the first.1445*/1446CINIT(LOCALPORTRANGE, LONG, 140),14471448/* no transfer, set up connection and let application use the socket by1449extracting it with CURLINFO_LASTSOCKET */1450CINIT(CONNECT_ONLY, LONG, 141),14511452/* Function that will be called to convert from the1453network encoding (instead of using the iconv calls in libcurl) */1454CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142),14551456/* Function that will be called to convert to the1457network encoding (instead of using the iconv calls in libcurl) */1458CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143),14591460/* Function that will be called to convert from UTF81461(instead of using the iconv calls in libcurl)1462Note that this is used only for SSL certificate processing */1463CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144),14641465/* if the connection proceeds too quickly then need to slow it down */1466/* limit-rate: maximum number of bytes per second to send or receive */1467CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145),1468CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146),14691470/* Pointer to command string to send if USER/PASS fails. */1471CINIT(FTP_ALTERNATIVE_TO_USER, STRINGPOINT, 147),14721473/* callback function for setting socket options */1474CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148),1475CINIT(SOCKOPTDATA, OBJECTPOINT, 149),14761477/* set to 0 to disable session ID re-use for this transfer, default is1478enabled (== 1) */1479CINIT(SSL_SESSIONID_CACHE, LONG, 150),14801481/* allowed SSH authentication methods */1482CINIT(SSH_AUTH_TYPES, LONG, 151),14831484/* Used by scp/sftp to do public/private key authentication */1485CINIT(SSH_PUBLIC_KEYFILE, STRINGPOINT, 152),1486CINIT(SSH_PRIVATE_KEYFILE, STRINGPOINT, 153),14871488/* Send CCC (Clear Command Channel) after authentication */1489CINIT(FTP_SSL_CCC, LONG, 154),14901491/* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */1492CINIT(TIMEOUT_MS, LONG, 155),1493CINIT(CONNECTTIMEOUT_MS, LONG, 156),14941495/* set to zero to disable the libcurl's decoding and thus pass the raw body1496data to the application even when it is encoded/compressed */1497CINIT(HTTP_TRANSFER_DECODING, LONG, 157),1498CINIT(HTTP_CONTENT_DECODING, LONG, 158),14991500/* Permission used when creating new files and directories on the remote1501server for protocols that support it, SFTP/SCP/FILE */1502CINIT(NEW_FILE_PERMS, LONG, 159),1503CINIT(NEW_DIRECTORY_PERMS, LONG, 160),15041505/* Set the behaviour of POST when redirecting. Values must be set to one1506of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */1507CINIT(POSTREDIR, LONG, 161),15081509/* used by scp/sftp to verify the host's public key */1510CINIT(SSH_HOST_PUBLIC_KEY_MD5, STRINGPOINT, 162),15111512/* Callback function for opening socket (instead of socket(2)). Optionally,1513callback is able change the address or refuse to connect returning1514CURL_SOCKET_BAD. The callback should have type1515curl_opensocket_callback */1516CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163),1517CINIT(OPENSOCKETDATA, OBJECTPOINT, 164),15181519/* POST volatile input fields. */1520CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165),15211522/* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */1523CINIT(PROXY_TRANSFER_MODE, LONG, 166),15241525/* Callback function for seeking in the input stream */1526CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167),1527CINIT(SEEKDATA, OBJECTPOINT, 168),15281529/* CRL file */1530CINIT(CRLFILE, STRINGPOINT, 169),15311532/* Issuer certificate */1533CINIT(ISSUERCERT, STRINGPOINT, 170),15341535/* (IPv6) Address scope */1536CINIT(ADDRESS_SCOPE, LONG, 171),15371538/* Collect certificate chain info and allow it to get retrievable with1539CURLINFO_CERTINFO after the transfer is complete. */1540CINIT(CERTINFO, LONG, 172),15411542/* "name" and "pwd" to use when fetching. */1543CINIT(USERNAME, STRINGPOINT, 173),1544CINIT(PASSWORD, STRINGPOINT, 174),15451546/* "name" and "pwd" to use with Proxy when fetching. */1547CINIT(PROXYUSERNAME, STRINGPOINT, 175),1548CINIT(PROXYPASSWORD, STRINGPOINT, 176),15491550/* Comma separated list of hostnames defining no-proxy zones. These should1551match both hostnames directly, and hostnames within a domain. For1552example, local.com will match local.com and www.local.com, but NOT1553notlocal.com or www.notlocal.com. For compatibility with other1554implementations of this, .local.com will be considered to be the same as1555local.com. A single * is the only valid wildcard, and effectively1556disables the use of proxy. */1557CINIT(NOPROXY, STRINGPOINT, 177),15581559/* block size for TFTP transfers */1560CINIT(TFTP_BLKSIZE, LONG, 178),15611562/* Socks Service */1563CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179), /* DEPRECATED, do not use! */15641565/* Socks Service */1566CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),15671568/* set the bitmask for the protocols that are allowed to be used for the1569transfer, which thus helps the app which takes URLs from users or other1570external inputs and want to restrict what protocol(s) to deal1571with. Defaults to CURLPROTO_ALL. */1572CINIT(PROTOCOLS, LONG, 181),15731574/* set the bitmask for the protocols that libcurl is allowed to follow to,1575as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs1576to be set in both bitmasks to be allowed to get redirected to. */1577CINIT(REDIR_PROTOCOLS, LONG, 182),15781579/* set the SSH knownhost file name to use */1580CINIT(SSH_KNOWNHOSTS, STRINGPOINT, 183),15811582/* set the SSH host key callback, must point to a curl_sshkeycallback1583function */1584CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184),15851586/* set the SSH host key callback custom pointer */1587CINIT(SSH_KEYDATA, OBJECTPOINT, 185),15881589/* set the SMTP mail originator */1590CINIT(MAIL_FROM, STRINGPOINT, 186),15911592/* set the list of SMTP mail receiver(s) */1593CINIT(MAIL_RCPT, SLISTPOINT, 187),15941595/* FTP: send PRET before PASV */1596CINIT(FTP_USE_PRET, LONG, 188),15971598/* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */1599CINIT(RTSP_REQUEST, LONG, 189),16001601/* The RTSP session identifier */1602CINIT(RTSP_SESSION_ID, STRINGPOINT, 190),16031604/* The RTSP stream URI */1605CINIT(RTSP_STREAM_URI, STRINGPOINT, 191),16061607/* The Transport: header to use in RTSP requests */1608CINIT(RTSP_TRANSPORT, STRINGPOINT, 192),16091610/* Manually initialize the client RTSP CSeq for this handle */1611CINIT(RTSP_CLIENT_CSEQ, LONG, 193),16121613/* Manually initialize the server RTSP CSeq for this handle */1614CINIT(RTSP_SERVER_CSEQ, LONG, 194),16151616/* The stream to pass to INTERLEAVEFUNCTION. */1617CINIT(INTERLEAVEDATA, OBJECTPOINT, 195),16181619/* Let the application define a custom write method for RTP data */1620CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196),16211622/* Turn on wildcard matching */1623CINIT(WILDCARDMATCH, LONG, 197),16241625/* Directory matching callback called before downloading of an1626individual file (chunk) started */1627CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198),16281629/* Directory matching callback called after the file (chunk)1630was downloaded, or skipped */1631CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199),16321633/* Change match (fnmatch-like) callback for wildcard matching */1634CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200),16351636/* Let the application define custom chunk data pointer */1637CINIT(CHUNK_DATA, OBJECTPOINT, 201),16381639/* FNMATCH_FUNCTION user pointer */1640CINIT(FNMATCH_DATA, OBJECTPOINT, 202),16411642/* send linked-list of name:port:address sets */1643CINIT(RESOLVE, SLISTPOINT, 203),16441645/* Set a username for authenticated TLS */1646CINIT(TLSAUTH_USERNAME, STRINGPOINT, 204),16471648/* Set a password for authenticated TLS */1649CINIT(TLSAUTH_PASSWORD, STRINGPOINT, 205),16501651/* Set authentication type for authenticated TLS */1652CINIT(TLSAUTH_TYPE, STRINGPOINT, 206),16531654/* Set to 1 to enable the "TE:" header in HTTP requests to ask for1655compressed transfer-encoded responses. Set to 0 to disable the use of TE:1656in outgoing requests. The current default is 0, but it might change in a1657future libcurl release.16581659libcurl will ask for the compressed methods it knows of, and if that1660isn't any, it will not ask for transfer-encoding at all even if this1661option is set to 1.16621663*/1664CINIT(TRANSFER_ENCODING, LONG, 207),16651666/* Callback function for closing socket (instead of close(2)). The callback1667should have type curl_closesocket_callback */1668CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208),1669CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209),16701671/* allow GSSAPI credential delegation */1672CINIT(GSSAPI_DELEGATION, LONG, 210),16731674/* Set the name servers to use for DNS resolution */1675CINIT(DNS_SERVERS, STRINGPOINT, 211),16761677/* Time-out accept operations (currently for FTP only) after this amount1678of milliseconds. */1679CINIT(ACCEPTTIMEOUT_MS, LONG, 212),16801681/* Set TCP keepalive */1682CINIT(TCP_KEEPALIVE, LONG, 213),16831684/* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */1685CINIT(TCP_KEEPIDLE, LONG, 214),1686CINIT(TCP_KEEPINTVL, LONG, 215),16871688/* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */1689CINIT(SSL_OPTIONS, LONG, 216),16901691/* Set the SMTP auth originator */1692CINIT(MAIL_AUTH, STRINGPOINT, 217),16931694/* Enable/disable SASL initial response */1695CINIT(SASL_IR, LONG, 218),16961697/* Function that will be called instead of the internal progress display1698* function. This function should be defined as the curl_xferinfo_callback1699* prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */1700CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219),17011702/* The XOAUTH2 bearer token */1703CINIT(XOAUTH2_BEARER, STRINGPOINT, 220),17041705/* Set the interface string to use as outgoing network1706* interface for DNS requests.1707* Only supported by the c-ares DNS backend */1708CINIT(DNS_INTERFACE, STRINGPOINT, 221),17091710/* Set the local IPv4 address to use for outgoing DNS requests.1711* Only supported by the c-ares DNS backend */1712CINIT(DNS_LOCAL_IP4, STRINGPOINT, 222),17131714/* Set the local IPv6 address to use for outgoing DNS requests.1715* Only supported by the c-ares DNS backend */1716CINIT(DNS_LOCAL_IP6, STRINGPOINT, 223),17171718/* Set authentication options directly */1719CINIT(LOGIN_OPTIONS, STRINGPOINT, 224),17201721/* Enable/disable TLS NPN extension (http2 over ssl might fail without) */1722CINIT(SSL_ENABLE_NPN, LONG, 225),17231724/* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */1725CINIT(SSL_ENABLE_ALPN, LONG, 226),17261727/* Time to wait for a response to a HTTP request containing an1728* Expect: 100-continue header before sending the data anyway. */1729CINIT(EXPECT_100_TIMEOUT_MS, LONG, 227),17301731/* This points to a linked list of headers used for proxy requests only,1732struct curl_slist kind */1733CINIT(PROXYHEADER, SLISTPOINT, 228),17341735/* Pass in a bitmask of "header options" */1736CINIT(HEADEROPT, LONG, 229),17371738/* The public key in DER form used to validate the peer public key1739this option is used only if SSL_VERIFYPEER is true */1740CINIT(PINNEDPUBLICKEY, STRINGPOINT, 230),17411742/* Path to Unix domain socket */1743CINIT(UNIX_SOCKET_PATH, STRINGPOINT, 231),17441745/* Set if we should verify the certificate status. */1746CINIT(SSL_VERIFYSTATUS, LONG, 232),17471748/* Set if we should enable TLS false start. */1749CINIT(SSL_FALSESTART, LONG, 233),17501751/* Do not squash dot-dot sequences */1752CINIT(PATH_AS_IS, LONG, 234),17531754/* Proxy Service Name */1755CINIT(PROXY_SERVICE_NAME, STRINGPOINT, 235),17561757/* Service Name */1758CINIT(SERVICE_NAME, STRINGPOINT, 236),17591760/* Wait/don't wait for pipe/mutex to clarify */1761CINIT(PIPEWAIT, LONG, 237),17621763/* Set the protocol used when curl is given a URL without a protocol */1764CINIT(DEFAULT_PROTOCOL, STRINGPOINT, 238),17651766/* Set stream weight, 1 - 256 (default is 16) */1767CINIT(STREAM_WEIGHT, LONG, 239),17681769/* Set stream dependency on another CURL handle */1770CINIT(STREAM_DEPENDS, OBJECTPOINT, 240),17711772/* Set E-xclusive stream dependency on another CURL handle */1773CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241),17741775/* Do not send any tftp option requests to the server */1776CINIT(TFTP_NO_OPTIONS, LONG, 242),17771778/* Linked-list of host:port:connect-to-host:connect-to-port,1779overrides the URL's host:port (only for the network layer) */1780CINIT(CONNECT_TO, SLISTPOINT, 243),17811782/* Set TCP Fast Open */1783CINIT(TCP_FASTOPEN, LONG, 244),17841785/* Continue to send data if the server responds early with an1786* HTTP status code >= 300 */1787CINIT(KEEP_SENDING_ON_ERROR, LONG, 245),17881789/* The CApath or CAfile used to validate the proxy certificate1790this option is used only if PROXY_SSL_VERIFYPEER is true */1791CINIT(PROXY_CAINFO, STRINGPOINT, 246),17921793/* The CApath directory used to validate the proxy certificate1794this option is used only if PROXY_SSL_VERIFYPEER is true */1795CINIT(PROXY_CAPATH, STRINGPOINT, 247),17961797/* Set if we should verify the proxy in ssl handshake,1798set 1 to verify. */1799CINIT(PROXY_SSL_VERIFYPEER, LONG, 248),18001801/* Set if we should verify the Common name from the proxy certificate in ssl1802* handshake, set 1 to check existence, 2 to ensure that it matches1803* the provided hostname. */1804CINIT(PROXY_SSL_VERIFYHOST, LONG, 249),18051806/* What version to specifically try to use for proxy.1807See CURL_SSLVERSION defines below. */1808CINIT(PROXY_SSLVERSION, LONG, 250),18091810/* Set a username for authenticated TLS for proxy */1811CINIT(PROXY_TLSAUTH_USERNAME, STRINGPOINT, 251),18121813/* Set a password for authenticated TLS for proxy */1814CINIT(PROXY_TLSAUTH_PASSWORD, STRINGPOINT, 252),18151816/* Set authentication type for authenticated TLS for proxy */1817CINIT(PROXY_TLSAUTH_TYPE, STRINGPOINT, 253),18181819/* name of the file keeping your private SSL-certificate for proxy */1820CINIT(PROXY_SSLCERT, STRINGPOINT, 254),18211822/* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for1823proxy */1824CINIT(PROXY_SSLCERTTYPE, STRINGPOINT, 255),18251826/* name of the file keeping your private SSL-key for proxy */1827CINIT(PROXY_SSLKEY, STRINGPOINT, 256),18281829/* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for1830proxy */1831CINIT(PROXY_SSLKEYTYPE, STRINGPOINT, 257),18321833/* password for the SSL private key for proxy */1834CINIT(PROXY_KEYPASSWD, STRINGPOINT, 258),18351836/* Specify which SSL ciphers to use for proxy */1837CINIT(PROXY_SSL_CIPHER_LIST, STRINGPOINT, 259),18381839/* CRL file for proxy */1840CINIT(PROXY_CRLFILE, STRINGPOINT, 260),18411842/* Enable/disable specific SSL features with a bitmask for proxy, see1843CURLSSLOPT_* */1844CINIT(PROXY_SSL_OPTIONS, LONG, 261),18451846/* Name of pre proxy to use. */1847CINIT(PRE_PROXY, STRINGPOINT, 262),18481849/* The public key in DER form used to validate the proxy public key1850this option is used only if PROXY_SSL_VERIFYPEER is true */1851CINIT(PROXY_PINNEDPUBLICKEY, STRINGPOINT, 263),18521853/* Path to an abstract Unix domain socket */1854CINIT(ABSTRACT_UNIX_SOCKET, STRINGPOINT, 264),18551856/* Suppress proxy CONNECT response headers from user callbacks */1857CINIT(SUPPRESS_CONNECT_HEADERS, LONG, 265),18581859/* The request target, instead of extracted from the URL */1860CINIT(REQUEST_TARGET, STRINGPOINT, 266),18611862/* bitmask of allowed auth methods for connections to SOCKS5 proxies */1863CINIT(SOCKS5_AUTH, LONG, 267),18641865/* Enable/disable SSH compression */1866CINIT(SSH_COMPRESSION, LONG, 268),18671868/* Post MIME data. */1869CINIT(MIMEPOST, OBJECTPOINT, 269),18701871/* Time to use with the CURLOPT_TIMECONDITION. Specified in number of1872seconds since 1 Jan 1970. */1873CINIT(TIMEVALUE_LARGE, OFF_T, 270),18741875/* Head start in milliseconds to give happy eyeballs. */1876CINIT(HAPPY_EYEBALLS_TIMEOUT_MS, LONG, 271),18771878/* Function that will be called before a resolver request is made */1879CINIT(RESOLVER_START_FUNCTION, FUNCTIONPOINT, 272),18801881/* User data to pass to the resolver start callback. */1882CINIT(RESOLVER_START_DATA, OBJECTPOINT, 273),18831884/* send HAProxy PROXY protocol header? */1885CINIT(HAPROXYPROTOCOL, LONG, 274),18861887/* shuffle addresses before use when DNS returns multiple */1888CINIT(DNS_SHUFFLE_ADDRESSES, LONG, 275),18891890/* Specify which TLS 1.3 ciphers suites to use */1891CINIT(TLS13_CIPHERS, STRINGPOINT, 276),1892CINIT(PROXY_TLS13_CIPHERS, STRINGPOINT, 277),18931894/* Disallow specifying username/login in URL. */1895CINIT(DISALLOW_USERNAME_IN_URL, LONG, 278),18961897/* DNS-over-HTTPS URL */1898CINIT(DOH_URL, STRINGPOINT, 279),18991900/* Preferred buffer size to use for uploads */1901CINIT(UPLOAD_BUFFERSIZE, LONG, 280),19021903/* Time in ms between connection upkeep calls for long-lived connections. */1904CINIT(UPKEEP_INTERVAL_MS, LONG, 281),19051906/* Specify URL using CURL URL API. */1907CINIT(CURLU, OBJECTPOINT, 282),19081909/* add trailing data just after no more data is available */1910CINIT(TRAILERFUNCTION, FUNCTIONPOINT, 283),19111912/* pointer to be passed to HTTP_TRAILER_FUNCTION */1913CINIT(TRAILERDATA, OBJECTPOINT, 284),19141915/* set this to 1L to allow HTTP/0.9 responses or 0L to disallow */1916CINIT(HTTP09_ALLOWED, LONG, 285),19171918/* alt-svc control bitmask */1919CINIT(ALTSVC_CTRL, LONG, 286),19201921/* alt-svc cache file name to possibly read from/write to */1922CINIT(ALTSVC, STRINGPOINT, 287),19231924/* maximum age of a connection to consider it for reuse (in seconds) */1925CINIT(MAXAGE_CONN, LONG, 288),19261927CURLOPT_LASTENTRY /* the last unused */1928} CURLoption;19291930#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all1931the obsolete stuff removed! */19321933/* Backwards compatibility with older names */1934/* These are scheduled to disappear by 2011 */19351936/* This was added in version 7.19.1 */1937#define CURLOPT_POST301 CURLOPT_POSTREDIR19381939/* These are scheduled to disappear by 2009 */19401941/* The following were added in 7.17.0 */1942#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD1943#define CURLOPT_FTPAPPEND CURLOPT_APPEND1944#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY1945#define CURLOPT_FTP_SSL CURLOPT_USE_SSL19461947/* The following were added earlier */19481949#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD1950#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL19511952#else1953/* This is set if CURL_NO_OLDIES is defined at compile-time */1954#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */1955#endif195619571958/* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host1959name resolves addresses using more than one IP protocol version, this1960option might be handy to force libcurl to use a specific IP version. */1961#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP1962versions that your system allows */1963#define CURL_IPRESOLVE_V4 1 /* resolve to IPv4 addresses */1964#define CURL_IPRESOLVE_V6 2 /* resolve to IPv6 addresses */19651966/* three convenient "aliases" that follow the name scheme better */1967#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER19681969/* These enums are for use with the CURLOPT_HTTP_VERSION option. */1970enum {1971CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd1972like the library to choose the best possible1973for us! */1974CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */1975CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */1976CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */1977CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */1978CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.11979Upgrade */19801981CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */1982};19831984/* Convenience definition simple because the name of the version is HTTP/2 and1985not 2.0. The 2_0 version of the enum name was set while the version was1986still planned to be 2.0 and we stick to it for compatibility. */1987#define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_019881989/*1990* Public API enums for RTSP requests1991*/1992enum {1993CURL_RTSPREQ_NONE, /* first in list */1994CURL_RTSPREQ_OPTIONS,1995CURL_RTSPREQ_DESCRIBE,1996CURL_RTSPREQ_ANNOUNCE,1997CURL_RTSPREQ_SETUP,1998CURL_RTSPREQ_PLAY,1999CURL_RTSPREQ_PAUSE,2000CURL_RTSPREQ_TEARDOWN,2001CURL_RTSPREQ_GET_PARAMETER,2002CURL_RTSPREQ_SET_PARAMETER,2003CURL_RTSPREQ_RECORD,2004CURL_RTSPREQ_RECEIVE,2005CURL_RTSPREQ_LAST /* last in list */2006};20072008/* These enums are for use with the CURLOPT_NETRC option. */2009enum CURL_NETRC_OPTION {2010CURL_NETRC_IGNORED, /* The .netrc will never be read.2011* This is the default. */2012CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred2013* to one in the .netrc. */2014CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored.2015* Unless one is set programmatically, the .netrc2016* will be queried. */2017CURL_NETRC_LAST2018};20192020enum {2021CURL_SSLVERSION_DEFAULT,2022CURL_SSLVERSION_TLSv1, /* TLS 1.x */2023CURL_SSLVERSION_SSLv2,2024CURL_SSLVERSION_SSLv3,2025CURL_SSLVERSION_TLSv1_0,2026CURL_SSLVERSION_TLSv1_1,2027CURL_SSLVERSION_TLSv1_2,2028CURL_SSLVERSION_TLSv1_3,20292030CURL_SSLVERSION_LAST /* never use, keep last */2031};20322033enum {2034CURL_SSLVERSION_MAX_NONE = 0,2035CURL_SSLVERSION_MAX_DEFAULT = (CURL_SSLVERSION_TLSv1 << 16),2036CURL_SSLVERSION_MAX_TLSv1_0 = (CURL_SSLVERSION_TLSv1_0 << 16),2037CURL_SSLVERSION_MAX_TLSv1_1 = (CURL_SSLVERSION_TLSv1_1 << 16),2038CURL_SSLVERSION_MAX_TLSv1_2 = (CURL_SSLVERSION_TLSv1_2 << 16),2039CURL_SSLVERSION_MAX_TLSv1_3 = (CURL_SSLVERSION_TLSv1_3 << 16),20402041/* never use, keep last */2042CURL_SSLVERSION_MAX_LAST = (CURL_SSLVERSION_LAST << 16)2043};20442045enum CURL_TLSAUTH {2046CURL_TLSAUTH_NONE,2047CURL_TLSAUTH_SRP,2048CURL_TLSAUTH_LAST /* never use, keep last */2049};20502051/* symbols to use with CURLOPT_POSTREDIR.2052CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_3032053can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_3022054| CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */20552056#define CURL_REDIR_GET_ALL 02057#define CURL_REDIR_POST_301 12058#define CURL_REDIR_POST_302 22059#define CURL_REDIR_POST_303 42060#define CURL_REDIR_POST_ALL \2061(CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)20622063typedef enum {2064CURL_TIMECOND_NONE,20652066CURL_TIMECOND_IFMODSINCE,2067CURL_TIMECOND_IFUNMODSINCE,2068CURL_TIMECOND_LASTMOD,20692070CURL_TIMECOND_LAST2071} curl_TimeCond;20722073/* Special size_t value signaling a zero-terminated string. */2074#define CURL_ZERO_TERMINATED ((size_t) -1)20752076/* curl_strequal() and curl_strnequal() are subject for removal in a future2077release */2078CURL_EXTERN int curl_strequal(const char *s1, const char *s2);2079CURL_EXTERN int curl_strnequal(const char *s1, const char *s2, size_t n);20802081/* Mime/form handling support. */2082typedef struct curl_mime_s curl_mime; /* Mime context. */2083typedef struct curl_mimepart_s curl_mimepart; /* Mime part context. */20842085/*2086* NAME curl_mime_init()2087*2088* DESCRIPTION2089*2090* Create a mime context and return its handle. The easy parameter is the2091* target handle.2092*/2093CURL_EXTERN curl_mime *curl_mime_init(CURL *easy);20942095/*2096* NAME curl_mime_free()2097*2098* DESCRIPTION2099*2100* release a mime handle and its substructures.2101*/2102CURL_EXTERN void curl_mime_free(curl_mime *mime);21032104/*2105* NAME curl_mime_addpart()2106*2107* DESCRIPTION2108*2109* Append a new empty part to the given mime context and return a handle to2110* the created part.2111*/2112CURL_EXTERN curl_mimepart *curl_mime_addpart(curl_mime *mime);21132114/*2115* NAME curl_mime_name()2116*2117* DESCRIPTION2118*2119* Set mime/form part name.2120*/2121CURL_EXTERN CURLcode curl_mime_name(curl_mimepart *part, const char *name);21222123/*2124* NAME curl_mime_filename()2125*2126* DESCRIPTION2127*2128* Set mime part remote file name.2129*/2130CURL_EXTERN CURLcode curl_mime_filename(curl_mimepart *part,2131const char *filename);21322133/*2134* NAME curl_mime_type()2135*2136* DESCRIPTION2137*2138* Set mime part type.2139*/2140CURL_EXTERN CURLcode curl_mime_type(curl_mimepart *part, const char *mimetype);21412142/*2143* NAME curl_mime_encoder()2144*2145* DESCRIPTION2146*2147* Set mime data transfer encoder.2148*/2149CURL_EXTERN CURLcode curl_mime_encoder(curl_mimepart *part,2150const char *encoding);21512152/*2153* NAME curl_mime_data()2154*2155* DESCRIPTION2156*2157* Set mime part data source from memory data,2158*/2159CURL_EXTERN CURLcode curl_mime_data(curl_mimepart *part,2160const char *data, size_t datasize);21612162/*2163* NAME curl_mime_filedata()2164*2165* DESCRIPTION2166*2167* Set mime part data source from named file.2168*/2169CURL_EXTERN CURLcode curl_mime_filedata(curl_mimepart *part,2170const char *filename);21712172/*2173* NAME curl_mime_data_cb()2174*2175* DESCRIPTION2176*2177* Set mime part data source from callback function.2178*/2179CURL_EXTERN CURLcode curl_mime_data_cb(curl_mimepart *part,2180curl_off_t datasize,2181curl_read_callback readfunc,2182curl_seek_callback seekfunc,2183curl_free_callback freefunc,2184void *arg);21852186/*2187* NAME curl_mime_subparts()2188*2189* DESCRIPTION2190*2191* Set mime part data source from subparts.2192*/2193CURL_EXTERN CURLcode curl_mime_subparts(curl_mimepart *part,2194curl_mime *subparts);2195/*2196* NAME curl_mime_headers()2197*2198* DESCRIPTION2199*2200* Set mime part headers.2201*/2202CURL_EXTERN CURLcode curl_mime_headers(curl_mimepart *part,2203struct curl_slist *headers,2204int take_ownership);22052206/* Old form API. */2207/* name is uppercase CURLFORM_<name> */2208#ifdef CFINIT2209#undef CFINIT2210#endif22112212#ifdef CURL_ISOCPP2213#define CFINIT(name) CURLFORM_ ## name2214#else2215/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */2216#define CFINIT(name) CURLFORM_/**/name2217#endif22182219typedef enum {2220CFINIT(NOTHING), /********* the first one is unused ************/22212222/* */2223CFINIT(COPYNAME),2224CFINIT(PTRNAME),2225CFINIT(NAMELENGTH),2226CFINIT(COPYCONTENTS),2227CFINIT(PTRCONTENTS),2228CFINIT(CONTENTSLENGTH),2229CFINIT(FILECONTENT),2230CFINIT(ARRAY),2231CFINIT(OBSOLETE),2232CFINIT(FILE),22332234CFINIT(BUFFER),2235CFINIT(BUFFERPTR),2236CFINIT(BUFFERLENGTH),22372238CFINIT(CONTENTTYPE),2239CFINIT(CONTENTHEADER),2240CFINIT(FILENAME),2241CFINIT(END),2242CFINIT(OBSOLETE2),22432244CFINIT(STREAM),2245CFINIT(CONTENTLEN), /* added in 7.46.0, provide a curl_off_t length */22462247CURLFORM_LASTENTRY /* the last unused */2248} CURLformoption;22492250#undef CFINIT /* done */22512252/* structure to be used as parameter for CURLFORM_ARRAY */2253struct curl_forms {2254CURLformoption option;2255const char *value;2256};22572258/* use this for multipart formpost building */2259/* Returns code for curl_formadd()2260*2261* Returns:2262* CURL_FORMADD_OK on success2263* CURL_FORMADD_MEMORY if the FormInfo allocation fails2264* CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form2265* CURL_FORMADD_NULL if a null pointer was given for a char2266* CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed2267* CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used2268* CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error)2269* CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated2270* CURL_FORMADD_MEMORY if some allocation for string copying failed.2271* CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array2272*2273***************************************************************************/2274typedef enum {2275CURL_FORMADD_OK, /* first, no error */22762277CURL_FORMADD_MEMORY,2278CURL_FORMADD_OPTION_TWICE,2279CURL_FORMADD_NULL,2280CURL_FORMADD_UNKNOWN_OPTION,2281CURL_FORMADD_INCOMPLETE,2282CURL_FORMADD_ILLEGAL_ARRAY,2283CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */22842285CURL_FORMADD_LAST /* last */2286} CURLFORMcode;22872288/*2289* NAME curl_formadd()2290*2291* DESCRIPTION2292*2293* Pretty advanced function for building multi-part formposts. Each invoke2294* adds one part that together construct a full post. Then use2295* CURLOPT_HTTPPOST to send it off to libcurl.2296*/2297CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,2298struct curl_httppost **last_post,2299...);23002301/*2302* callback function for curl_formget()2303* The void *arg pointer will be the one passed as second argument to2304* curl_formget().2305* The character buffer passed to it must not be freed.2306* Should return the buffer length passed to it as the argument "len" on2307* success.2308*/2309typedef size_t (*curl_formget_callback)(void *arg, const char *buf,2310size_t len);23112312/*2313* NAME curl_formget()2314*2315* DESCRIPTION2316*2317* Serialize a curl_httppost struct built with curl_formadd().2318* Accepts a void pointer as second argument which will be passed to2319* the curl_formget_callback function.2320* Returns 0 on success.2321*/2322CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg,2323curl_formget_callback append);2324/*2325* NAME curl_formfree()2326*2327* DESCRIPTION2328*2329* Free a multipart formpost previously built with curl_formadd().2330*/2331CURL_EXTERN void curl_formfree(struct curl_httppost *form);23322333/*2334* NAME curl_getenv()2335*2336* DESCRIPTION2337*2338* Returns a malloc()'ed string that MUST be curl_free()ed after usage is2339* complete. DEPRECATED - see lib/README.curlx2340*/2341CURL_EXTERN char *curl_getenv(const char *variable);23422343/*2344* NAME curl_version()2345*2346* DESCRIPTION2347*2348* Returns a static ascii string of the libcurl version.2349*/2350CURL_EXTERN char *curl_version(void);23512352/*2353* NAME curl_easy_escape()2354*2355* DESCRIPTION2356*2357* Escapes URL strings (converts all letters consider illegal in URLs to their2358* %XX versions). This function returns a new allocated string or NULL if an2359* error occurred.2360*/2361CURL_EXTERN char *curl_easy_escape(CURL *handle,2362const char *string,2363int length);23642365/* the previous version: */2366CURL_EXTERN char *curl_escape(const char *string,2367int length);236823692370/*2371* NAME curl_easy_unescape()2372*2373* DESCRIPTION2374*2375* Unescapes URL encoding in strings (converts all %XX codes to their 8bit2376* versions). This function returns a new allocated string or NULL if an error2377* occurred.2378* Conversion Note: On non-ASCII platforms the ASCII %XX codes are2379* converted into the host encoding.2380*/2381CURL_EXTERN char *curl_easy_unescape(CURL *handle,2382const char *string,2383int length,2384int *outlength);23852386/* the previous version */2387CURL_EXTERN char *curl_unescape(const char *string,2388int length);23892390/*2391* NAME curl_free()2392*2393* DESCRIPTION2394*2395* Provided for de-allocation in the same translation unit that did the2396* allocation. Added in libcurl 7.102397*/2398CURL_EXTERN void curl_free(void *p);23992400/*2401* NAME curl_global_init()2402*2403* DESCRIPTION2404*2405* curl_global_init() should be invoked exactly once for each application that2406* uses libcurl and before any call of other libcurl functions.2407*2408* This function is not thread-safe!2409*/2410CURL_EXTERN CURLcode curl_global_init(long flags);24112412/*2413* NAME curl_global_init_mem()2414*2415* DESCRIPTION2416*2417* curl_global_init() or curl_global_init_mem() should be invoked exactly once2418* for each application that uses libcurl. This function can be used to2419* initialize libcurl and set user defined memory management callback2420* functions. Users can implement memory management routines to check for2421* memory leaks, check for mis-use of the curl library etc. User registered2422* callback routines with be invoked by this library instead of the system2423* memory management routines like malloc, free etc.2424*/2425CURL_EXTERN CURLcode curl_global_init_mem(long flags,2426curl_malloc_callback m,2427curl_free_callback f,2428curl_realloc_callback r,2429curl_strdup_callback s,2430curl_calloc_callback c);24312432/*2433* NAME curl_global_cleanup()2434*2435* DESCRIPTION2436*2437* curl_global_cleanup() should be invoked exactly once for each application2438* that uses libcurl2439*/2440CURL_EXTERN void curl_global_cleanup(void);24412442/* linked-list structure for the CURLOPT_QUOTE option (and other) */2443struct curl_slist {2444char *data;2445struct curl_slist *next;2446};24472448/*2449* NAME curl_global_sslset()2450*2451* DESCRIPTION2452*2453* When built with multiple SSL backends, curl_global_sslset() allows to2454* choose one. This function can only be called once, and it must be called2455* *before* curl_global_init().2456*2457* The backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL). The2458* backend can also be specified via the name parameter (passing -1 as id).2459* If both id and name are specified, the name will be ignored. If neither id2460* nor name are specified, the function will fail with2461* CURLSSLSET_UNKNOWN_BACKEND and set the "avail" pointer to the2462* NULL-terminated list of available backends.2463*2464* Upon success, the function returns CURLSSLSET_OK.2465*2466* If the specified SSL backend is not available, the function returns2467* CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a NULL-terminated2468* list of available SSL backends.2469*2470* The SSL backend can be set only once. If it has already been set, a2471* subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE.2472*/24732474typedef struct {2475curl_sslbackend id;2476const char *name;2477} curl_ssl_backend;24782479typedef enum {2480CURLSSLSET_OK = 0,2481CURLSSLSET_UNKNOWN_BACKEND,2482CURLSSLSET_TOO_LATE,2483CURLSSLSET_NO_BACKENDS /* libcurl was built without any SSL support */2484} CURLsslset;24852486CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,2487const curl_ssl_backend ***avail);24882489/*2490* NAME curl_slist_append()2491*2492* DESCRIPTION2493*2494* Appends a string to a linked list. If no list exists, it will be created2495* first. Returns the new list, after appending.2496*/2497CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *,2498const char *);24992500/*2501* NAME curl_slist_free_all()2502*2503* DESCRIPTION2504*2505* free a previously built curl_slist.2506*/2507CURL_EXTERN void curl_slist_free_all(struct curl_slist *);25082509/*2510* NAME curl_getdate()2511*2512* DESCRIPTION2513*2514* Returns the time, in seconds since 1 Jan 1970 of the time string given in2515* the first argument. The time argument in the second parameter is unused2516* and should be set to NULL.2517*/2518CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused);25192520/* info about the certificate chain, only for OpenSSL, GnuTLS, Schannel, NSS2521and GSKit builds. Asked for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */2522struct curl_certinfo {2523int num_of_certs; /* number of certificates with information */2524struct curl_slist **certinfo; /* for each index in this array, there's a2525linked list with textual information in the2526format "name: value" */2527};25282529/* Information about the SSL library used and the respective internal SSL2530handle, which can be used to obtain further information regarding the2531connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */2532struct curl_tlssessioninfo {2533curl_sslbackend backend;2534void *internals;2535};25362537#define CURLINFO_STRING 0x1000002538#define CURLINFO_LONG 0x2000002539#define CURLINFO_DOUBLE 0x3000002540#define CURLINFO_SLIST 0x4000002541#define CURLINFO_PTR 0x400000 /* same as SLIST */2542#define CURLINFO_SOCKET 0x5000002543#define CURLINFO_OFF_T 0x6000002544#define CURLINFO_MASK 0x0fffff2545#define CURLINFO_TYPEMASK 0xf0000025462547typedef enum {2548CURLINFO_NONE, /* first, never use this */2549CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1,2550CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2,2551CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3,2552CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4,2553CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5,2554CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,2555CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7,2556CURLINFO_SIZE_UPLOAD_T = CURLINFO_OFF_T + 7,2557CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8,2558CURLINFO_SIZE_DOWNLOAD_T = CURLINFO_OFF_T + 8,2559CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9,2560CURLINFO_SPEED_DOWNLOAD_T = CURLINFO_OFF_T + 9,2561CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10,2562CURLINFO_SPEED_UPLOAD_T = CURLINFO_OFF_T + 10,2563CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11,2564CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12,2565CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13,2566CURLINFO_FILETIME = CURLINFO_LONG + 14,2567CURLINFO_FILETIME_T = CURLINFO_OFF_T + 14,2568CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15,2569CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = CURLINFO_OFF_T + 15,2570CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16,2571CURLINFO_CONTENT_LENGTH_UPLOAD_T = CURLINFO_OFF_T + 16,2572CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,2573CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18,2574CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19,2575CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20,2576CURLINFO_PRIVATE = CURLINFO_STRING + 21,2577CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22,2578CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23,2579CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24,2580CURLINFO_OS_ERRNO = CURLINFO_LONG + 25,2581CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26,2582CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27,2583CURLINFO_COOKIELIST = CURLINFO_SLIST + 28,2584CURLINFO_LASTSOCKET = CURLINFO_LONG + 29,2585CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30,2586CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31,2587CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,2588CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33,2589CURLINFO_CERTINFO = CURLINFO_PTR + 34,2590CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35,2591CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36,2592CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37,2593CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38,2594CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39,2595CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40,2596CURLINFO_LOCAL_IP = CURLINFO_STRING + 41,2597CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,2598CURLINFO_TLS_SESSION = CURLINFO_PTR + 43,2599CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,2600CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45,2601CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46,2602CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47,2603CURLINFO_PROTOCOL = CURLINFO_LONG + 48,2604CURLINFO_SCHEME = CURLINFO_STRING + 49,2605/* Fill in new entries below here! */26062607/* Preferably these would be defined conditionally based on the2608sizeof curl_off_t being 64-bits */2609CURLINFO_TOTAL_TIME_T = CURLINFO_OFF_T + 50,2610CURLINFO_NAMELOOKUP_TIME_T = CURLINFO_OFF_T + 51,2611CURLINFO_CONNECT_TIME_T = CURLINFO_OFF_T + 52,2612CURLINFO_PRETRANSFER_TIME_T = CURLINFO_OFF_T + 53,2613CURLINFO_STARTTRANSFER_TIME_T = CURLINFO_OFF_T + 54,2614CURLINFO_REDIRECT_TIME_T = CURLINFO_OFF_T + 55,2615CURLINFO_APPCONNECT_TIME_T = CURLINFO_OFF_T + 56,26162617CURLINFO_LASTONE = 562618} CURLINFO;26192620/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as2621CURLINFO_HTTP_CODE */2622#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE26232624typedef enum {2625CURLCLOSEPOLICY_NONE, /* first, never use this */26262627CURLCLOSEPOLICY_OLDEST,2628CURLCLOSEPOLICY_LEAST_RECENTLY_USED,2629CURLCLOSEPOLICY_LEAST_TRAFFIC,2630CURLCLOSEPOLICY_SLOWEST,2631CURLCLOSEPOLICY_CALLBACK,26322633CURLCLOSEPOLICY_LAST /* last, never use this */2634} curl_closepolicy;26352636#define CURL_GLOBAL_SSL (1<<0) /* no purpose since since 7.57.0 */2637#define CURL_GLOBAL_WIN32 (1<<1)2638#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)2639#define CURL_GLOBAL_NOTHING 02640#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL2641#define CURL_GLOBAL_ACK_EINTR (1<<2)264226432644/*****************************************************************************2645* Setup defines, protos etc for the sharing stuff.2646*/26472648/* Different data locks for a single share */2649typedef enum {2650CURL_LOCK_DATA_NONE = 0,2651/* CURL_LOCK_DATA_SHARE is used internally to say that2652* the locking is just made to change the internal state of the share2653* itself.2654*/2655CURL_LOCK_DATA_SHARE,2656CURL_LOCK_DATA_COOKIE,2657CURL_LOCK_DATA_DNS,2658CURL_LOCK_DATA_SSL_SESSION,2659CURL_LOCK_DATA_CONNECT,2660CURL_LOCK_DATA_PSL,2661CURL_LOCK_DATA_LAST2662} curl_lock_data;26632664/* Different lock access types */2665typedef enum {2666CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */2667CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */2668CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */2669CURL_LOCK_ACCESS_LAST /* never use */2670} curl_lock_access;26712672typedef void (*curl_lock_function)(CURL *handle,2673curl_lock_data data,2674curl_lock_access locktype,2675void *userptr);2676typedef void (*curl_unlock_function)(CURL *handle,2677curl_lock_data data,2678void *userptr);267926802681typedef enum {2682CURLSHE_OK, /* all is fine */2683CURLSHE_BAD_OPTION, /* 1 */2684CURLSHE_IN_USE, /* 2 */2685CURLSHE_INVALID, /* 3 */2686CURLSHE_NOMEM, /* 4 out of memory */2687CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */2688CURLSHE_LAST /* never use */2689} CURLSHcode;26902691typedef enum {2692CURLSHOPT_NONE, /* don't use */2693CURLSHOPT_SHARE, /* specify a data type to share */2694CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */2695CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */2696CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */2697CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock2698callback functions */2699CURLSHOPT_LAST /* never use */2700} CURLSHoption;27012702CURL_EXTERN CURLSH *curl_share_init(void);2703CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...);2704CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *);27052706/****************************************************************************2707* Structures for querying information about the curl library at runtime.2708*/27092710typedef enum {2711CURLVERSION_FIRST,2712CURLVERSION_SECOND,2713CURLVERSION_THIRD,2714CURLVERSION_FOURTH,2715CURLVERSION_FIFTH,2716CURLVERSION_LAST /* never actually use this */2717} CURLversion;27182719/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by2720basically all programs ever that want to get version information. It is2721meant to be a built-in version number for what kind of struct the caller2722expects. If the struct ever changes, we redefine the NOW to another enum2723from above. */2724#define CURLVERSION_NOW CURLVERSION_FIFTH27252726typedef struct {2727CURLversion age; /* age of the returned struct */2728const char *version; /* LIBCURL_VERSION */2729unsigned int version_num; /* LIBCURL_VERSION_NUM */2730const char *host; /* OS/host/cpu/machine when configured */2731int features; /* bitmask, see defines below */2732const char *ssl_version; /* human readable string */2733long ssl_version_num; /* not used anymore, always 0 */2734const char *libz_version; /* human readable string */2735/* protocols is terminated by an entry with a NULL protoname */2736const char * const *protocols;27372738/* The fields below this were added in CURLVERSION_SECOND */2739const char *ares;2740int ares_num;27412742/* This field was added in CURLVERSION_THIRD */2743const char *libidn;27442745/* These field were added in CURLVERSION_FOURTH */27462747/* Same as '_libiconv_version' if built with HAVE_ICONV */2748int iconv_ver_num;27492750const char *libssh_version; /* human readable string */27512752/* These fields were added in CURLVERSION_FIFTH */27532754unsigned int brotli_ver_num; /* Numeric Brotli version2755(MAJOR << 24) | (MINOR << 12) | PATCH */2756const char *brotli_version; /* human readable string. */27572758} curl_version_info_data;27592760#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */2761#define CURL_VERSION_KERBEROS4 (1<<1) /* Kerberos V4 auth is supported2762(deprecated) */2763#define CURL_VERSION_SSL (1<<2) /* SSL options are present */2764#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */2765#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */2766#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth is supported2767(deprecated) */2768#define CURL_VERSION_DEBUG (1<<6) /* Built with debug capabilities */2769#define CURL_VERSION_ASYNCHDNS (1<<7) /* Asynchronous DNS resolves */2770#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth is supported */2771#define CURL_VERSION_LARGEFILE (1<<9) /* Supports files larger than 2GB */2772#define CURL_VERSION_IDN (1<<10) /* Internationized Domain Names are2773supported */2774#define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */2775#define CURL_VERSION_CONV (1<<12) /* Character conversions supported */2776#define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */2777#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */2778#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper2779is supported */2780#define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */2781#define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */2782#define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */2783#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */2784#define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used2785for cookie domain verification */2786#define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */2787#define CURL_VERSION_MULTI_SSL (1<<22) /* Multiple SSL backends available */2788#define CURL_VERSION_BROTLI (1<<23) /* Brotli features are present. */2789#define CURL_VERSION_ALTSVC (1<<24) /* Alt-Svc handling built-in */27902791/*2792* NAME curl_version_info()2793*2794* DESCRIPTION2795*2796* This function returns a pointer to a static copy of the version info2797* struct. See above.2798*/2799CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);28002801/*2802* NAME curl_easy_strerror()2803*2804* DESCRIPTION2805*2806* The curl_easy_strerror function may be used to turn a CURLcode value2807* into the equivalent human readable error string. This is useful2808* for printing meaningful error messages.2809*/2810CURL_EXTERN const char *curl_easy_strerror(CURLcode);28112812/*2813* NAME curl_share_strerror()2814*2815* DESCRIPTION2816*2817* The curl_share_strerror function may be used to turn a CURLSHcode value2818* into the equivalent human readable error string. This is useful2819* for printing meaningful error messages.2820*/2821CURL_EXTERN const char *curl_share_strerror(CURLSHcode);28222823/*2824* NAME curl_easy_pause()2825*2826* DESCRIPTION2827*2828* The curl_easy_pause function pauses or unpauses transfers. Select the new2829* state by setting the bitmask, use the convenience defines below.2830*2831*/2832CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);28332834#define CURLPAUSE_RECV (1<<0)2835#define CURLPAUSE_RECV_CONT (0)28362837#define CURLPAUSE_SEND (1<<2)2838#define CURLPAUSE_SEND_CONT (0)28392840#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND)2841#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)28422843#ifdef __cplusplus2844}2845#endif28462847/* unfortunately, the easy.h and multi.h include files need options and info2848stuff before they can be included! */2849#include "easy.h" /* nothing in curl is fun without the easy stuff */2850#include "multi.h"2851#include "urlapi.h"28522853/* the typechecker doesn't work in C++ (yet) */2854#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \2855((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \2856!defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK)2857#include "typecheck-gcc.h"2858#else2859#if defined(__STDC__) && (__STDC__ >= 1)2860/* This preprocessor magic that replaces a call with the exact same call is2861only done to make sure application authors pass exactly three arguments2862to these functions. */2863#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)2864#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)2865#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)2866#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)2867#endif /* __STDC__ >= 1 */2868#endif /* gcc >= 4.3 && !__cplusplus */28692870#endif /* __CURL_CURL_H */287128722873