00001 #ifndef __CURL_CURL_H
00002 #define __CURL_CURL_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifdef CURL_NO_OLDIES
00034 #define CURL_STRICTER
00035 #endif
00036
00037 #include "curlver.h"
00038 #include "curlbuild.h"
00039 #include "curlrules.h"
00040
00041
00042
00043
00044
00045 #if (defined(_WIN32) || defined(__WIN32__)) && \
00046 !defined(WIN32) && !defined(__SYMBIAN32__)
00047 #define WIN32
00048 #endif
00049
00050 #include <stdio.h>
00051 #include <limits.h>
00052
00053 #if defined(__FreeBSD__) && (__FreeBSD__ >= 2)
00054
00055 #include <osreldate.h>
00056 #endif
00057
00058
00059 #include <sys/types.h>
00060 #include <time.h>
00061
00062 #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
00063 #if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \
00064 defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H))
00065
00066
00067 #include <winsock2.h>
00068 #include <ws2tcpip.h>
00069 #endif
00070 #endif
00071
00072
00073
00074
00075 #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
00076 defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
00077 defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
00078 (defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
00079 #include <sys/select.h>
00080 #endif
00081
00082 #if !defined(WIN32) && !defined(_WIN32_WCE)
00083 #include <sys/socket.h>
00084 #endif
00085
00086 #if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)
00087 #include <sys/time.h>
00088 #endif
00089
00090 #ifdef __BEOS__
00091 #include <support/SupportDefs.h>
00092 #endif
00093
00094 #ifdef __cplusplus
00095 extern "C" {
00096 #endif
00097
00098 #if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
00099 typedef struct Curl_easy CURL;
00100 typedef struct Curl_share CURLSH;
00101 #else
00102 typedef void CURL;
00103 typedef void CURLSH;
00104 #endif
00105
00106
00107
00108
00109
00110 #ifdef CURL_STATICLIB
00111 # define CURL_EXTERN
00112 #elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
00113 # if defined(BUILDING_LIBCURL)
00114 # define CURL_EXTERN __declspec(dllexport)
00115 # else
00116 # define CURL_EXTERN __declspec(dllimport)
00117 # endif
00118 #elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
00119 # define CURL_EXTERN CURL_EXTERN_SYMBOL
00120 #else
00121 # define CURL_EXTERN
00122 #endif
00123
00124 #ifndef curl_socket_typedef
00125
00126 #if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)
00127 typedef SOCKET curl_socket_t;
00128 #define CURL_SOCKET_BAD INVALID_SOCKET
00129 #else
00130 typedef int curl_socket_t;
00131 #define CURL_SOCKET_BAD -1
00132 #endif
00133 #define curl_socket_typedef
00134 #endif
00135
00136 struct curl_httppost {
00137 struct curl_httppost *next;
00138 char *name;
00139 long namelength;
00140 char *contents;
00141 long contentslength;
00142
00143 char *buffer;
00144 long bufferlength;
00145 char *contenttype;
00146 struct curl_slist *contentheader;
00147 struct curl_httppost *more;
00148
00149
00150 long flags;
00151
00152
00153 #define CURL_HTTPPOST_FILENAME (1<<0)
00154
00155 #define CURL_HTTPPOST_READFILE (1<<1)
00156
00157 #define CURL_HTTPPOST_PTRNAME (1<<2)
00158
00159 #define CURL_HTTPPOST_PTRCONTENTS (1<<3)
00160
00161 #define CURL_HTTPPOST_BUFFER (1<<4)
00162
00163 #define CURL_HTTPPOST_PTRBUFFER (1<<5)
00164
00165
00166 #define CURL_HTTPPOST_CALLBACK (1<<6)
00167
00168 #define CURL_HTTPPOST_LARGE (1<<7)
00169
00170 char *showfilename;
00171
00172
00173 void *userp;
00174
00175 curl_off_t contentlen;
00176
00177
00178 };
00179
00180
00181
00182 typedef int (*curl_progress_callback)(void *clientp,
00183 double dltotal,
00184 double dlnow,
00185 double ultotal,
00186 double ulnow);
00187
00188
00189
00190 typedef int (*curl_xferinfo_callback)(void *clientp,
00191 curl_off_t dltotal,
00192 curl_off_t dlnow,
00193 curl_off_t ultotal,
00194 curl_off_t ulnow);
00195
00196 #ifndef CURL_MAX_WRITE_SIZE
00197
00198
00199
00200
00201
00202
00203 #define CURL_MAX_WRITE_SIZE 16384
00204 #endif
00205
00206 #ifndef CURL_MAX_HTTP_HEADER
00207
00208
00209
00210 #define CURL_MAX_HTTP_HEADER (100*1024)
00211 #endif
00212
00213
00214
00215 #define CURL_WRITEFUNC_PAUSE 0x10000001
00216
00217 typedef size_t (*curl_write_callback)(char *buffer,
00218 size_t size,
00219 size_t nitems,
00220 void *outstream);
00221
00222
00223
00224
00225 typedef enum {
00226 CURLFILETYPE_FILE = 0,
00227 CURLFILETYPE_DIRECTORY,
00228 CURLFILETYPE_SYMLINK,
00229 CURLFILETYPE_DEVICE_BLOCK,
00230 CURLFILETYPE_DEVICE_CHAR,
00231 CURLFILETYPE_NAMEDPIPE,
00232 CURLFILETYPE_SOCKET,
00233 CURLFILETYPE_DOOR,
00234
00235 CURLFILETYPE_UNKNOWN
00236 } curlfiletype;
00237
00238 #define CURLFINFOFLAG_KNOWN_FILENAME (1<<0)
00239 #define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1)
00240 #define CURLFINFOFLAG_KNOWN_TIME (1<<2)
00241 #define CURLFINFOFLAG_KNOWN_PERM (1<<3)
00242 #define CURLFINFOFLAG_KNOWN_UID (1<<4)
00243 #define CURLFINFOFLAG_KNOWN_GID (1<<5)
00244 #define CURLFINFOFLAG_KNOWN_SIZE (1<<6)
00245 #define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7)
00246
00247
00248
00249
00250
00251 struct curl_fileinfo {
00252 char *filename;
00253 curlfiletype filetype;
00254 time_t time;
00255 unsigned int perm;
00256 int uid;
00257 int gid;
00258 curl_off_t size;
00259 long int hardlinks;
00260
00261 struct {
00262
00263 char *time;
00264 char *perm;
00265 char *user;
00266 char *group;
00267 char *target;
00268 } strings;
00269
00270 unsigned int flags;
00271
00272
00273 char *b_data;
00274 size_t b_size;
00275 size_t b_used;
00276 };
00277
00278
00279 #define CURL_CHUNK_BGN_FUNC_OK 0
00280 #define CURL_CHUNK_BGN_FUNC_FAIL 1
00281 #define CURL_CHUNK_BGN_FUNC_SKIP 2
00282
00283
00284
00285
00286 typedef long (*curl_chunk_bgn_callback)(const void *transfer_info,
00287 void *ptr,
00288 int remains);
00289
00290
00291 #define CURL_CHUNK_END_FUNC_OK 0
00292 #define CURL_CHUNK_END_FUNC_FAIL 1
00293
00294
00295
00296
00297
00298
00299
00300 typedef long (*curl_chunk_end_callback)(void *ptr);
00301
00302
00303 #define CURL_FNMATCHFUNC_MATCH 0
00304 #define CURL_FNMATCHFUNC_NOMATCH 1
00305 #define CURL_FNMATCHFUNC_FAIL 2
00306
00307
00308
00309 typedef int (*curl_fnmatch_callback)(void *ptr,
00310 const char *pattern,
00311 const char *string);
00312
00313
00314 #define CURL_SEEKFUNC_OK 0
00315 #define CURL_SEEKFUNC_FAIL 1
00316 #define CURL_SEEKFUNC_CANTSEEK 2
00317
00318 typedef int (*curl_seek_callback)(void *instream,
00319 curl_off_t offset,
00320 int origin);
00321
00322
00323
00324 #define CURL_READFUNC_ABORT 0x10000000
00325
00326
00327 #define CURL_READFUNC_PAUSE 0x10000001
00328
00329 typedef size_t (*curl_read_callback)(char *buffer,
00330 size_t size,
00331 size_t nitems,
00332 void *instream);
00333
00334 typedef enum {
00335 CURLSOCKTYPE_IPCXN,
00336 CURLSOCKTYPE_ACCEPT,
00337 CURLSOCKTYPE_LAST
00338 } curlsocktype;
00339
00340
00341
00342 #define CURL_SOCKOPT_OK 0
00343 #define CURL_SOCKOPT_ERROR 1
00344
00345 #define CURL_SOCKOPT_ALREADY_CONNECTED 2
00346
00347 typedef int (*curl_sockopt_callback)(void *clientp,
00348 curl_socket_t curlfd,
00349 curlsocktype purpose);
00350
00351 struct curl_sockaddr {
00352 int family;
00353 int socktype;
00354 int protocol;
00355 unsigned int addrlen;
00356
00357
00358 struct sockaddr addr;
00359 };
00360
00361 typedef curl_socket_t
00362 (*curl_opensocket_callback)(void *clientp,
00363 curlsocktype purpose,
00364 struct curl_sockaddr *address);
00365
00366 typedef int
00367 (*curl_closesocket_callback)(void *clientp, curl_socket_t item);
00368
00369 typedef enum {
00370 CURLIOE_OK,
00371 CURLIOE_UNKNOWNCMD,
00372 CURLIOE_FAILRESTART,
00373 CURLIOE_LAST
00374 } curlioerr;
00375
00376 typedef enum {
00377 CURLIOCMD_NOP,
00378 CURLIOCMD_RESTARTREAD,
00379 CURLIOCMD_LAST
00380 } curliocmd;
00381
00382 typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
00383 int cmd,
00384 void *clientp);
00385
00386 #ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS
00387
00388
00389
00390
00391
00392
00393 typedef void *(*curl_malloc_callback)(size_t size);
00394 typedef void (*curl_free_callback)(void *ptr);
00395 typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
00396 typedef char *(*curl_strdup_callback)(const char *str);
00397 typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
00398
00399 #define CURL_DID_MEMORY_FUNC_TYPEDEFS
00400 #endif
00401
00402
00403 typedef enum {
00404 CURLINFO_TEXT = 0,
00405 CURLINFO_HEADER_IN,
00406 CURLINFO_HEADER_OUT,
00407 CURLINFO_DATA_IN,
00408 CURLINFO_DATA_OUT,
00409 CURLINFO_SSL_DATA_IN,
00410 CURLINFO_SSL_DATA_OUT,
00411 CURLINFO_END
00412 } curl_infotype;
00413
00414 typedef int (*curl_debug_callback)
00415 (CURL *handle,
00416 curl_infotype type,
00417 char *data,
00418 size_t size,
00419 void *userptr);
00420
00421
00422
00423
00424
00425
00426
00427
00428 typedef enum {
00429 CURLE_OK = 0,
00430 CURLE_UNSUPPORTED_PROTOCOL,
00431 CURLE_FAILED_INIT,
00432 CURLE_URL_MALFORMAT,
00433 CURLE_NOT_BUILT_IN,
00434
00435 CURLE_COULDNT_RESOLVE_PROXY,
00436 CURLE_COULDNT_RESOLVE_HOST,
00437 CURLE_COULDNT_CONNECT,
00438 CURLE_WEIRD_SERVER_REPLY,
00439 CURLE_REMOTE_ACCESS_DENIED,
00440
00441
00442 CURLE_FTP_ACCEPT_FAILED,
00443
00444 CURLE_FTP_WEIRD_PASS_REPLY,
00445 CURLE_FTP_ACCEPT_TIMEOUT,
00446
00447
00448 CURLE_FTP_WEIRD_PASV_REPLY,
00449 CURLE_FTP_WEIRD_227_FORMAT,
00450 CURLE_FTP_CANT_GET_HOST,
00451 CURLE_HTTP2,
00452
00453
00454 CURLE_FTP_COULDNT_SET_TYPE,
00455 CURLE_PARTIAL_FILE,
00456 CURLE_FTP_COULDNT_RETR_FILE,
00457 CURLE_OBSOLETE20,
00458 CURLE_QUOTE_ERROR,
00459 CURLE_HTTP_RETURNED_ERROR,
00460 CURLE_WRITE_ERROR,
00461 CURLE_OBSOLETE24,
00462 CURLE_UPLOAD_FAILED,
00463 CURLE_READ_ERROR,
00464 CURLE_OUT_OF_MEMORY,
00465
00466
00467
00468
00469 CURLE_OPERATION_TIMEDOUT,
00470 CURLE_OBSOLETE29,
00471 CURLE_FTP_PORT_FAILED,
00472 CURLE_FTP_COULDNT_USE_REST,
00473 CURLE_OBSOLETE32,
00474 CURLE_RANGE_ERROR,
00475 CURLE_HTTP_POST_ERROR,
00476 CURLE_SSL_CONNECT_ERROR,
00477 CURLE_BAD_DOWNLOAD_RESUME,
00478 CURLE_FILE_COULDNT_READ_FILE,
00479 CURLE_LDAP_CANNOT_BIND,
00480 CURLE_LDAP_SEARCH_FAILED,
00481 CURLE_OBSOLETE40,
00482 CURLE_FUNCTION_NOT_FOUND,
00483 CURLE_ABORTED_BY_CALLBACK,
00484 CURLE_BAD_FUNCTION_ARGUMENT,
00485 CURLE_OBSOLETE44,
00486 CURLE_INTERFACE_FAILED,
00487 CURLE_OBSOLETE46,
00488 CURLE_TOO_MANY_REDIRECTS,
00489 CURLE_UNKNOWN_OPTION,
00490 CURLE_TELNET_OPTION_SYNTAX,
00491 CURLE_OBSOLETE50,
00492 CURLE_PEER_FAILED_VERIFICATION,
00493
00494 CURLE_GOT_NOTHING,
00495 CURLE_SSL_ENGINE_NOTFOUND,
00496 CURLE_SSL_ENGINE_SETFAILED,
00497
00498 CURLE_SEND_ERROR,
00499 CURLE_RECV_ERROR,
00500 CURLE_OBSOLETE57,
00501 CURLE_SSL_CERTPROBLEM,
00502 CURLE_SSL_CIPHER,
00503 CURLE_SSL_CACERT,
00504 CURLE_BAD_CONTENT_ENCODING,
00505 CURLE_LDAP_INVALID_URL,
00506 CURLE_FILESIZE_EXCEEDED,
00507 CURLE_USE_SSL_FAILED,
00508 CURLE_SEND_FAIL_REWIND,
00509
00510 CURLE_SSL_ENGINE_INITFAILED,
00511 CURLE_LOGIN_DENIED,
00512
00513 CURLE_TFTP_NOTFOUND,
00514 CURLE_TFTP_PERM,
00515 CURLE_REMOTE_DISK_FULL,
00516 CURLE_TFTP_ILLEGAL,
00517 CURLE_TFTP_UNKNOWNID,
00518 CURLE_REMOTE_FILE_EXISTS,
00519 CURLE_TFTP_NOSUCHUSER,
00520 CURLE_CONV_FAILED,
00521 CURLE_CONV_REQD,
00522
00523
00524
00525
00526 CURLE_SSL_CACERT_BADFILE,
00527
00528 CURLE_REMOTE_FILE_NOT_FOUND,
00529 CURLE_SSH,
00530
00531
00532
00533 CURLE_SSL_SHUTDOWN_FAILED,
00534
00535 CURLE_AGAIN,
00536
00537
00538 CURLE_SSL_CRL_BADFILE,
00539
00540 CURLE_SSL_ISSUER_ERROR,
00541
00542 CURLE_FTP_PRET_FAILED,
00543 CURLE_RTSP_CSEQ_ERROR,
00544 CURLE_RTSP_SESSION_ERROR,
00545 CURLE_FTP_BAD_FILE_LIST,
00546 CURLE_CHUNK_FAILED,
00547 CURLE_NO_CONNECTION_AVAILABLE,
00548
00549 CURLE_SSL_PINNEDPUBKEYNOTMATCH,
00550
00551 CURLE_SSL_INVALIDCERTSTATUS,
00552 CURLE_HTTP2_STREAM,
00553
00554 CURL_LAST
00555 } CURLcode;
00556
00557 #ifndef CURL_NO_OLDIES
00558
00559
00560
00561 #define CURLE_OBSOLETE16 CURLE_HTTP2
00562
00563
00564 #define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED
00565 #define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT
00566
00567
00568 #define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
00569 #define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY
00570
00571
00572 #define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
00573
00574
00575
00576 #define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION
00577
00578
00579
00580 #define CURLE_OBSOLETE CURLE_OBSOLETE50
00581 #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46
00582 #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44
00583 #define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10
00584 #define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16
00585 #define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32
00586 #define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29
00587 #define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12
00588 #define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20
00589 #define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40
00590 #define CURLE_MALFORMAT_USER CURLE_OBSOLETE24
00591 #define CURLE_SHARE_IN_USE CURLE_OBSOLETE57
00592 #define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN
00593
00594 #define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED
00595 #define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE
00596 #define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR
00597 #define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL
00598 #define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS
00599 #define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR
00600 #define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED
00601
00602
00603
00604 #define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT
00605
00606 #define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR
00607 #define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED
00608 #define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED
00609
00610 #define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE
00611 #define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME
00612
00613
00614
00615
00616 #define CURLE_ALREADY_COMPLETE 99999
00617
00618
00619 #define CURLOPT_FILE CURLOPT_WRITEDATA
00620 #define CURLOPT_INFILE CURLOPT_READDATA
00621 #define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA
00622
00623
00624
00625 #define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40
00626 #define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72
00627
00628 #endif
00630
00631 typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);
00632
00633 typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl,
00634 void *ssl_ctx,
00635
00636 void *userptr);
00637
00638 typedef enum {
00639 CURLPROXY_HTTP = 0,
00640
00641 CURLPROXY_HTTP_1_0 = 1,
00642
00643 CURLPROXY_HTTPS = 2,
00644 CURLPROXY_SOCKS4 = 4,
00645
00646 CURLPROXY_SOCKS5 = 5,
00647 CURLPROXY_SOCKS4A = 6,
00648 CURLPROXY_SOCKS5_HOSTNAME = 7
00649
00650
00651 } curl_proxytype;
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670 #define CURLAUTH_NONE ((unsigned long)0)
00671 #define CURLAUTH_BASIC (((unsigned long)1)<<0)
00672 #define CURLAUTH_DIGEST (((unsigned long)1)<<1)
00673 #define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2)
00674
00675 #define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE
00676 #define CURLAUTH_NTLM (((unsigned long)1)<<3)
00677 #define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4)
00678 #define CURLAUTH_NTLM_WB (((unsigned long)1)<<5)
00679 #define CURLAUTH_ONLY (((unsigned long)1)<<31)
00680 #define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
00681 #define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
00682
00683 #define CURLSSH_AUTH_ANY ~0
00684 #define CURLSSH_AUTH_NONE 0
00685 #define CURLSSH_AUTH_PUBLICKEY (1<<0)
00686 #define CURLSSH_AUTH_PASSWORD (1<<1)
00687 #define CURLSSH_AUTH_HOST (1<<2)
00688 #define CURLSSH_AUTH_KEYBOARD (1<<3)
00689 #define CURLSSH_AUTH_AGENT (1<<4)
00690 #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
00691
00692 #define CURLGSSAPI_DELEGATION_NONE 0
00693 #define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0)
00694 #define CURLGSSAPI_DELEGATION_FLAG (1<<1)
00695
00696 #define CURL_ERROR_SIZE 256
00697
00698 enum curl_khtype {
00699 CURLKHTYPE_UNKNOWN,
00700 CURLKHTYPE_RSA1,
00701 CURLKHTYPE_RSA,
00702 CURLKHTYPE_DSS
00703 };
00704
00705 struct curl_khkey {
00706 const char *key;
00707
00708 size_t len;
00709 enum curl_khtype keytype;
00710 };
00711
00712
00713
00714 enum curl_khstat {
00715 CURLKHSTAT_FINE_ADD_TO_FILE,
00716 CURLKHSTAT_FINE,
00717 CURLKHSTAT_REJECT,
00718 CURLKHSTAT_DEFER,
00719
00720
00721 CURLKHSTAT_LAST
00722 };
00723
00724
00725 enum curl_khmatch {
00726 CURLKHMATCH_OK,
00727 CURLKHMATCH_MISMATCH,
00728 CURLKHMATCH_MISSING,
00729 CURLKHMATCH_LAST
00730 };
00731
00732 typedef int
00733 (*curl_sshkeycallback) (CURL *easy,
00734 const struct curl_khkey *knownkey,
00735 const struct curl_khkey *foundkey,
00736 enum curl_khmatch,
00737 void *clientp);
00738
00739
00740 typedef enum {
00741 CURLUSESSL_NONE,
00742 CURLUSESSL_TRY,
00743 CURLUSESSL_CONTROL,
00744 CURLUSESSL_ALL,
00745 CURLUSESSL_LAST
00746 } curl_usessl;
00747
00748
00749
00750
00751
00752
00753
00754
00755 #define CURLSSLOPT_ALLOW_BEAST (1<<0)
00756
00757
00758
00759 #define CURLSSLOPT_NO_REVOKE (1<<1)
00760
00761 #ifndef CURL_NO_OLDIES
00762
00763
00764
00765
00766
00767 #define CURLFTPSSL_NONE CURLUSESSL_NONE
00768 #define CURLFTPSSL_TRY CURLUSESSL_TRY
00769 #define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL
00770 #define CURLFTPSSL_ALL CURLUSESSL_ALL
00771 #define CURLFTPSSL_LAST CURLUSESSL_LAST
00772 #define curl_ftpssl curl_usessl
00773 #endif
00775
00776 typedef enum {
00777 CURLFTPSSL_CCC_NONE,
00778 CURLFTPSSL_CCC_PASSIVE,
00779 CURLFTPSSL_CCC_ACTIVE,
00780 CURLFTPSSL_CCC_LAST
00781 } curl_ftpccc;
00782
00783
00784 typedef enum {
00785 CURLFTPAUTH_DEFAULT,
00786 CURLFTPAUTH_SSL,
00787 CURLFTPAUTH_TLS,
00788 CURLFTPAUTH_LAST
00789 } curl_ftpauth;
00790
00791
00792 typedef enum {
00793 CURLFTP_CREATE_DIR_NONE,
00794 CURLFTP_CREATE_DIR,
00795
00796
00797 CURLFTP_CREATE_DIR_RETRY,
00798
00799 CURLFTP_CREATE_DIR_LAST
00800 } curl_ftpcreatedir;
00801
00802
00803 typedef enum {
00804 CURLFTPMETHOD_DEFAULT,
00805 CURLFTPMETHOD_MULTICWD,
00806 CURLFTPMETHOD_NOCWD,
00807 CURLFTPMETHOD_SINGLECWD,
00808 CURLFTPMETHOD_LAST
00809 } curl_ftpmethod;
00810
00811
00812 #define CURLHEADER_UNIFIED 0
00813 #define CURLHEADER_SEPARATE (1<<0)
00814
00815
00816 #define CURLPROTO_HTTP (1<<0)
00817 #define CURLPROTO_HTTPS (1<<1)
00818 #define CURLPROTO_FTP (1<<2)
00819 #define CURLPROTO_FTPS (1<<3)
00820 #define CURLPROTO_SCP (1<<4)
00821 #define CURLPROTO_SFTP (1<<5)
00822 #define CURLPROTO_TELNET (1<<6)
00823 #define CURLPROTO_LDAP (1<<7)
00824 #define CURLPROTO_LDAPS (1<<8)
00825 #define CURLPROTO_DICT (1<<9)
00826 #define CURLPROTO_FILE (1<<10)
00827 #define CURLPROTO_TFTP (1<<11)
00828 #define CURLPROTO_IMAP (1<<12)
00829 #define CURLPROTO_IMAPS (1<<13)
00830 #define CURLPROTO_POP3 (1<<14)
00831 #define CURLPROTO_POP3S (1<<15)
00832 #define CURLPROTO_SMTP (1<<16)
00833 #define CURLPROTO_SMTPS (1<<17)
00834 #define CURLPROTO_RTSP (1<<18)
00835 #define CURLPROTO_RTMP (1<<19)
00836 #define CURLPROTO_RTMPT (1<<20)
00837 #define CURLPROTO_RTMPE (1<<21)
00838 #define CURLPROTO_RTMPTE (1<<22)
00839 #define CURLPROTO_RTMPS (1<<23)
00840 #define CURLPROTO_RTMPTS (1<<24)
00841 #define CURLPROTO_GOPHER (1<<25)
00842 #define CURLPROTO_SMB (1<<26)
00843 #define CURLPROTO_SMBS (1<<27)
00844 #define CURLPROTO_ALL (~0)
00845
00846
00847
00848 #define CURLOPTTYPE_LONG 0
00849 #define CURLOPTTYPE_OBJECTPOINT 10000
00850 #define CURLOPTTYPE_STRINGPOINT 10000
00851 #define CURLOPTTYPE_FUNCTIONPOINT 20000
00852 #define CURLOPTTYPE_OFF_T 30000
00853
00854
00855
00856
00857
00858
00859
00860 #ifdef CINIT
00861 #undef CINIT
00862 #endif
00863
00864 #ifdef CURL_ISOCPP
00865 #define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu
00866 #else
00867
00868 #define LONG CURLOPTTYPE_LONG
00869 #define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT
00870 #define STRINGPOINT CURLOPTTYPE_OBJECTPOINT
00871 #define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
00872 #define OFF_T CURLOPTTYPE_OFF_T
00873 #define CINIT(name,type,number) CURLOPT_name = type + number
00874 #endif
00875
00876
00877
00878
00879
00880
00881
00882 typedef enum {
00883
00884 CINIT(WRITEDATA, OBJECTPOINT, 1),
00885
00886
00887 CINIT(URL, STRINGPOINT, 2),
00888
00889
00890 CINIT(PORT, LONG, 3),
00891
00892
00893 CINIT(PROXY, STRINGPOINT, 4),
00894
00895
00896 CINIT(USERPWD, STRINGPOINT, 5),
00897
00898
00899 CINIT(PROXYUSERPWD, STRINGPOINT, 6),
00900
00901
00902 CINIT(RANGE, STRINGPOINT, 7),
00903
00904
00905
00906
00907 CINIT(READDATA, OBJECTPOINT, 9),
00908
00909
00910
00911 CINIT(ERRORBUFFER, OBJECTPOINT, 10),
00912
00913
00914
00915 CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11),
00916
00917
00918
00919 CINIT(READFUNCTION, FUNCTIONPOINT, 12),
00920
00921
00922 CINIT(TIMEOUT, LONG, 13),
00923
00924
00925
00926
00927
00928
00929
00930
00931
00932
00933 CINIT(INFILESIZE, LONG, 14),
00934
00935
00936 CINIT(POSTFIELDS, OBJECTPOINT, 15),
00937
00938
00939 CINIT(REFERER, STRINGPOINT, 16),
00940
00941
00942
00943 CINIT(FTPPORT, STRINGPOINT, 17),
00944
00945
00946 CINIT(USERAGENT, STRINGPOINT, 18),
00947
00948
00949
00950
00951
00952
00953
00954
00955 CINIT(LOW_SPEED_LIMIT, LONG, 19),
00956
00957
00958 CINIT(LOW_SPEED_TIME, LONG, 20),
00959
00960
00961
00962
00963
00964
00965
00966 CINIT(RESUME_FROM, LONG, 21),
00967
00968
00969 CINIT(COOKIE, STRINGPOINT, 22),
00970
00971
00972
00973 CINIT(HTTPHEADER, OBJECTPOINT, 23),
00974
00975
00976 CINIT(HTTPPOST, OBJECTPOINT, 24),
00977
00978
00979 CINIT(SSLCERT, STRINGPOINT, 25),
00980
00981
00982 CINIT(KEYPASSWD, STRINGPOINT, 26),
00983
00984
00985 CINIT(CRLF, LONG, 27),
00986
00987
00988 CINIT(QUOTE, OBJECTPOINT, 28),
00989
00990
00991
00992 CINIT(HEADERDATA, OBJECTPOINT, 29),
00993
00994
00995
00996 CINIT(COOKIEFILE, STRINGPOINT, 31),
00997
00998
00999
01000 CINIT(SSLVERSION, LONG, 32),
01001
01002
01003 CINIT(TIMECONDITION, LONG, 33),
01004
01005
01006
01007 CINIT(TIMEVALUE, LONG, 34),
01008
01009
01010
01011
01012
01013
01014
01015 CINIT(CUSTOMREQUEST, STRINGPOINT, 36),
01016
01017
01018 CINIT(STDERR, OBJECTPOINT, 37),
01019
01020
01021
01022
01023 CINIT(POSTQUOTE, OBJECTPOINT, 39),
01024
01025 CINIT(OBSOLETE40, OBJECTPOINT, 40),
01026
01027 CINIT(VERBOSE, LONG, 41),
01028 CINIT(HEADER, LONG, 42),
01029 CINIT(NOPROGRESS, LONG, 43),
01030 CINIT(NOBODY, LONG, 44),
01031 CINIT(FAILONERROR, LONG, 45),
01032 CINIT(UPLOAD, LONG, 46),
01033 CINIT(POST, LONG, 47),
01034 CINIT(DIRLISTONLY, LONG, 48),
01035
01036 CINIT(APPEND, LONG, 50),
01037
01038
01039
01040 CINIT(NETRC, LONG, 51),
01041
01042 CINIT(FOLLOWLOCATION, LONG, 52),
01043
01044 CINIT(TRANSFERTEXT, LONG, 53),
01045 CINIT(PUT, LONG, 54),
01046
01047
01048
01049
01050
01051
01052
01053 CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56),
01054
01055
01056
01057 CINIT(PROGRESSDATA, OBJECTPOINT, 57),
01058 #define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA
01059
01060
01061 CINIT(AUTOREFERER, LONG, 58),
01062
01063
01064
01065 CINIT(PROXYPORT, LONG, 59),
01066
01067
01068 CINIT(POSTFIELDSIZE, LONG, 60),
01069
01070
01071 CINIT(HTTPPROXYTUNNEL, LONG, 61),
01072
01073
01074 CINIT(INTERFACE, STRINGPOINT, 62),
01075
01076
01077
01078
01079 CINIT(KRBLEVEL, STRINGPOINT, 63),
01080
01081
01082 CINIT(SSL_VERIFYPEER, LONG, 64),
01083
01084
01085
01086 CINIT(CAINFO, STRINGPOINT, 65),
01087
01088
01089
01090
01091
01092 CINIT(MAXREDIRS, LONG, 68),
01093
01094
01095
01096 CINIT(FILETIME, LONG, 69),
01097
01098
01099 CINIT(TELNETOPTIONS, OBJECTPOINT, 70),
01100
01101
01102 CINIT(MAXCONNECTS, LONG, 71),
01103
01104 CINIT(OBSOLETE72, LONG, 72),
01105
01106
01107
01108
01109
01110
01111 CINIT(FRESH_CONNECT, LONG, 74),
01112
01113
01114
01115
01116 CINIT(FORBID_REUSE, LONG, 75),
01117
01118
01119
01120 CINIT(RANDOM_FILE, STRINGPOINT, 76),
01121
01122
01123 CINIT(EGDSOCKET, STRINGPOINT, 77),
01124
01125
01126
01127 CINIT(CONNECTTIMEOUT, LONG, 78),
01128
01129
01130
01131 CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79),
01132
01133
01134
01135
01136 CINIT(HTTPGET, LONG, 80),
01137
01138
01139
01140
01141 CINIT(SSL_VERIFYHOST, LONG, 81),
01142
01143
01144
01145 CINIT(COOKIEJAR, STRINGPOINT, 82),
01146
01147
01148 CINIT(SSL_CIPHER_LIST, STRINGPOINT, 83),
01149
01150
01151
01152 CINIT(HTTP_VERSION, LONG, 84),
01153
01154
01155
01156
01157 CINIT(FTP_USE_EPSV, LONG, 85),
01158
01159
01160 CINIT(SSLCERTTYPE, STRINGPOINT, 86),
01161
01162
01163 CINIT(SSLKEY, STRINGPOINT, 87),
01164
01165
01166 CINIT(SSLKEYTYPE, STRINGPOINT, 88),
01167
01168
01169 CINIT(SSLENGINE, STRINGPOINT, 89),
01170
01171
01172
01173
01174 CINIT(SSLENGINE_DEFAULT, LONG, 90),
01175
01176
01177 CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91),
01178
01179
01180 CINIT(DNS_CACHE_TIMEOUT, LONG, 92),
01181
01182
01183 CINIT(PREQUOTE, OBJECTPOINT, 93),
01184
01185
01186 CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94),
01187
01188
01189 CINIT(DEBUGDATA, OBJECTPOINT, 95),
01190
01191
01192 CINIT(COOKIESESSION, LONG, 96),
01193
01194
01195
01196 CINIT(CAPATH, STRINGPOINT, 97),
01197
01198
01199 CINIT(BUFFERSIZE, LONG, 98),
01200
01201
01202
01203
01204 CINIT(NOSIGNAL, LONG, 99),
01205
01206
01207 CINIT(SHARE, OBJECTPOINT, 100),
01208
01209
01210
01211
01212 CINIT(PROXYTYPE, LONG, 101),
01213
01214
01215
01216
01217 CINIT(ACCEPT_ENCODING, STRINGPOINT, 102),
01218
01219
01220 CINIT(PRIVATE, OBJECTPOINT, 103),
01221
01222
01223 CINIT(HTTP200ALIASES, OBJECTPOINT, 104),
01224
01225
01226
01227
01228 CINIT(UNRESTRICTED_AUTH, LONG, 105),
01229
01230
01231
01232
01233 CINIT(FTP_USE_EPRT, LONG, 106),
01234
01235
01236
01237
01238 CINIT(HTTPAUTH, LONG, 107),
01239
01240
01241
01242
01243 CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108),
01244
01245
01246
01247 CINIT(SSL_CTX_DATA, OBJECTPOINT, 109),
01248
01249
01250
01251
01252
01253 CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110),
01254
01255
01256
01257
01258 CINIT(PROXYAUTH, LONG, 111),
01259
01260
01261
01262
01263
01264 CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112),
01265 #define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT
01266
01267
01268
01269
01270 CINIT(IPRESOLVE, LONG, 113),
01271
01272
01273
01274
01275
01276
01277 CINIT(MAXFILESIZE, LONG, 114),
01278
01279
01280
01281
01282 CINIT(INFILESIZE_LARGE, OFF_T, 115),
01283
01284
01285
01286
01287 CINIT(RESUME_FROM_LARGE, OFF_T, 116),
01288
01289
01290
01291
01292 CINIT(MAXFILESIZE_LARGE, OFF_T, 117),
01293
01294
01295
01296
01297
01298 CINIT(NETRC_FILE, STRINGPOINT, 118),
01299
01300
01301
01302
01303
01304
01305 CINIT(USE_SSL, LONG, 119),
01306
01307
01308 CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),
01309
01310
01311 CINIT(TCP_NODELAY, LONG, 121),
01312
01313
01314
01315
01316
01317
01318
01319
01320
01321
01322
01323
01324
01325
01326
01327
01328
01329
01330
01331 CINIT(FTPSSLAUTH, LONG, 129),
01332
01333 CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130),
01334 CINIT(IOCTLDATA, OBJECTPOINT, 131),
01335
01336
01337
01338
01339
01340
01341 CINIT(FTP_ACCOUNT, STRINGPOINT, 134),
01342
01343
01344 CINIT(COOKIELIST, STRINGPOINT, 135),
01345
01346
01347 CINIT(IGNORE_CONTENT_LENGTH, LONG, 136),
01348
01349
01350
01351
01352
01353 CINIT(FTP_SKIP_PASV_IP, LONG, 137),
01354
01355
01356
01357 CINIT(FTP_FILEMETHOD, LONG, 138),
01358
01359
01360 CINIT(LOCALPORT, LONG, 139),
01361
01362
01363
01364
01365 CINIT(LOCALPORTRANGE, LONG, 140),
01366
01367
01368
01369 CINIT(CONNECT_ONLY, LONG, 141),
01370
01371
01372
01373 CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142),
01374
01375
01376
01377 CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143),
01378
01379
01380
01381
01382 CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144),
01383
01384
01385
01386 CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145),
01387 CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146),
01388
01389
01390 CINIT(FTP_ALTERNATIVE_TO_USER, STRINGPOINT, 147),
01391
01392
01393 CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148),
01394 CINIT(SOCKOPTDATA, OBJECTPOINT, 149),
01395
01396
01397
01398 CINIT(SSL_SESSIONID_CACHE, LONG, 150),
01399
01400
01401 CINIT(SSH_AUTH_TYPES, LONG, 151),
01402
01403
01404 CINIT(SSH_PUBLIC_KEYFILE, STRINGPOINT, 152),
01405 CINIT(SSH_PRIVATE_KEYFILE, STRINGPOINT, 153),
01406
01407
01408 CINIT(FTP_SSL_CCC, LONG, 154),
01409
01410
01411 CINIT(TIMEOUT_MS, LONG, 155),
01412 CINIT(CONNECTTIMEOUT_MS, LONG, 156),
01413
01414
01415
01416 CINIT(HTTP_TRANSFER_DECODING, LONG, 157),
01417 CINIT(HTTP_CONTENT_DECODING, LONG, 158),
01418
01419
01420
01421 CINIT(NEW_FILE_PERMS, LONG, 159),
01422 CINIT(NEW_DIRECTORY_PERMS, LONG, 160),
01423
01424
01425
01426 CINIT(POSTREDIR, LONG, 161),
01427
01428
01429 CINIT(SSH_HOST_PUBLIC_KEY_MD5, STRINGPOINT, 162),
01430
01431
01432
01433
01434
01435 CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163),
01436 CINIT(OPENSOCKETDATA, OBJECTPOINT, 164),
01437
01438
01439 CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165),
01440
01441
01442 CINIT(PROXY_TRANSFER_MODE, LONG, 166),
01443
01444
01445 CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167),
01446 CINIT(SEEKDATA, OBJECTPOINT, 168),
01447
01448
01449 CINIT(CRLFILE, STRINGPOINT, 169),
01450
01451
01452 CINIT(ISSUERCERT, STRINGPOINT, 170),
01453
01454
01455 CINIT(ADDRESS_SCOPE, LONG, 171),
01456
01457
01458
01459 CINIT(CERTINFO, LONG, 172),
01460
01461
01462 CINIT(USERNAME, STRINGPOINT, 173),
01463 CINIT(PASSWORD, STRINGPOINT, 174),
01464
01465
01466 CINIT(PROXYUSERNAME, STRINGPOINT, 175),
01467 CINIT(PROXYPASSWORD, STRINGPOINT, 176),
01468
01469
01470
01471
01472
01473
01474
01475
01476 CINIT(NOPROXY, STRINGPOINT, 177),
01477
01478
01479 CINIT(TFTP_BLKSIZE, LONG, 178),
01480
01481
01482 CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179),
01483
01484
01485 CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),
01486
01487
01488
01489
01490
01491 CINIT(PROTOCOLS, LONG, 181),
01492
01493
01494
01495
01496
01497 CINIT(REDIR_PROTOCOLS, LONG, 182),
01498
01499
01500 CINIT(SSH_KNOWNHOSTS, STRINGPOINT, 183),
01501
01502
01503
01504 CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184),
01505
01506
01507 CINIT(SSH_KEYDATA, OBJECTPOINT, 185),
01508
01509
01510 CINIT(MAIL_FROM, STRINGPOINT, 186),
01511
01512
01513 CINIT(MAIL_RCPT, OBJECTPOINT, 187),
01514
01515
01516 CINIT(FTP_USE_PRET, LONG, 188),
01517
01518
01519 CINIT(RTSP_REQUEST, LONG, 189),
01520
01521
01522 CINIT(RTSP_SESSION_ID, STRINGPOINT, 190),
01523
01524
01525 CINIT(RTSP_STREAM_URI, STRINGPOINT, 191),
01526
01527
01528 CINIT(RTSP_TRANSPORT, STRINGPOINT, 192),
01529
01530
01531 CINIT(RTSP_CLIENT_CSEQ, LONG, 193),
01532
01533
01534 CINIT(RTSP_SERVER_CSEQ, LONG, 194),
01535
01536
01537 CINIT(INTERLEAVEDATA, OBJECTPOINT, 195),
01538
01539
01540 CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196),
01541
01542
01543 CINIT(WILDCARDMATCH, LONG, 197),
01544
01545
01546
01547 CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198),
01548
01549
01550
01551 CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199),
01552
01553
01554 CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200),
01555
01556
01557 CINIT(CHUNK_DATA, OBJECTPOINT, 201),
01558
01559
01560 CINIT(FNMATCH_DATA, OBJECTPOINT, 202),
01561
01562
01563 CINIT(RESOLVE, OBJECTPOINT, 203),
01564
01565
01566 CINIT(TLSAUTH_USERNAME, STRINGPOINT, 204),
01567
01568
01569 CINIT(TLSAUTH_PASSWORD, STRINGPOINT, 205),
01570
01571
01572 CINIT(TLSAUTH_TYPE, STRINGPOINT, 206),
01573
01574
01575
01576
01577
01578
01579
01580
01581
01582
01583
01584 CINIT(TRANSFER_ENCODING, LONG, 207),
01585
01586
01587
01588 CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208),
01589 CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209),
01590
01591
01592 CINIT(GSSAPI_DELEGATION, LONG, 210),
01593
01594
01595 CINIT(DNS_SERVERS, STRINGPOINT, 211),
01596
01597
01598
01599 CINIT(ACCEPTTIMEOUT_MS, LONG, 212),
01600
01601
01602 CINIT(TCP_KEEPALIVE, LONG, 213),
01603
01604
01605 CINIT(TCP_KEEPIDLE, LONG, 214),
01606 CINIT(TCP_KEEPINTVL, LONG, 215),
01607
01608
01609 CINIT(SSL_OPTIONS, LONG, 216),
01610
01611
01612 CINIT(MAIL_AUTH, STRINGPOINT, 217),
01613
01614
01615 CINIT(SASL_IR, LONG, 218),
01616
01617
01618
01619
01620 CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219),
01621
01622
01623 CINIT(XOAUTH2_BEARER, STRINGPOINT, 220),
01624
01625
01626
01627
01628 CINIT(DNS_INTERFACE, STRINGPOINT, 221),
01629
01630
01631
01632 CINIT(DNS_LOCAL_IP4, STRINGPOINT, 222),
01633
01634
01635
01636 CINIT(DNS_LOCAL_IP6, STRINGPOINT, 223),
01637
01638
01639 CINIT(LOGIN_OPTIONS, STRINGPOINT, 224),
01640
01641
01642 CINIT(SSL_ENABLE_NPN, LONG, 225),
01643
01644
01645 CINIT(SSL_ENABLE_ALPN, LONG, 226),
01646
01647
01648
01649 CINIT(EXPECT_100_TIMEOUT_MS, LONG, 227),
01650
01651
01652
01653 CINIT(PROXYHEADER, OBJECTPOINT, 228),
01654
01655
01656 CINIT(HEADEROPT, LONG, 229),
01657
01658
01659
01660 CINIT(PINNEDPUBLICKEY, STRINGPOINT, 230),
01661
01662
01663 CINIT(UNIX_SOCKET_PATH, STRINGPOINT, 231),
01664
01665
01666 CINIT(SSL_VERIFYSTATUS, LONG, 232),
01667
01668
01669 CINIT(SSL_FALSESTART, LONG, 233),
01670
01671
01672 CINIT(PATH_AS_IS, LONG, 234),
01673
01674
01675 CINIT(PROXY_SERVICE_NAME, STRINGPOINT, 235),
01676
01677
01678 CINIT(SERVICE_NAME, STRINGPOINT, 236),
01679
01680
01681 CINIT(PIPEWAIT, LONG, 237),
01682
01683
01684 CINIT(DEFAULT_PROTOCOL, STRINGPOINT, 238),
01685
01686
01687 CINIT(STREAM_WEIGHT, LONG, 239),
01688
01689
01690 CINIT(STREAM_DEPENDS, OBJECTPOINT, 240),
01691
01692
01693 CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241),
01694
01695
01696 CINIT(TFTP_NO_OPTIONS, LONG, 242),
01697
01698
01699
01700 CINIT(CONNECT_TO, OBJECTPOINT, 243),
01701
01702
01703 CINIT(TCP_FASTOPEN, LONG, 244),
01704
01705
01706
01707 CINIT(KEEP_SENDING_ON_ERROR, LONG, 245),
01708
01709
01710
01711 CINIT(PROXY_CAINFO, STRINGPOINT, 246),
01712
01713
01714
01715 CINIT(PROXY_CAPATH, STRINGPOINT, 247),
01716
01717
01718
01719 CINIT(PROXY_SSL_VERIFYPEER, LONG, 248),
01720
01721
01722
01723
01724 CINIT(PROXY_SSL_VERIFYHOST, LONG, 249),
01725
01726
01727
01728 CINIT(PROXY_SSLVERSION, LONG, 250),
01729
01730
01731 CINIT(PROXY_TLSAUTH_USERNAME, STRINGPOINT, 251),
01732
01733
01734 CINIT(PROXY_TLSAUTH_PASSWORD, STRINGPOINT, 252),
01735
01736
01737 CINIT(PROXY_TLSAUTH_TYPE, STRINGPOINT, 253),
01738
01739
01740 CINIT(PROXY_SSLCERT, STRINGPOINT, 254),
01741
01742
01743
01744 CINIT(PROXY_SSLCERTTYPE, STRINGPOINT, 255),
01745
01746
01747 CINIT(PROXY_SSLKEY, STRINGPOINT, 256),
01748
01749
01750
01751 CINIT(PROXY_SSLKEYTYPE, STRINGPOINT, 257),
01752
01753
01754 CINIT(PROXY_KEYPASSWD, STRINGPOINT, 258),
01755
01756
01757 CINIT(PROXY_SSL_CIPHER_LIST, STRINGPOINT, 259),
01758
01759
01760 CINIT(PROXY_CRLFILE, STRINGPOINT, 260),
01761
01762
01763
01764 CINIT(PROXY_SSL_OPTIONS, LONG, 261),
01765
01766
01767 CINIT(PRE_PROXY, STRINGPOINT, 262),
01768
01769
01770
01771 CINIT(PROXY_PINNEDPUBLICKEY, STRINGPOINT, 263),
01772
01773 CURLOPT_LASTENTRY
01774 } CURLoption;
01775
01776 #ifndef CURL_NO_OLDIES
01777
01778
01779
01780
01781
01782
01783 #define CURLOPT_POST301 CURLOPT_POSTREDIR
01784
01785
01786
01787
01788 #define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD
01789 #define CURLOPT_FTPAPPEND CURLOPT_APPEND
01790 #define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY
01791 #define CURLOPT_FTP_SSL CURLOPT_USE_SSL
01792
01793
01794
01795 #define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
01796 #define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
01797
01798 #else
01799
01800 #undef CURLOPT_DNS_USE_GLOBAL_CACHE
01801 #endif
01802
01803
01804
01805
01806
01807 #define CURL_IPRESOLVE_WHATEVER 0
01808
01809 #define CURL_IPRESOLVE_V4 1
01810 #define CURL_IPRESOLVE_V6 2
01811
01812
01813 #define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
01814
01815
01816 enum {
01817 CURL_HTTP_VERSION_NONE,
01818
01819
01820 CURL_HTTP_VERSION_1_0,
01821 CURL_HTTP_VERSION_1_1,
01822 CURL_HTTP_VERSION_2_0,
01823 CURL_HTTP_VERSION_2TLS,
01824 CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE,
01825
01826
01827 CURL_HTTP_VERSION_LAST
01828 };
01829
01830
01831
01832
01833 #define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0
01834
01835
01836
01837
01838 enum {
01839 CURL_RTSPREQ_NONE,
01840 CURL_RTSPREQ_OPTIONS,
01841 CURL_RTSPREQ_DESCRIBE,
01842 CURL_RTSPREQ_ANNOUNCE,
01843 CURL_RTSPREQ_SETUP,
01844 CURL_RTSPREQ_PLAY,
01845 CURL_RTSPREQ_PAUSE,
01846 CURL_RTSPREQ_TEARDOWN,
01847 CURL_RTSPREQ_GET_PARAMETER,
01848 CURL_RTSPREQ_SET_PARAMETER,
01849 CURL_RTSPREQ_RECORD,
01850 CURL_RTSPREQ_RECEIVE,
01851 CURL_RTSPREQ_LAST
01852 };
01853
01854
01855 enum CURL_NETRC_OPTION {
01856 CURL_NETRC_IGNORED,
01857
01858 CURL_NETRC_OPTIONAL,
01859
01860 CURL_NETRC_REQUIRED,
01861
01862
01863 CURL_NETRC_LAST
01864 };
01865
01866 enum {
01867 CURL_SSLVERSION_DEFAULT,
01868 CURL_SSLVERSION_TLSv1,
01869 CURL_SSLVERSION_SSLv2,
01870 CURL_SSLVERSION_SSLv3,
01871 CURL_SSLVERSION_TLSv1_0,
01872 CURL_SSLVERSION_TLSv1_1,
01873 CURL_SSLVERSION_TLSv1_2,
01874 CURL_SSLVERSION_TLSv1_3,
01875
01876 CURL_SSLVERSION_LAST
01877 };
01878
01879 enum CURL_TLSAUTH {
01880 CURL_TLSAUTH_NONE,
01881 CURL_TLSAUTH_SRP,
01882 CURL_TLSAUTH_LAST
01883 };
01884
01885
01886
01887
01888
01889
01890 #define CURL_REDIR_GET_ALL 0
01891 #define CURL_REDIR_POST_301 1
01892 #define CURL_REDIR_POST_302 2
01893 #define CURL_REDIR_POST_303 4
01894 #define CURL_REDIR_POST_ALL \
01895 (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
01896
01897 typedef enum {
01898 CURL_TIMECOND_NONE,
01899
01900 CURL_TIMECOND_IFMODSINCE,
01901 CURL_TIMECOND_IFUNMODSINCE,
01902 CURL_TIMECOND_LASTMOD,
01903
01904 CURL_TIMECOND_LAST
01905 } curl_TimeCond;
01906
01907
01908
01909
01910
01911
01912
01913 CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2);
01914 CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n);
01915
01916
01917 #ifdef CFINIT
01918 #undef CFINIT
01919 #endif
01920
01921 #ifdef CURL_ISOCPP
01922 #define CFINIT(name) CURLFORM_ ## name
01923 #else
01924
01925 #define CFINIT(name) CURLFORM_name
01926 #endif
01927
01928 typedef enum {
01929 CFINIT(NOTHING),
01930
01931
01932 CFINIT(COPYNAME),
01933 CFINIT(PTRNAME),
01934 CFINIT(NAMELENGTH),
01935 CFINIT(COPYCONTENTS),
01936 CFINIT(PTRCONTENTS),
01937 CFINIT(CONTENTSLENGTH),
01938 CFINIT(FILECONTENT),
01939 CFINIT(ARRAY),
01940 CFINIT(OBSOLETE),
01941 CFINIT(FILE),
01942
01943 CFINIT(BUFFER),
01944 CFINIT(BUFFERPTR),
01945 CFINIT(BUFFERLENGTH),
01946
01947 CFINIT(CONTENTTYPE),
01948 CFINIT(CONTENTHEADER),
01949 CFINIT(FILENAME),
01950 CFINIT(END),
01951 CFINIT(OBSOLETE2),
01952
01953 CFINIT(STREAM),
01954 CFINIT(CONTENTLEN),
01955
01956 CURLFORM_LASTENTRY
01957 } CURLformoption;
01958
01959 #undef CFINIT
01960
01961
01962 struct curl_forms {
01963 CURLformoption option;
01964 const char *value;
01965 };
01966
01967
01968
01969
01970
01971
01972
01973
01974
01975
01976
01977
01978
01979
01980
01981
01982
01983 typedef enum {
01984 CURL_FORMADD_OK,
01985
01986 CURL_FORMADD_MEMORY,
01987 CURL_FORMADD_OPTION_TWICE,
01988 CURL_FORMADD_NULL,
01989 CURL_FORMADD_UNKNOWN_OPTION,
01990 CURL_FORMADD_INCOMPLETE,
01991 CURL_FORMADD_ILLEGAL_ARRAY,
01992 CURL_FORMADD_DISABLED,
01993
01994 CURL_FORMADD_LAST
01995 } CURLFORMcode;
01996
01997
01998
01999
02000
02001
02002
02003
02004
02005
02006 CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,
02007 struct curl_httppost **last_post,
02008 ...);
02009
02010
02011
02012
02013
02014
02015
02016
02017
02018 typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
02019 size_t len);
02020
02021
02022
02023
02024
02025
02026
02027
02028
02029
02030
02031 CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg,
02032 curl_formget_callback append);
02033
02034
02035
02036
02037
02038
02039
02040 CURL_EXTERN void curl_formfree(struct curl_httppost *form);
02041
02042
02043
02044
02045
02046
02047
02048
02049
02050 CURL_EXTERN char *curl_getenv(const char *variable);
02051
02052
02053
02054
02055
02056
02057
02058
02059 CURL_EXTERN char *curl_version(void);
02060
02061
02062
02063
02064
02065
02066
02067
02068
02069
02070 CURL_EXTERN char *curl_easy_escape(CURL *handle,
02071 const char *string,
02072 int length);
02073
02074
02075 CURL_EXTERN char *curl_escape(const char *string,
02076 int length);
02077
02078
02079
02080
02081
02082
02083
02084
02085
02086
02087
02088
02089
02090 CURL_EXTERN char *curl_easy_unescape(CURL *handle,
02091 const char *string,
02092 int length,
02093 int *outlength);
02094
02095
02096 CURL_EXTERN char *curl_unescape(const char *string,
02097 int length);
02098
02099
02100
02101
02102
02103
02104
02105
02106
02107 CURL_EXTERN void curl_free(void *p);
02108
02109
02110
02111
02112
02113
02114
02115
02116
02117
02118
02119 CURL_EXTERN CURLcode curl_global_init(long flags);
02120
02121
02122
02123
02124
02125
02126
02127
02128
02129
02130
02131
02132
02133
02134 CURL_EXTERN CURLcode curl_global_init_mem(long flags,
02135 curl_malloc_callback m,
02136 curl_free_callback f,
02137 curl_realloc_callback r,
02138 curl_strdup_callback s,
02139 curl_calloc_callback c);
02140
02141
02142
02143
02144
02145
02146
02147
02148
02149 CURL_EXTERN void curl_global_cleanup(void);
02150
02151
02152 struct curl_slist {
02153 char *data;
02154 struct curl_slist *next;
02155 };
02156
02157
02158
02159
02160
02161
02162
02163
02164
02165 CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *,
02166 const char *);
02167
02168
02169
02170
02171
02172
02173
02174
02175 CURL_EXTERN void curl_slist_free_all(struct curl_slist *);
02176
02177
02178
02179
02180
02181
02182
02183
02184
02185
02186 CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused);
02187
02188
02189
02190 struct curl_certinfo {
02191 int num_of_certs;
02192 struct curl_slist **certinfo;
02193
02194
02195 };
02196
02197
02198 typedef enum {
02199 CURLSSLBACKEND_NONE = 0,
02200 CURLSSLBACKEND_OPENSSL = 1,
02201 CURLSSLBACKEND_GNUTLS = 2,
02202 CURLSSLBACKEND_NSS = 3,
02203 CURLSSLBACKEND_OBSOLETE4 = 4,
02204 CURLSSLBACKEND_GSKIT = 5,
02205 CURLSSLBACKEND_POLARSSL = 6,
02206 CURLSSLBACKEND_CYASSL = 7,
02207 CURLSSLBACKEND_SCHANNEL = 8,
02208 CURLSSLBACKEND_DARWINSSL = 9,
02209 CURLSSLBACKEND_AXTLS = 10,
02210 CURLSSLBACKEND_MBEDTLS = 11
02211 } curl_sslbackend;
02212
02213
02214 #define CURLSSLBACKEND_LIBRESSL 1
02215 #define CURLSSLBACKEND_BORINGSSL 1
02216 #define CURLSSLBACKEND_WOLFSSL 6
02217
02218
02219
02220
02221 struct curl_tlssessioninfo {
02222 curl_sslbackend backend;
02223 void *internals;
02224 };
02225
02226 #define CURLINFO_STRING 0x100000
02227 #define CURLINFO_LONG 0x200000
02228 #define CURLINFO_DOUBLE 0x300000
02229 #define CURLINFO_SLIST 0x400000
02230 #define CURLINFO_SOCKET 0x500000
02231 #define CURLINFO_MASK 0x0fffff
02232 #define CURLINFO_TYPEMASK 0xf00000
02233
02234 typedef enum {
02235 CURLINFO_NONE,
02236 CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1,
02237 CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2,
02238 CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3,
02239 CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4,
02240 CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5,
02241 CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,
02242 CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7,
02243 CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8,
02244 CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9,
02245 CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10,
02246 CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11,
02247 CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12,
02248 CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13,
02249 CURLINFO_FILETIME = CURLINFO_LONG + 14,
02250 CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15,
02251 CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16,
02252 CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
02253 CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18,
02254 CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19,
02255 CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20,
02256 CURLINFO_PRIVATE = CURLINFO_STRING + 21,
02257 CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22,
02258 CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23,
02259 CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24,
02260 CURLINFO_OS_ERRNO = CURLINFO_LONG + 25,
02261 CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26,
02262 CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27,
02263 CURLINFO_COOKIELIST = CURLINFO_SLIST + 28,
02264 CURLINFO_LASTSOCKET = CURLINFO_LONG + 29,
02265 CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30,
02266 CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31,
02267 CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,
02268 CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33,
02269 CURLINFO_CERTINFO = CURLINFO_SLIST + 34,
02270 CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35,
02271 CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36,
02272 CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37,
02273 CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38,
02274 CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39,
02275 CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40,
02276 CURLINFO_LOCAL_IP = CURLINFO_STRING + 41,
02277 CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
02278 CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43,
02279 CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,
02280 CURLINFO_TLS_SSL_PTR = CURLINFO_SLIST + 45,
02281 CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46,
02282 CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47,
02283 CURLINFO_PROTOCOL = CURLINFO_LONG + 48,
02284 CURLINFO_SCHEME = CURLINFO_STRING + 49,
02285
02286
02287 CURLINFO_LASTONE = 49
02288 } CURLINFO;
02289
02290
02291
02292 #define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE
02293
02294 typedef enum {
02295 CURLCLOSEPOLICY_NONE,
02296
02297 CURLCLOSEPOLICY_OLDEST,
02298 CURLCLOSEPOLICY_LEAST_RECENTLY_USED,
02299 CURLCLOSEPOLICY_LEAST_TRAFFIC,
02300 CURLCLOSEPOLICY_SLOWEST,
02301 CURLCLOSEPOLICY_CALLBACK,
02302
02303 CURLCLOSEPOLICY_LAST
02304 } curl_closepolicy;
02305
02306 #define CURL_GLOBAL_SSL (1<<0)
02307 #define CURL_GLOBAL_WIN32 (1<<1)
02308 #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
02309 #define CURL_GLOBAL_NOTHING 0
02310 #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
02311 #define CURL_GLOBAL_ACK_EINTR (1<<2)
02312
02313
02314
02315
02316
02317
02318
02319 typedef enum {
02320 CURL_LOCK_DATA_NONE = 0,
02321
02322
02323
02324
02325 CURL_LOCK_DATA_SHARE,
02326 CURL_LOCK_DATA_COOKIE,
02327 CURL_LOCK_DATA_DNS,
02328 CURL_LOCK_DATA_SSL_SESSION,
02329 CURL_LOCK_DATA_CONNECT,
02330 CURL_LOCK_DATA_LAST
02331 } curl_lock_data;
02332
02333
02334 typedef enum {
02335 CURL_LOCK_ACCESS_NONE = 0,
02336 CURL_LOCK_ACCESS_SHARED = 1,
02337 CURL_LOCK_ACCESS_SINGLE = 2,
02338 CURL_LOCK_ACCESS_LAST
02339 } curl_lock_access;
02340
02341 typedef void (*curl_lock_function)(CURL *handle,
02342 curl_lock_data data,
02343 curl_lock_access locktype,
02344 void *userptr);
02345 typedef void (*curl_unlock_function)(CURL *handle,
02346 curl_lock_data data,
02347 void *userptr);
02348
02349
02350 typedef enum {
02351 CURLSHE_OK,
02352 CURLSHE_BAD_OPTION,
02353 CURLSHE_IN_USE,
02354 CURLSHE_INVALID,
02355 CURLSHE_NOMEM,
02356 CURLSHE_NOT_BUILT_IN,
02357 CURLSHE_LAST
02358 } CURLSHcode;
02359
02360 typedef enum {
02361 CURLSHOPT_NONE,
02362 CURLSHOPT_SHARE,
02363 CURLSHOPT_UNSHARE,
02364 CURLSHOPT_LOCKFUNC,
02365 CURLSHOPT_UNLOCKFUNC,
02366 CURLSHOPT_USERDATA,
02367
02368 CURLSHOPT_LAST
02369 } CURLSHoption;
02370
02371 CURL_EXTERN CURLSH *curl_share_init(void);
02372 CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...);
02373 CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *);
02374
02375
02376
02377
02378
02379 typedef enum {
02380 CURLVERSION_FIRST,
02381 CURLVERSION_SECOND,
02382 CURLVERSION_THIRD,
02383 CURLVERSION_FOURTH,
02384 CURLVERSION_LAST
02385 } CURLversion;
02386
02387
02388
02389
02390
02391
02392 #define CURLVERSION_NOW CURLVERSION_FOURTH
02393
02394 typedef struct {
02395 CURLversion age;
02396 const char *version;
02397 unsigned int version_num;
02398 const char *host;
02399 int features;
02400 const char *ssl_version;
02401 long ssl_version_num;
02402 const char *libz_version;
02403
02404 const char * const *protocols;
02405
02406
02407 const char *ares;
02408 int ares_num;
02409
02410
02411 const char *libidn;
02412
02413
02414
02415
02416 int iconv_ver_num;
02417
02418 const char *libssh_version;
02419
02420 } curl_version_info_data;
02421
02422 #define CURL_VERSION_IPV6 (1<<0)
02423 #define CURL_VERSION_KERBEROS4 (1<<1)
02424
02425 #define CURL_VERSION_SSL (1<<2)
02426 #define CURL_VERSION_LIBZ (1<<3)
02427 #define CURL_VERSION_NTLM (1<<4)
02428 #define CURL_VERSION_GSSNEGOTIATE (1<<5)
02429
02430 #define CURL_VERSION_DEBUG (1<<6)
02431 #define CURL_VERSION_ASYNCHDNS (1<<7)
02432 #define CURL_VERSION_SPNEGO (1<<8)
02433 #define CURL_VERSION_LARGEFILE (1<<9)
02434 #define CURL_VERSION_IDN (1<<10)
02435
02436 #define CURL_VERSION_SSPI (1<<11)
02437 #define CURL_VERSION_CONV (1<<12)
02438 #define CURL_VERSION_CURLDEBUG (1<<13)
02439 #define CURL_VERSION_TLSAUTH_SRP (1<<14)
02440 #define CURL_VERSION_NTLM_WB (1<<15)
02441
02442 #define CURL_VERSION_HTTP2 (1<<16)
02443 #define CURL_VERSION_GSSAPI (1<<17)
02444 #define CURL_VERSION_KERBEROS5 (1<<18)
02445 #define CURL_VERSION_UNIX_SOCKETS (1<<19)
02446 #define CURL_VERSION_PSL (1<<20)
02447
02448 #define CURL_VERSION_HTTPS_PROXY (1<<21)
02449
02450
02451
02452
02453
02454
02455
02456
02457
02458 CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
02459
02460
02461
02462
02463
02464
02465
02466
02467
02468
02469 CURL_EXTERN const char *curl_easy_strerror(CURLcode);
02470
02471
02472
02473
02474
02475
02476
02477
02478
02479
02480 CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
02481
02482
02483
02484
02485
02486
02487
02488
02489
02490
02491 CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
02492
02493 #define CURLPAUSE_RECV (1<<0)
02494 #define CURLPAUSE_RECV_CONT (0)
02495
02496 #define CURLPAUSE_SEND (1<<2)
02497 #define CURLPAUSE_SEND_CONT (0)
02498
02499 #define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND)
02500 #define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
02501
02502 #ifdef __cplusplus
02503 }
02504 #endif
02505
02506
02507
02508 #include "easy.h"
02509 #include "multi.h"
02510
02511
02512 #if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
02513 ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \
02514 !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK)
02515 #include "typecheck-gcc.h"
02516 #else
02517 #if defined(__STDC__) && (__STDC__ >= 1)
02518
02519
02520
02521 #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
02522 #define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
02523 #define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
02524 #define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
02525 #endif
02526 #endif
02527
02528 #endif