| 1 |
#ifndef HEADER_CURL_URLDATA_H |
| 2 |
#define HEADER_CURL_URLDATA_H |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
#include "curl_setup.h" |
| 30 |
|
| 31 |
#define PORT_FTP 21 |
| 32 |
#define PORT_FTPS 990 |
| 33 |
#define PORT_TELNET 23 |
| 34 |
#define PORT_HTTP 80 |
| 35 |
#define PORT_HTTPS 443 |
| 36 |
#define PORT_DICT 2628 |
| 37 |
#define PORT_LDAP 389 |
| 38 |
#define PORT_LDAPS 636 |
| 39 |
#define PORT_TFTP 69 |
| 40 |
#define PORT_SSH 22 |
| 41 |
#define PORT_IMAP 143 |
| 42 |
#define PORT_IMAPS 993 |
| 43 |
#define PORT_POP3 110 |
| 44 |
#define PORT_POP3S 995 |
| 45 |
#define PORT_SMB 445 |
| 46 |
#define PORT_SMBS 445 |
| 47 |
#define PORT_SMTP 25 |
| 48 |
#define PORT_SMTPS 465 |
| 49 |
#define PORT_RTSP 554 |
| 50 |
#define PORT_RTMP 1935 |
| 51 |
#define PORT_RTMPT PORT_HTTP |
| 52 |
#define PORT_RTMPS PORT_HTTPS |
| 53 |
#define PORT_GOPHER 70 |
| 54 |
#define PORT_MQTT 1883 |
| 55 |
|
| 56 |
struct curl_trc_featt; |
| 57 |
|
| 58 |
#ifdef USE_ECH |
| 59 |
|
| 60 |
# define CURLECH_DISABLE (1<<0) |
| 61 |
# define CURLECH_GREASE (1<<1) |
| 62 |
# define CURLECH_ENABLE (1<<2) |
| 63 |
# define CURLECH_HARD (1<<3) |
| 64 |
# define CURLECH_CLA_CFG (1<<4) |
| 65 |
#endif |
| 66 |
|
| 67 |
#ifndef CURL_DISABLE_WEBSOCKETS |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
#define CURLPROTO_WS (1<<30) |
| 74 |
#define CURLPROTO_WSS ((curl_prot_t)1<<31) |
| 75 |
#else |
| 76 |
#define CURLPROTO_WS 0 |
| 77 |
#define CURLPROTO_WSS 0 |
| 78 |
#endif |
| 79 |
|
| 80 |
|
| 81 |
#define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \ |
| 82 |
CURLPROTO_FTPS) |
| 83 |
|
| 84 |
|
| 85 |
#define PROTO_TYPE_SMALL |
| 86 |
|
| 87 |
#ifndef PROTO_TYPE_SMALL |
| 88 |
typedef curl_off_t curl_prot_t; |
| 89 |
#else |
| 90 |
typedef unsigned int curl_prot_t; |
| 91 |
#endif |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
#define CURLPROTO_MASK (0x3ffffff) |
| 97 |
|
| 98 |
#define CURL_DEFAULT_USER "anonymous" |
| 99 |
#define CURL_DEFAULT_PASSWORD "[email protected]" |
| 100 |
|
| 101 |
#if !defined(_WIN32) && !defined(MSDOS) |
| 102 |
|
| 103 |
|
| 104 |
#define CURL_PREFER_LF_LINEENDS |
| 105 |
#endif |
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP|CURLPROTO_HTTPS|CURLPROTO_WS| \ |
| 111 |
CURLPROTO_WSS) |
| 112 |
#define PROTO_FAMILY_FTP (CURLPROTO_FTP|CURLPROTO_FTPS) |
| 113 |
#define PROTO_FAMILY_POP3 (CURLPROTO_POP3|CURLPROTO_POP3S) |
| 114 |
#define PROTO_FAMILY_SMB (CURLPROTO_SMB|CURLPROTO_SMBS) |
| 115 |
#define PROTO_FAMILY_SMTP (CURLPROTO_SMTP|CURLPROTO_SMTPS) |
| 116 |
#define PROTO_FAMILY_SSH (CURLPROTO_SCP|CURLPROTO_SFTP) |
| 117 |
|
| 118 |
#if !defined(CURL_DISABLE_FTP) || defined(USE_SSH) || \ |
| 119 |
!defined(CURL_DISABLE_POP3) || !defined(CURL_DISABLE_FILE) |
| 120 |
|
| 121 |
#define CURL_LIST_ONLY_PROTOCOL 1 |
| 122 |
#endif |
| 123 |
|
| 124 |
#define DEFAULT_CONNCACHE_SIZE 5 |
| 125 |
|
| 126 |
|
| 127 |
#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255") |
| 128 |
|
| 129 |
|
| 130 |
#define RESP_TIMEOUT (120*1000) |
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
#define CURL_MAX_INPUT_LENGTH 8000000 |
| 135 |
|
| 136 |
|
| 137 |
#include "cookie.h" |
| 138 |
#include "psl.h" |
| 139 |
#include "formdata.h" |
| 140 |
|
| 141 |
#ifdef HAVE_NETINET_IN_H |
| 142 |
#include <netinet/in.h> |
| 143 |
#endif |
| 144 |
#ifdef HAVE_NETINET_IN6_H |
| 145 |
#include <netinet/in6.h> |
| 146 |
#endif |
| 147 |
|
| 148 |
#include "curlx/timeval.h" |
| 149 |
|
| 150 |
#include <curl/curl.h> |
| 151 |
|
| 152 |
#include "http_chunks.h" |
| 153 |
#include "hostip.h" |
| 154 |
#include "hash.h" |
| 155 |
#include "splay.h" |
| 156 |
#include "curlx/dynbuf.h" |
| 157 |
#include "dynhds.h" |
| 158 |
#include "request.h" |
| 159 |
#include "netrc.h" |
| 160 |
|
| 161 |
|
| 162 |
typedef ssize_t (Curl_send)(struct Curl_easy *data, |
| 163 |
int sockindex, |
| 164 |
const void *buf, |
| 165 |
size_t len, |
| 166 |
bool eos, |
| 167 |
CURLcode *err); |
| 168 |
|
| 169 |
|
| 170 |
typedef ssize_t (Curl_recv)(struct Curl_easy *data, |
| 171 |
int sockindex, |
| 172 |
char *buf, |
| 173 |
size_t len, |
| 174 |
CURLcode *err); |
| 175 |
|
| 176 |
#include "mime.h" |
| 177 |
#include "imap.h" |
| 178 |
#include "smtp.h" |
| 179 |
#include "ftp.h" |
| 180 |
#include "file.h" |
| 181 |
#include "vssh/ssh.h" |
| 182 |
#include "http.h" |
| 183 |
#include "rtsp.h" |
| 184 |
#include "smb.h" |
| 185 |
#include "mqtt.h" |
| 186 |
#include "ftplistparser.h" |
| 187 |
#include "multihandle.h" |
| 188 |
#include "cf-socket.h" |
| 189 |
|
| 190 |
#ifdef HAVE_GSSAPI |
| 191 |
# ifdef HAVE_GSSGNU |
| 192 |
# include <gss.h> |
| 193 |
# elif defined HAVE_GSSAPI_GSSAPI_H |
| 194 |
# include <gssapi/gssapi.h> |
| 195 |
# else |
| 196 |
# include <gssapi.h> |
| 197 |
# endif |
| 198 |
# ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H |
| 199 |
# include <gssapi/gssapi_generic.h> |
| 200 |
# endif |
| 201 |
#endif |
| 202 |
|
| 203 |
#ifdef USE_LIBSSH2 |
| 204 |
#include <libssh2.h> |
| 205 |
#include <libssh2_sftp.h> |
| 206 |
#endif |
| 207 |
|
| 208 |
#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE |
| 209 |
#define READBUFFER_MAX CURL_MAX_READ_SIZE |
| 210 |
#define READBUFFER_MIN 1024 |
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
#define UPLOADBUFFER_DEFAULT 65536 |
| 221 |
#define UPLOADBUFFER_MAX (2*1024*1024) |
| 222 |
#define UPLOADBUFFER_MIN CURL_MAX_WRITE_SIZE |
| 223 |
|
| 224 |
#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU |
| 225 |
#ifdef DEBUGBUILD |
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
#define GOOD_EASY_HANDLE(x) \ |
| 230 |
(((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER))? TRUE: \ |
| 231 |
(DEBUGASSERT(!(x)), FALSE)) |
| 232 |
#else |
| 233 |
#define GOOD_EASY_HANDLE(x) \ |
| 234 |
((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) |
| 235 |
#endif |
| 236 |
|
| 237 |
#ifdef HAVE_GSSAPI |
| 238 |
|
| 239 |
struct krb5buffer { |
| 240 |
struct dynbuf buf; |
| 241 |
size_t index; |
| 242 |
BIT(eof_flag); |
| 243 |
}; |
| 244 |
|
| 245 |
enum protection_level { |
| 246 |
PROT_NONE, |
| 247 |
PROT_CLEAR, |
| 248 |
PROT_SAFE, |
| 249 |
PROT_CONFIDENTIAL, |
| 250 |
PROT_PRIVATE, |
| 251 |
PROT_CMD, |
| 252 |
PROT_LAST |
| 253 |
}; |
| 254 |
#endif |
| 255 |
|
| 256 |
|
| 257 |
struct ssl_backend_data; |
| 258 |
struct Curl_ssl_scache_entry; |
| 259 |
|
| 260 |
struct ssl_primary_config { |
| 261 |
char *CApath; |
| 262 |
char *CAfile; |
| 263 |
char *issuercert; |
| 264 |
char *clientcert; |
| 265 |
char *cipher_list; |
| 266 |
char *cipher_list13; |
| 267 |
char *signature_algorithms; |
| 268 |
char *pinned_key; |
| 269 |
char *CRLfile; |
| 270 |
struct curl_blob *cert_blob; |
| 271 |
struct curl_blob *ca_info_blob; |
| 272 |
struct curl_blob *issuercert_blob; |
| 273 |
#ifdef USE_TLS_SRP |
| 274 |
char *username; |
| 275 |
char *password; |
| 276 |
#endif |
| 277 |
char *curves; |
| 278 |
unsigned int version_max; |
| 279 |
unsigned char ssl_options; |
| 280 |
unsigned char version; |
| 281 |
BIT(verifypeer); |
| 282 |
BIT(verifyhost); |
| 283 |
BIT(verifystatus); |
| 284 |
BIT(cache_session); |
| 285 |
}; |
| 286 |
|
| 287 |
struct ssl_config_data { |
| 288 |
struct ssl_primary_config primary; |
| 289 |
long certverifyresult; |
| 290 |
curl_ssl_ctx_callback fsslctx; |
| 291 |
void *fsslctxp; |
| 292 |
char *cert_type; |
| 293 |
char *key; |
| 294 |
struct curl_blob *key_blob; |
| 295 |
char *key_type; |
| 296 |
char *key_passwd; |
| 297 |
BIT(certinfo); |
| 298 |
BIT(falsestart); |
| 299 |
BIT(earlydata); |
| 300 |
BIT(enable_beast); |
| 301 |
BIT(no_revoke); |
| 302 |
BIT(no_partialchain); |
| 303 |
BIT(revoke_best_effort); |
| 304 |
|
| 305 |
BIT(native_ca_store); |
| 306 |
BIT(auto_client_cert); |
| 307 |
|
| 308 |
}; |
| 309 |
|
| 310 |
struct ssl_general_config { |
| 311 |
int ca_cache_timeout; |
| 312 |
}; |
| 313 |
|
| 314 |
#ifdef USE_WINDOWS_SSPI |
| 315 |
#include "curl_sspi.h" |
| 316 |
#endif |
| 317 |
|
| 318 |
#ifndef CURL_DISABLE_DIGEST_AUTH |
| 319 |
|
| 320 |
struct digestdata { |
| 321 |
#if defined(USE_WINDOWS_SSPI) |
| 322 |
BYTE *input_token; |
| 323 |
size_t input_token_len; |
| 324 |
CtxtHandle *http_context; |
| 325 |
|
| 326 |
|
| 327 |
char *user; |
| 328 |
char *passwd; |
| 329 |
#else |
| 330 |
char *nonce; |
| 331 |
char *cnonce; |
| 332 |
char *realm; |
| 333 |
char *opaque; |
| 334 |
char *qop; |
| 335 |
char *algorithm; |
| 336 |
int nc; |
| 337 |
unsigned char algo; |
| 338 |
BIT(stale); |
| 339 |
BIT(userhash); |
| 340 |
#endif |
| 341 |
}; |
| 342 |
#endif |
| 343 |
|
| 344 |
typedef enum { |
| 345 |
NTLMSTATE_NONE, |
| 346 |
NTLMSTATE_TYPE1, |
| 347 |
NTLMSTATE_TYPE2, |
| 348 |
NTLMSTATE_TYPE3, |
| 349 |
NTLMSTATE_LAST |
| 350 |
} curlntlm; |
| 351 |
|
| 352 |
typedef enum { |
| 353 |
GSS_AUTHNONE, |
| 354 |
GSS_AUTHRECV, |
| 355 |
GSS_AUTHSENT, |
| 356 |
GSS_AUTHDONE, |
| 357 |
GSS_AUTHSUCC |
| 358 |
} curlnegotiate; |
| 359 |
|
| 360 |
|
| 361 |
#if defined(USE_KERBEROS5) |
| 362 |
struct kerberos5data { |
| 363 |
#if defined(USE_WINDOWS_SSPI) |
| 364 |
CredHandle *credentials; |
| 365 |
CtxtHandle *context; |
| 366 |
TCHAR *spn; |
| 367 |
SEC_WINNT_AUTH_IDENTITY identity; |
| 368 |
SEC_WINNT_AUTH_IDENTITY *p_identity; |
| 369 |
size_t token_max; |
| 370 |
BYTE *output_token; |
| 371 |
#else |
| 372 |
gss_ctx_id_t context; |
| 373 |
gss_name_t spn; |
| 374 |
#endif |
| 375 |
}; |
| 376 |
#endif |
| 377 |
|
| 378 |
|
| 379 |
#ifdef USE_GSASL |
| 380 |
#include <gsasl.h> |
| 381 |
struct gsasldata { |
| 382 |
Gsasl *ctx; |
| 383 |
Gsasl_session *client; |
| 384 |
}; |
| 385 |
#endif |
| 386 |
|
| 387 |
|
| 388 |
#if defined(USE_NTLM) |
| 389 |
struct ntlmdata { |
| 390 |
#ifdef USE_WINDOWS_SSPI |
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
#ifdef SECPKG_ATTR_ENDPOINT_BINDINGS |
| 395 |
CtxtHandle *sslContext; |
| 396 |
#endif |
| 397 |
CredHandle *credentials; |
| 398 |
CtxtHandle *context; |
| 399 |
SEC_WINNT_AUTH_IDENTITY identity; |
| 400 |
SEC_WINNT_AUTH_IDENTITY *p_identity; |
| 401 |
size_t token_max; |
| 402 |
BYTE *output_token; |
| 403 |
BYTE *input_token; |
| 404 |
size_t input_token_len; |
| 405 |
TCHAR *spn; |
| 406 |
#else |
| 407 |
unsigned int flags; |
| 408 |
unsigned char nonce[8]; |
| 409 |
unsigned int target_info_len; |
| 410 |
void *target_info; |
| 411 |
#endif |
| 412 |
}; |
| 413 |
#endif |
| 414 |
|
| 415 |
|
| 416 |
#ifdef USE_SPNEGO |
| 417 |
struct negotiatedata { |
| 418 |
#ifdef HAVE_GSSAPI |
| 419 |
OM_uint32 status; |
| 420 |
gss_ctx_id_t context; |
| 421 |
gss_name_t spn; |
| 422 |
gss_buffer_desc output_token; |
| 423 |
struct dynbuf channel_binding_data; |
| 424 |
#else |
| 425 |
#ifdef USE_WINDOWS_SSPI |
| 426 |
#ifdef SECPKG_ATTR_ENDPOINT_BINDINGS |
| 427 |
CtxtHandle *sslContext; |
| 428 |
#endif |
| 429 |
DWORD status; |
| 430 |
CredHandle *credentials; |
| 431 |
CtxtHandle *context; |
| 432 |
SEC_WINNT_AUTH_IDENTITY identity; |
| 433 |
SEC_WINNT_AUTH_IDENTITY *p_identity; |
| 434 |
TCHAR *spn; |
| 435 |
size_t token_max; |
| 436 |
BYTE *output_token; |
| 437 |
size_t output_token_length; |
| 438 |
#endif |
| 439 |
#endif |
| 440 |
BIT(noauthpersist); |
| 441 |
BIT(havenoauthpersist); |
| 442 |
BIT(havenegdata); |
| 443 |
BIT(havemultiplerequests); |
| 444 |
}; |
| 445 |
#endif |
| 446 |
|
| 447 |
#ifdef CURL_DISABLE_PROXY |
| 448 |
#define CONN_IS_PROXIED(x) 0 |
| 449 |
#else |
| 450 |
#define CONN_IS_PROXIED(x) x->bits.proxy |
| 451 |
#endif |
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
|
| 456 |
struct ConnectBits { |
| 457 |
#ifndef CURL_DISABLE_PROXY |
| 458 |
BIT(httpproxy); |
| 459 |
BIT(socksproxy); |
| 460 |
BIT(proxy_user_passwd); |
| 461 |
BIT(tunnel_proxy); |
| 462 |
|
| 463 |
|
| 464 |
|
| 465 |
BIT(proxy); |
| 466 |
#endif |
| 467 |
|
| 468 |
BIT(close); |
| 469 |
BIT(reuse); |
| 470 |
BIT(altused); |
| 471 |
BIT(conn_to_host); |
| 472 |
|
| 473 |
BIT(conn_to_port); |
| 474 |
|
| 475 |
BIT(ipv6_ip); |
| 476 |
|
| 477 |
BIT(ipv6); |
| 478 |
BIT(do_more); |
| 479 |
|
| 480 |
BIT(protoconnstart); |
| 481 |
|
| 482 |
BIT(retry); |
| 483 |
|
| 484 |
#ifndef CURL_DISABLE_FTP |
| 485 |
BIT(ftp_use_epsv); |
| 486 |
|
| 487 |
|
| 488 |
BIT(ftp_use_eprt); |
| 489 |
|
| 490 |
|
| 491 |
BIT(ftp_use_data_ssl); |
| 492 |
BIT(ftp_use_control_ssl); |
| 493 |
#endif |
| 494 |
#ifndef CURL_DISABLE_NETRC |
| 495 |
BIT(netrc); |
| 496 |
#endif |
| 497 |
BIT(bound); |
| 498 |
|
| 499 |
BIT(asks_multiplex); |
| 500 |
BIT(multiplex); |
| 501 |
BIT(tcp_fastopen); |
| 502 |
BIT(tls_enable_alpn); |
| 503 |
#ifndef CURL_DISABLE_DOH |
| 504 |
BIT(doh); |
| 505 |
#endif |
| 506 |
#ifdef USE_UNIX_SOCKETS |
| 507 |
BIT(abstract_unix_socket); |
| 508 |
#endif |
| 509 |
BIT(sock_accepted); |
| 510 |
|
| 511 |
BIT(parallel_connect); |
| 512 |
|
| 513 |
BIT(aborted); |
| 514 |
BIT(shutdown_handler); |
| 515 |
BIT(shutdown_filters); |
| 516 |
BIT(in_cpool); |
| 517 |
}; |
| 518 |
|
| 519 |
struct hostname { |
| 520 |
char *rawalloc; |
| 521 |
char *encalloc; |
| 522 |
char *name; |
| 523 |
const char *dispname; |
| 524 |
}; |
| 525 |
|
| 526 |
|
| 527 |
|
| 528 |
|
| 529 |
|
| 530 |
#define KEEP_NONE 0 |
| 531 |
#define KEEP_RECV (1<<0) |
| 532 |
#define KEEP_SEND (1<<1) |
| 533 |
#define KEEP_RECV_HOLD (1<<2) |
| 534 |
|
| 535 |
#define KEEP_SEND_HOLD (1<<3) |
| 536 |
|
| 537 |
#define KEEP_RECV_PAUSE (1<<4) |
| 538 |
#define KEEP_SEND_PAUSE (1<<5) |
| 539 |
|
| 540 |
|
| 541 |
|
| 542 |
|
| 543 |
|
| 544 |
|
| 545 |
|
| 546 |
#define KEEP_SEND_TIMED (1<<6) |
| 547 |
|
| 548 |
#define KEEP_RECVBITS (KEEP_RECV | KEEP_RECV_HOLD | KEEP_RECV_PAUSE) |
| 549 |
#define KEEP_SENDBITS (KEEP_SEND | KEEP_SEND_HOLD | KEEP_SEND_PAUSE) |
| 550 |
|
| 551 |
|
| 552 |
#define CURL_WANT_SEND(data) \ |
| 553 |
(((data)->req.keepon & KEEP_SENDBITS) == KEEP_SEND) |
| 554 |
|
| 555 |
#define CURL_WANT_RECV(data) \ |
| 556 |
(((data)->req.keepon & KEEP_RECVBITS) == KEEP_RECV) |
| 557 |
|
| 558 |
#define FIRSTSOCKET 0 |
| 559 |
#define SECONDARYSOCKET 1 |
| 560 |
|
| 561 |
|
| 562 |
|
| 563 |
|
| 564 |
struct easy_pollset { |
| 565 |
curl_socket_t sockets[MAX_SOCKSPEREASYHANDLE]; |
| 566 |
unsigned int num; |
| 567 |
unsigned char actions[MAX_SOCKSPEREASYHANDLE]; |
| 568 |
}; |
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
|
| 573 |
|
| 574 |
struct Curl_handler { |
| 575 |
const char *scheme; |
| 576 |
|
| 577 |
|
| 578 |
|
| 579 |
CURLcode (*setup_connection)(struct Curl_easy *data, |
| 580 |
struct connectdata *conn); |
| 581 |
|
| 582 |
|
| 583 |
CURLcode (*do_it)(struct Curl_easy *data, bool *done); |
| 584 |
CURLcode (*done)(struct Curl_easy *, CURLcode, bool); |
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
|
| 589 |
|
| 590 |
CURLcode (*do_more)(struct Curl_easy *, int *); |
| 591 |
|
| 592 |
|
| 593 |
|
| 594 |
|
| 595 |
|
| 596 |
|
| 597 |
|
| 598 |
CURLcode (*connect_it)(struct Curl_easy *data, bool *done); |
| 599 |
|
| 600 |
|
| 601 |
CURLcode (*connecting)(struct Curl_easy *data, bool *done); |
| 602 |
CURLcode (*doing)(struct Curl_easy *data, bool *done); |
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
int (*proto_getsock)(struct Curl_easy *data, |
| 607 |
struct connectdata *conn, curl_socket_t *socks); |
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
int (*doing_getsock)(struct Curl_easy *data, |
| 612 |
struct connectdata *conn, curl_socket_t *socks); |
| 613 |
|
| 614 |
|
| 615 |
|
| 616 |
int (*domore_getsock)(struct Curl_easy *data, |
| 617 |
struct connectdata *conn, curl_socket_t *socks); |
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
int (*perform_getsock)(struct Curl_easy *data, |
| 623 |
struct connectdata *conn, curl_socket_t *socks); |
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
CURLcode (*disconnect)(struct Curl_easy *, struct connectdata *, |
| 632 |
bool dead_connection); |
| 633 |
|
| 634 |
|
| 635 |
|
| 636 |
|
| 637 |
CURLcode (*write_resp)(struct Curl_easy *data, const char *buf, size_t blen, |
| 638 |
bool is_eos); |
| 639 |
|
| 640 |
|
| 641 |
|
| 642 |
|
| 643 |
CURLcode (*write_resp_hd)(struct Curl_easy *data, |
| 644 |
const char *hd, size_t hdlen, bool is_eos); |
| 645 |
|
| 646 |
|
| 647 |
|
| 648 |
|
| 649 |
unsigned int (*connection_check)(struct Curl_easy *data, |
| 650 |
struct connectdata *conn, |
| 651 |
unsigned int checks_to_perform); |
| 652 |
|
| 653 |
|
| 654 |
void (*attach)(struct Curl_easy *data, struct connectdata *conn); |
| 655 |
|
| 656 |
|
| 657 |
|
| 658 |
|
| 659 |
CURLcode (*follow)(struct Curl_easy *data, const char *newurl, |
| 660 |
followtype type); |
| 661 |
|
| 662 |
int defport; |
| 663 |
curl_prot_t protocol; |
| 664 |
|
| 665 |
curl_prot_t family; |
| 666 |
|
| 667 |
unsigned int flags; |
| 668 |
|
| 669 |
}; |
| 670 |
|
| 671 |
#define PROTOPT_NONE 0 |
| 672 |
#define PROTOPT_SSL (1<<0) |
| 673 |
#define PROTOPT_DUAL (1<<1) |
| 674 |
#define PROTOPT_CLOSEACTION (1<<2) |
| 675 |
|
| 676 |
|
| 677 |
|
| 678 |
|
| 679 |
#define PROTOPT_DIRLOCK (1<<3) |
| 680 |
#define PROTOPT_NONETWORK (1<<4) |
| 681 |
#define PROTOPT_NEEDSPWD (1<<5) |
| 682 |
|
| 683 |
#define PROTOPT_NOURLQUERY (1<<6) |
| 684 |
|
| 685 |
#define PROTOPT_CREDSPERREQUEST (1<<7) |
| 686 |
|
| 687 |
#define PROTOPT_ALPN (1<<8) |
| 688 |
|
| 689 |
#define PROTOPT_URLOPTIONS (1<<10) |
| 690 |
|
| 691 |
#define PROTOPT_PROXY_AS_HTTP (1<<11) |
| 692 |
|
| 693 |
|
| 694 |
#define PROTOPT_WILDCARD (1<<12) |
| 695 |
#define PROTOPT_USERPWDCTRL (1<<13) |
| 696 |
|
| 697 |
#define PROTOPT_NOTCPPROXY (1<<14) |
| 698 |
|
| 699 |
#define CONNCHECK_NONE 0 |
| 700 |
#define CONNCHECK_ISDEAD (1<<0) |
| 701 |
#define CONNCHECK_KEEPALIVE (1<<1) |
| 702 |
|
| 703 |
#define CONNRESULT_NONE 0 |
| 704 |
#define CONNRESULT_DEAD (1<<0) |
| 705 |
|
| 706 |
struct ip_quadruple { |
| 707 |
char remote_ip[MAX_IPADR_LEN]; |
| 708 |
char local_ip[MAX_IPADR_LEN]; |
| 709 |
int remote_port; |
| 710 |
int local_port; |
| 711 |
}; |
| 712 |
|
| 713 |
struct proxy_info { |
| 714 |
struct hostname host; |
| 715 |
int port; |
| 716 |
unsigned char proxytype; |
| 717 |
|
| 718 |
char *user; |
| 719 |
char *passwd; |
| 720 |
}; |
| 721 |
|
| 722 |
#define TRNSPRT_TCP 3 |
| 723 |
#define TRNSPRT_UDP 4 |
| 724 |
#define TRNSPRT_QUIC 5 |
| 725 |
#define TRNSPRT_UNIX 6 |
| 726 |
|
| 727 |
|
| 728 |
|
| 729 |
|
| 730 |
|
| 731 |
struct connectdata { |
| 732 |
struct Curl_llist_node cpool_node; |
| 733 |
struct Curl_llist_node cshutdn_node; |
| 734 |
|
| 735 |
curl_closesocket_callback fclosesocket; |
| 736 |
void *closesocket_client; |
| 737 |
|
| 738 |
|
| 739 |
|
| 740 |
|
| 741 |
|
| 742 |
#define CONN_INUSE(c) (!Curl_uint_spbset_empty(&(c)->xfers_attached)) |
| 743 |
#define CONN_ATTACHED(c) Curl_uint_spbset_count(&(c)->xfers_attached) |
| 744 |
|
| 745 |
|
| 746 |
curl_off_t connection_id; |
| 747 |
|
| 748 |
char *destination; |
| 749 |
|
| 750 |
|
| 751 |
|
| 752 |
|
| 753 |
|
| 754 |
struct Curl_hash meta_hash; |
| 755 |
|
| 756 |
|
| 757 |
|
| 758 |
const struct Curl_sockaddr_ex *remote_addr; |
| 759 |
|
| 760 |
struct hostname host; |
| 761 |
char *hostname_resolve; |
| 762 |
char *secondaryhostname; |
| 763 |
struct hostname conn_to_host; |
| 764 |
|
| 765 |
#ifndef CURL_DISABLE_PROXY |
| 766 |
struct proxy_info socks_proxy; |
| 767 |
struct proxy_info http_proxy; |
| 768 |
#endif |
| 769 |
|
| 770 |
|
| 771 |
|
| 772 |
|
| 773 |
|
| 774 |
|
| 775 |
struct ip_quadruple primary; |
| 776 |
struct ip_quadruple secondary; |
| 777 |
char *user; |
| 778 |
char *passwd; |
| 779 |
char *options; |
| 780 |
char *sasl_authzid; |
| 781 |
char *oauth_bearer; |
| 782 |
struct curltime created; |
| 783 |
struct curltime lastused; |
| 784 |
curl_socket_t sock[2]; |
| 785 |
|
| 786 |
Curl_recv *recv[2]; |
| 787 |
Curl_send *send[2]; |
| 788 |
struct Curl_cfilter *cfilter[2]; |
| 789 |
struct { |
| 790 |
struct curltime start[2]; |
| 791 |
unsigned int timeout_ms; |
| 792 |
} shutdown; |
| 793 |
|
| 794 |
struct ssl_primary_config ssl_config; |
| 795 |
#ifndef CURL_DISABLE_PROXY |
| 796 |
struct ssl_primary_config proxy_ssl_config; |
| 797 |
#endif |
| 798 |
struct ConnectBits bits; |
| 799 |
|
| 800 |
const struct Curl_handler *handler; |
| 801 |
const struct Curl_handler *given; |
| 802 |
|
| 803 |
|
| 804 |
|
| 805 |
|
| 806 |
struct curltime keepalive; |
| 807 |
|
| 808 |
|
| 809 |
|
| 810 |
curl_socket_t sockfd; |
| 811 |
curl_socket_t writesockfd; |
| 812 |
|
| 813 |
|
| 814 |
#ifdef HAVE_GSSAPI |
| 815 |
BIT(sec_complete); |
| 816 |
unsigned char command_prot; |
| 817 |
unsigned char data_prot; |
| 818 |
unsigned char request_data_prot; |
| 819 |
size_t buffer_size; |
| 820 |
struct krb5buffer in_buffer; |
| 821 |
void *app_data; |
| 822 |
const struct Curl_sec_client_mech *mech; |
| 823 |
struct sockaddr_in local_addr; |
| 824 |
#endif |
| 825 |
|
| 826 |
#if defined(USE_KERBEROS5) |
| 827 |
struct kerberos5data krb5; |
| 828 |
#endif |
| 829 |
|
| 830 |
struct uint_spbset xfers_attached; |
| 831 |
|
| 832 |
|
| 833 |
|
| 834 |
|
| 835 |
|
| 836 |
|
| 837 |
struct Curl_multi *attached_multi; |
| 838 |
|
| 839 |
|
| 840 |
#if defined(USE_WINDOWS_SSPI) && defined(SECPKG_ATTR_ENDPOINT_BINDINGS) |
| 841 |
CtxtHandle *sslContext; |
| 842 |
#endif |
| 843 |
|
| 844 |
#ifdef USE_GSASL |
| 845 |
struct gsasldata gsasl; |
| 846 |
#endif |
| 847 |
|
| 848 |
#if defined(USE_NTLM) |
| 849 |
curlntlm http_ntlm_state; |
| 850 |
curlntlm proxy_ntlm_state; |
| 851 |
|
| 852 |
struct ntlmdata ntlm; |
| 853 |
|
| 854 |
|
| 855 |
struct ntlmdata proxyntlm; |
| 856 |
#endif |
| 857 |
|
| 858 |
#ifdef USE_SPNEGO |
| 859 |
curlnegotiate http_negotiate_state; |
| 860 |
curlnegotiate proxy_negotiate_state; |
| 861 |
|
| 862 |
struct negotiatedata negotiate; |
| 863 |
struct negotiatedata proxyneg; |
| 864 |
#endif |
| 865 |
|
| 866 |
#ifdef USE_UNIX_SOCKETS |
| 867 |
char *unix_domain_socket; |
| 868 |
#endif |
| 869 |
|
| 870 |
|
| 871 |
|
| 872 |
|
| 873 |
|
| 874 |
|
| 875 |
char *localdev; |
| 876 |
unsigned short localportrange; |
| 877 |
int waitfor; |
| 878 |
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) |
| 879 |
int socks5_gssapi_enctype; |
| 880 |
#endif |
| 881 |
|
| 882 |
int remote_port; |
| 883 |
int conn_to_port; |
| 884 |
|
| 885 |
#ifdef USE_IPV6 |
| 886 |
unsigned int scope_id; |
| 887 |
#endif |
| 888 |
unsigned short localport; |
| 889 |
unsigned short secondary_port; |
| 890 |
|
| 891 |
unsigned char alpn; |
| 892 |
|
| 893 |
#ifndef CURL_DISABLE_PROXY |
| 894 |
unsigned char proxy_alpn; |
| 895 |
#endif |
| 896 |
unsigned char transport; |
| 897 |
unsigned char ip_version; |
| 898 |
|
| 899 |
|
| 900 |
unsigned char httpversion_seen; |
| 901 |
unsigned char connect_only; |
| 902 |
unsigned char gssapi_delegation; |
| 903 |
}; |
| 904 |
|
| 905 |
#ifndef CURL_DISABLE_PROXY |
| 906 |
#define CURL_CONN_HOST_DISPNAME(c) \ |
| 907 |
((c)->bits.socksproxy ? (c)->socks_proxy.host.dispname : \ |
| 908 |
(c)->bits.httpproxy ? (c)->http_proxy.host.dispname : \ |
| 909 |
(c)->bits.conn_to_host ? (c)->conn_to_host.dispname : \ |
| 910 |
(c)->host.dispname) |
| 911 |
#else |
| 912 |
#define CURL_CONN_HOST_DISPNAME(c) \ |
| 913 |
(c)->bits.conn_to_host ? (c)->conn_to_host.dispname : \ |
| 914 |
(c)->host.dispname |
| 915 |
#endif |
| 916 |
|
| 917 |
|
| 918 |
|
| 919 |
|
| 920 |
|
| 921 |
|
| 922 |
|
| 923 |
struct PureInfo { |
| 924 |
int httpcode; |
| 925 |
int httpproxycode; |
| 926 |
int httpversion; |
| 927 |
time_t filetime; |
| 928 |
|
| 929 |
curl_off_t request_size; |
| 930 |
unsigned long proxyauthavail; |
| 931 |
unsigned long httpauthavail; |
| 932 |
unsigned long proxyauthpicked; |
| 933 |
unsigned long httpauthpicked; |
| 934 |
long numconnects; |
| 935 |
char *contenttype; |
| 936 |
char *wouldredirect; |
| 937 |
curl_off_t retry_after; |
| 938 |
unsigned int header_size; |
| 939 |
|
| 940 |
|
| 941 |
|
| 942 |
|
| 943 |
|
| 944 |
|
| 945 |
|
| 946 |
struct ip_quadruple primary; |
| 947 |
int conn_remote_port; |
| 948 |
|
| 949 |
|
| 950 |
const char *conn_scheme; |
| 951 |
unsigned int conn_protocol; |
| 952 |
struct curl_certinfo certs; |
| 953 |
|
| 954 |
CURLproxycode pxcode; |
| 955 |
BIT(timecond); |
| 956 |
|
| 957 |
BIT(used_proxy); |
| 958 |
}; |
| 959 |
|
| 960 |
struct pgrs_measure { |
| 961 |
struct curltime start; |
| 962 |
curl_off_t start_size; |
| 963 |
}; |
| 964 |
|
| 965 |
struct pgrs_dir { |
| 966 |
curl_off_t total_size; |
| 967 |
curl_off_t cur_size; |
| 968 |
curl_off_t speed; |
| 969 |
struct pgrs_measure limit; |
| 970 |
}; |
| 971 |
|
| 972 |
struct Progress { |
| 973 |
time_t lastshow; |
| 974 |
|
| 975 |
struct pgrs_dir ul; |
| 976 |
struct pgrs_dir dl; |
| 977 |
|
| 978 |
curl_off_t current_speed; |
| 979 |
curl_off_t earlydata_sent; |
| 980 |
|
| 981 |
timediff_t timespent; |
| 982 |
|
| 983 |
timediff_t t_postqueue; |
| 984 |
timediff_t t_nslookup; |
| 985 |
timediff_t t_connect; |
| 986 |
timediff_t t_appconnect; |
| 987 |
timediff_t t_pretransfer; |
| 988 |
timediff_t t_posttransfer; |
| 989 |
timediff_t t_starttransfer; |
| 990 |
timediff_t t_redirect; |
| 991 |
|
| 992 |
struct curltime start; |
| 993 |
struct curltime t_startsingle; |
| 994 |
struct curltime t_startop; |
| 995 |
struct curltime t_startqueue; |
| 996 |
struct curltime t_acceptdata; |
| 997 |
|
| 998 |
#define CURR_TIME (5 + 1) |
| 999 |
|
| 1000 |
curl_off_t speeder[ CURR_TIME ]; |
| 1001 |
struct curltime speeder_time[ CURR_TIME ]; |
| 1002 |
unsigned char speeder_c; |
| 1003 |
BIT(hide); |
| 1004 |
BIT(ul_size_known); |
| 1005 |
BIT(dl_size_known); |
| 1006 |
BIT(headers_out); |
| 1007 |
BIT(callback); |
| 1008 |
BIT(is_t_startransfer_set); |
| 1009 |
}; |
| 1010 |
|
| 1011 |
typedef enum { |
| 1012 |
RTSPREQ_NONE, |
| 1013 |
RTSPREQ_OPTIONS, |
| 1014 |
RTSPREQ_DESCRIBE, |
| 1015 |
RTSPREQ_ANNOUNCE, |
| 1016 |
RTSPREQ_SETUP, |
| 1017 |
RTSPREQ_PLAY, |
| 1018 |
RTSPREQ_PAUSE, |
| 1019 |
RTSPREQ_TEARDOWN, |
| 1020 |
RTSPREQ_GET_PARAMETER, |
| 1021 |
RTSPREQ_SET_PARAMETER, |
| 1022 |
RTSPREQ_RECORD, |
| 1023 |
RTSPREQ_RECEIVE, |
| 1024 |
RTSPREQ_LAST |
| 1025 |
} Curl_RtspReq; |
| 1026 |
|
| 1027 |
struct auth { |
| 1028 |
unsigned long want; |
| 1029 |
|
| 1030 |
unsigned long picked; |
| 1031 |
unsigned long avail; |
| 1032 |
|
| 1033 |
BIT(done); |
| 1034 |
|
| 1035 |
BIT(multipass); |
| 1036 |
|
| 1037 |
BIT(iestyle); |
| 1038 |
|
| 1039 |
}; |
| 1040 |
|
| 1041 |
#ifdef USE_NGHTTP2 |
| 1042 |
struct Curl_data_prio_node { |
| 1043 |
struct Curl_data_prio_node *next; |
| 1044 |
struct Curl_easy *data; |
| 1045 |
}; |
| 1046 |
#endif |
| 1047 |
|
| 1048 |
|
| 1049 |
|
| 1050 |
|
| 1051 |
|
| 1052 |
struct Curl_data_priority { |
| 1053 |
#ifdef USE_NGHTTP2 |
| 1054 |
|
| 1055 |
struct Curl_easy *parent; |
| 1056 |
struct Curl_data_prio_node *children; |
| 1057 |
#endif |
| 1058 |
int weight; |
| 1059 |
#ifdef USE_NGHTTP2 |
| 1060 |
BIT(exclusive); |
| 1061 |
#endif |
| 1062 |
}; |
| 1063 |
|
| 1064 |
|
| 1065 |
typedef enum { |
| 1066 |
EXPIRE_100_TIMEOUT, |
| 1067 |
EXPIRE_ASYNC_NAME, |
| 1068 |
EXPIRE_CONNECTTIMEOUT, |
| 1069 |
EXPIRE_DNS_PER_NAME, |
| 1070 |
EXPIRE_DNS_PER_NAME2, |
| 1071 |
EXPIRE_HAPPY_EYEBALLS_DNS, |
| 1072 |
EXPIRE_HAPPY_EYEBALLS, |
| 1073 |
EXPIRE_MULTI_PENDING, |
| 1074 |
EXPIRE_RUN_NOW, |
| 1075 |
EXPIRE_SPEEDCHECK, |
| 1076 |
EXPIRE_TIMEOUT, |
| 1077 |
EXPIRE_TOOFAST, |
| 1078 |
EXPIRE_QUIC, |
| 1079 |
EXPIRE_FTP_ACCEPT, |
| 1080 |
EXPIRE_ALPN_EYEBALLS, |
| 1081 |
EXPIRE_SHUTDOWN, |
| 1082 |
EXPIRE_LAST |
| 1083 |
} expire_id; |
| 1084 |
|
| 1085 |
|
| 1086 |
typedef enum { |
| 1087 |
TRAILERS_NONE, |
| 1088 |
TRAILERS_INITIALIZED, |
| 1089 |
TRAILERS_SENDING, |
| 1090 |
TRAILERS_DONE |
| 1091 |
} trailers_state; |
| 1092 |
|
| 1093 |
|
| 1094 |
|
| 1095 |
|
| 1096 |
|
| 1097 |
struct time_node { |
| 1098 |
struct Curl_llist_node list; |
| 1099 |
struct curltime time; |
| 1100 |
expire_id eid; |
| 1101 |
}; |
| 1102 |
|
| 1103 |
|
| 1104 |
struct urlpieces { |
| 1105 |
char *scheme; |
| 1106 |
char *hostname; |
| 1107 |
char *port; |
| 1108 |
char *user; |
| 1109 |
char *password; |
| 1110 |
char *options; |
| 1111 |
char *path; |
| 1112 |
char *query; |
| 1113 |
}; |
| 1114 |
|
| 1115 |
#define CREDS_NONE 0 |
| 1116 |
#define CREDS_URL 1 |
| 1117 |
#define CREDS_OPTION 2 |
| 1118 |
#define CREDS_NETRC 3 |
| 1119 |
|
| 1120 |
struct UrlState { |
| 1121 |
|
| 1122 |
struct curltime keeps_speed; |
| 1123 |
|
| 1124 |
curl_off_t lastconnect_id; |
| 1125 |
curl_off_t recent_conn_id; |
| 1126 |
|
| 1127 |
struct dynbuf headerb; |
| 1128 |
struct curl_slist *hstslist; |
| 1129 |
|
| 1130 |
curl_off_t current_speed; |
| 1131 |
|
| 1132 |
|
| 1133 |
|
| 1134 |
|
| 1135 |
|
| 1136 |
|
| 1137 |
char *first_host; |
| 1138 |
int first_remote_port; |
| 1139 |
curl_prot_t first_remote_protocol; |
| 1140 |
|
| 1141 |
int retrycount; |
| 1142 |
int os_errno; |
| 1143 |
long followlocation; |
| 1144 |
int requests; |
| 1145 |
#ifdef HAVE_SIGNAL |
| 1146 |
|
| 1147 |
void (*prev_signal)(int sig); |
| 1148 |
#endif |
| 1149 |
#ifndef CURL_DISABLE_DIGEST_AUTH |
| 1150 |
struct digestdata digest; |
| 1151 |
struct digestdata proxydigest; |
| 1152 |
#endif |
| 1153 |
struct auth authhost; |
| 1154 |
struct auth authproxy; |
| 1155 |
|
| 1156 |
struct Curl_dns_entry *dns[2]; |
| 1157 |
#ifdef USE_CURL_ASYNC |
| 1158 |
struct Curl_async async; |
| 1159 |
#endif |
| 1160 |
|
| 1161 |
#if defined(USE_OPENSSL) |
| 1162 |
|
| 1163 |
void *engine; |
| 1164 |
|
| 1165 |
void *provider; |
| 1166 |
void *baseprov; |
| 1167 |
void *libctx; |
| 1168 |
char *propq; |
| 1169 |
|
| 1170 |
BIT(provider_loaded); |
| 1171 |
#endif |
| 1172 |
struct curltime expiretime; |
| 1173 |
struct Curl_tree timenode; |
| 1174 |
struct Curl_llist timeoutlist; |
| 1175 |
struct time_node expires[EXPIRE_LAST]; |
| 1176 |
|
| 1177 |
|
| 1178 |
char *most_recent_ftp_entrypath; |
| 1179 |
char *range; |
| 1180 |
|
| 1181 |
curl_off_t resume_from; |
| 1182 |
|
| 1183 |
#ifndef CURL_DISABLE_RTSP |
| 1184 |
|
| 1185 |
long rtsp_next_client_CSeq; |
| 1186 |
long rtsp_next_server_CSeq; |
| 1187 |
long rtsp_CSeq_recv; |
| 1188 |
|
| 1189 |
unsigned char rtp_channel_mask[32]; |
| 1190 |
|
| 1191 |
#endif |
| 1192 |
|
| 1193 |
curl_off_t infilesize; |
| 1194 |
|
| 1195 |
#if defined(USE_HTTP2) || defined(USE_HTTP3) |
| 1196 |
struct Curl_data_priority priority; |
| 1197 |
#endif |
| 1198 |
|
| 1199 |
curl_read_callback fread_func; |
| 1200 |
void *in; |
| 1201 |
CURLU *uh; |
| 1202 |
struct urlpieces up; |
| 1203 |
char *url; |
| 1204 |
char *referer; |
| 1205 |
struct curl_slist *resolve; |
| 1206 |
|
| 1207 |
#ifndef CURL_DISABLE_HTTP |
| 1208 |
curl_mimepart *mimepost; |
| 1209 |
#ifndef CURL_DISABLE_FORM_API |
| 1210 |
curl_mimepart *formp; |
| 1211 |
|
| 1212 |
#endif |
| 1213 |
size_t trailers_bytes_sent; |
| 1214 |
struct dynbuf trailers_buf; |
| 1215 |
|
| 1216 |
struct Curl_llist httphdrs; |
| 1217 |
struct curl_header headerout[2]; |
| 1218 |
struct Curl_header_store *prevhead; |
| 1219 |
trailers_state trailers_state; |
| 1220 |
|
| 1221 |
#endif |
| 1222 |
#ifndef CURL_DISABLE_COOKIES |
| 1223 |
struct curl_slist *cookielist; |
| 1224 |
|
| 1225 |
#endif |
| 1226 |
|
| 1227 |
#ifndef CURL_DISABLE_VERBOSE_STRINGS |
| 1228 |
struct curl_trc_feat *feat; |
| 1229 |
#endif |
| 1230 |
|
| 1231 |
#ifndef CURL_DISABLE_NETRC |
| 1232 |
struct store_netrc netrc; |
| 1233 |
#endif |
| 1234 |
|
| 1235 |
|
| 1236 |
|
| 1237 |
struct dynamically_allocated_data { |
| 1238 |
char *uagent; |
| 1239 |
char *accept_encoding; |
| 1240 |
char *userpwd; |
| 1241 |
char *rangeline; |
| 1242 |
char *ref; |
| 1243 |
char *host; |
| 1244 |
#ifndef CURL_DISABLE_COOKIES |
| 1245 |
char *cookiehost; |
| 1246 |
#endif |
| 1247 |
#ifndef CURL_DISABLE_RTSP |
| 1248 |
char *rtsp_transport; |
| 1249 |
#endif |
| 1250 |
char *te; |
| 1251 |
|
| 1252 |
|
| 1253 |
char *user; |
| 1254 |
char *passwd; |
| 1255 |
#ifndef CURL_DISABLE_PROXY |
| 1256 |
char *proxyuserpwd; |
| 1257 |
char *proxyuser; |
| 1258 |
char *proxypasswd; |
| 1259 |
#endif |
| 1260 |
} aptr; |
| 1261 |
#ifndef CURL_DISABLE_HTTP |
| 1262 |
struct http_negotiation http_neg; |
| 1263 |
#endif |
| 1264 |
unsigned char httpreq; |
| 1265 |
|
| 1266 |
unsigned char select_bits; |
| 1267 |
|
| 1268 |
|
| 1269 |
unsigned int creds_from:2; |
| 1270 |
|
| 1271 |
|
| 1272 |
|
| 1273 |
|
| 1274 |
|
| 1275 |
BIT(multi_owned_by_easy); |
| 1276 |
|
| 1277 |
BIT(this_is_a_follow); |
| 1278 |
BIT(refused_stream); |
| 1279 |
BIT(errorbuf); |
| 1280 |
|
| 1281 |
|
| 1282 |
BIT(allow_port); |
| 1283 |
|
| 1284 |
BIT(authproblem); |
| 1285 |
|
| 1286 |
BIT(wildcardmatch); |
| 1287 |
BIT(disableexpect); |
| 1288 |
|
| 1289 |
BIT(use_range); |
| 1290 |
BIT(rangestringalloc); |
| 1291 |
BIT(done); |
| 1292 |
|
| 1293 |
|
| 1294 |
#ifndef CURL_DISABLE_COOKIES |
| 1295 |
BIT(cookie_engine); |
| 1296 |
#endif |
| 1297 |
BIT(prefer_ascii); |
| 1298 |
#ifdef CURL_LIST_ONLY_PROTOCOL |
| 1299 |
BIT(list_only); |
| 1300 |
#endif |
| 1301 |
BIT(url_alloc); |
| 1302 |
BIT(referer_alloc); |
| 1303 |
BIT(wildcard_resolve); |
| 1304 |
BIT(upload); |
| 1305 |
BIT(internal); |
| 1306 |
|
| 1307 |
|
| 1308 |
BIT(http_ignorecustom); |
| 1309 |
}; |
| 1310 |
|
| 1311 |
|
| 1312 |
|
| 1313 |
|
| 1314 |
|
| 1315 |
|
| 1316 |
|
| 1317 |
|
| 1318 |
|
| 1319 |
|
| 1320 |
struct Curl_multi; |
| 1321 |
|
| 1322 |
enum dupstring { |
| 1323 |
STRING_CERT, |
| 1324 |
STRING_CERT_TYPE, |
| 1325 |
STRING_KEY, |
| 1326 |
STRING_KEY_PASSWD, |
| 1327 |
STRING_KEY_TYPE, |
| 1328 |
STRING_SSL_CAPATH, |
| 1329 |
STRING_SSL_CAFILE, |
| 1330 |
STRING_SSL_PINNEDPUBLICKEY, |
| 1331 |
STRING_SSL_CIPHER_LIST, |
| 1332 |
STRING_SSL_CIPHER13_LIST, |
| 1333 |
STRING_SSL_CRLFILE, |
| 1334 |
STRING_SSL_ISSUERCERT, |
| 1335 |
STRING_SERVICE_NAME, |
| 1336 |
#ifndef CURL_DISABLE_PROXY |
| 1337 |
STRING_CERT_PROXY, |
| 1338 |
STRING_CERT_TYPE_PROXY, |
| 1339 |
STRING_KEY_PROXY, |
| 1340 |
STRING_KEY_PASSWD_PROXY, |
| 1341 |
STRING_KEY_TYPE_PROXY, |
| 1342 |
STRING_SSL_CAPATH_PROXY, |
| 1343 |
STRING_SSL_CAFILE_PROXY, |
| 1344 |
STRING_SSL_PINNEDPUBLICKEY_PROXY, |
| 1345 |
STRING_SSL_CIPHER_LIST_PROXY, |
| 1346 |
STRING_SSL_CIPHER13_LIST_PROXY, |
| 1347 |
STRING_SSL_CRLFILE_PROXY, |
| 1348 |
STRING_SSL_ISSUERCERT_PROXY, |
| 1349 |
STRING_PROXY_SERVICE_NAME, |
| 1350 |
#endif |
| 1351 |
#ifndef CURL_DISABLE_COOKIES |
| 1352 |
STRING_COOKIE, |
| 1353 |
STRING_COOKIEJAR, |
| 1354 |
#endif |
| 1355 |
STRING_CUSTOMREQUEST, |
| 1356 |
STRING_DEFAULT_PROTOCOL, |
| 1357 |
STRING_DEVICE, |
| 1358 |
STRING_INTERFACE, |
| 1359 |
STRING_BINDHOST, |
| 1360 |
STRING_ENCODING, |
| 1361 |
#ifndef CURL_DISABLE_FTP |
| 1362 |
STRING_FTP_ACCOUNT, |
| 1363 |
STRING_FTP_ALTERNATIVE_TO_USER, |
| 1364 |
STRING_FTPPORT, |
| 1365 |
#endif |
| 1366 |
#if defined(HAVE_GSSAPI) |
| 1367 |
STRING_KRB_LEVEL, |
| 1368 |
#endif |
| 1369 |
#ifndef CURL_DISABLE_NETRC |
| 1370 |
STRING_NETRC_FILE, |
| 1371 |
|
| 1372 |
#endif |
| 1373 |
#ifndef CURL_DISABLE_PROXY |
| 1374 |
STRING_PROXY, |
| 1375 |
STRING_PRE_PROXY, |
| 1376 |
#endif |
| 1377 |
STRING_SET_RANGE, |
| 1378 |
STRING_SET_REFERER, |
| 1379 |
STRING_SET_URL, |
| 1380 |
STRING_USERAGENT, |
| 1381 |
STRING_SSL_ENGINE, |
| 1382 |
STRING_USERNAME, |
| 1383 |
STRING_PASSWORD, |
| 1384 |
STRING_OPTIONS, |
| 1385 |
#ifndef CURL_DISABLE_PROXY |
| 1386 |
STRING_PROXYUSERNAME, |
| 1387 |
STRING_PROXYPASSWORD, |
| 1388 |
STRING_NOPROXY, |
| 1389 |
|
| 1390 |
#endif |
| 1391 |
#ifndef CURL_DISABLE_RTSP |
| 1392 |
STRING_RTSP_SESSION_ID, |
| 1393 |
STRING_RTSP_STREAM_URI, |
| 1394 |
STRING_RTSP_TRANSPORT, |
| 1395 |
#endif |
| 1396 |
#ifdef USE_SSH |
| 1397 |
STRING_SSH_PRIVATE_KEY, |
| 1398 |
STRING_SSH_PUBLIC_KEY, |
| 1399 |
STRING_SSH_HOST_PUBLIC_KEY_MD5, |
| 1400 |
STRING_SSH_HOST_PUBLIC_KEY_SHA256, |
| 1401 |
STRING_SSH_KNOWNHOSTS, |
| 1402 |
#endif |
| 1403 |
#ifndef CURL_DISABLE_SMTP |
| 1404 |
STRING_MAIL_FROM, |
| 1405 |
STRING_MAIL_AUTH, |
| 1406 |
#endif |
| 1407 |
#ifdef USE_TLS_SRP |
| 1408 |
STRING_TLSAUTH_USERNAME, |
| 1409 |
STRING_TLSAUTH_PASSWORD, |
| 1410 |
#ifndef CURL_DISABLE_PROXY |
| 1411 |
STRING_TLSAUTH_USERNAME_PROXY, |
| 1412 |
STRING_TLSAUTH_PASSWORD_PROXY, |
| 1413 |
#endif |
| 1414 |
#endif |
| 1415 |
STRING_BEARER, |
| 1416 |
#ifdef USE_UNIX_SOCKETS |
| 1417 |
STRING_UNIX_SOCKET_PATH, |
| 1418 |
#endif |
| 1419 |
STRING_TARGET, |
| 1420 |
#ifndef CURL_DISABLE_DOH |
| 1421 |
STRING_DOH, |
| 1422 |
#endif |
| 1423 |
#ifndef CURL_DISABLE_ALTSVC |
| 1424 |
STRING_ALTSVC, |
| 1425 |
#endif |
| 1426 |
#ifndef CURL_DISABLE_HSTS |
| 1427 |
STRING_HSTS, |
| 1428 |
#endif |
| 1429 |
STRING_SASL_AUTHZID, |
| 1430 |
#ifdef USE_ARES |
| 1431 |
STRING_DNS_SERVERS, |
| 1432 |
STRING_DNS_INTERFACE, |
| 1433 |
STRING_DNS_LOCAL_IP4, |
| 1434 |
STRING_DNS_LOCAL_IP6, |
| 1435 |
#endif |
| 1436 |
STRING_SSL_EC_CURVES, |
| 1437 |
#ifndef CURL_DISABLE_AWS |
| 1438 |
STRING_AWS_SIGV4, |
| 1439 |
#endif |
| 1440 |
#ifndef CURL_DISABLE_PROXY |
| 1441 |
STRING_HAPROXY_CLIENT_IP, |
| 1442 |
#endif |
| 1443 |
STRING_ECH_CONFIG, |
| 1444 |
STRING_ECH_PUBLIC, |
| 1445 |
STRING_SSL_SIGNATURE_ALGORITHMS, |
| 1446 |
|
| 1447 |
|
| 1448 |
|
| 1449 |
STRING_LASTZEROTERMINATED, |
| 1450 |
|
| 1451 |
|
| 1452 |
|
| 1453 |
STRING_COPYPOSTFIELDS, |
| 1454 |
|
| 1455 |
STRING_LAST |
| 1456 |
}; |
| 1457 |
|
| 1458 |
enum dupblob { |
| 1459 |
BLOB_CERT, |
| 1460 |
BLOB_KEY, |
| 1461 |
BLOB_SSL_ISSUERCERT, |
| 1462 |
BLOB_CAINFO, |
| 1463 |
#ifndef CURL_DISABLE_PROXY |
| 1464 |
BLOB_CERT_PROXY, |
| 1465 |
BLOB_KEY_PROXY, |
| 1466 |
BLOB_SSL_ISSUERCERT_PROXY, |
| 1467 |
BLOB_CAINFO_PROXY, |
| 1468 |
#endif |
| 1469 |
BLOB_LAST |
| 1470 |
}; |
| 1471 |
|
| 1472 |
|
| 1473 |
struct UserDefined { |
| 1474 |
FILE *err; |
| 1475 |
void *debugdata; |
| 1476 |
char *errorbuffer; |
| 1477 |
void *out; |
| 1478 |
void *in_set; |
| 1479 |
void *writeheader; |
| 1480 |
unsigned long httpauth; |
| 1481 |
unsigned long proxyauth; |
| 1482 |
long maxredirs; |
| 1483 |
|
| 1484 |
void *postfields; |
| 1485 |
curl_seek_callback seek_func; |
| 1486 |
curl_off_t postfieldsize; |
| 1487 |
|
| 1488 |
|
| 1489 |
curl_write_callback fwrite_func; |
| 1490 |
curl_write_callback fwrite_header; |
| 1491 |
curl_write_callback fwrite_rtp; |
| 1492 |
curl_read_callback fread_func_set; |
| 1493 |
curl_progress_callback fprogress; |
| 1494 |
curl_xferinfo_callback fxferinfo; |
| 1495 |
curl_debug_callback fdebug; |
| 1496 |
curl_ioctl_callback ioctl_func; |
| 1497 |
curl_sockopt_callback fsockopt; |
| 1498 |
void *sockopt_client; |
| 1499 |
curl_opensocket_callback fopensocket; |
| 1500 |
|
| 1501 |
|
| 1502 |
void *opensocket_client; |
| 1503 |
curl_closesocket_callback fclosesocket; |
| 1504 |
|
| 1505 |
void *closesocket_client; |
| 1506 |
curl_prereq_callback fprereq; |
| 1507 |
void *prereq_userp; |
| 1508 |
|
| 1509 |
void *seek_client; |
| 1510 |
#ifndef CURL_DISABLE_HSTS |
| 1511 |
curl_hstsread_callback hsts_read; |
| 1512 |
void *hsts_read_userp; |
| 1513 |
curl_hstswrite_callback hsts_write; |
| 1514 |
void *hsts_write_userp; |
| 1515 |
#endif |
| 1516 |
void *progress_client; |
| 1517 |
void *ioctl_client; |
| 1518 |
long maxage_conn; |
| 1519 |
|
| 1520 |
long maxlifetime_conn; |
| 1521 |
|
| 1522 |
#ifndef CURL_DISABLE_TFTP |
| 1523 |
long tftp_blksize; |
| 1524 |
#endif |
| 1525 |
curl_off_t filesize; |
| 1526 |
long low_speed_limit; |
| 1527 |
long low_speed_time; |
| 1528 |
curl_off_t max_send_speed; |
| 1529 |
curl_off_t max_recv_speed; |
| 1530 |
|
| 1531 |
curl_off_t set_resume_from; |
| 1532 |
struct curl_slist *headers; |
| 1533 |
struct curl_httppost *httppost; |
| 1534 |
#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API) |
| 1535 |
curl_mimepart mimepost; |
| 1536 |
#endif |
| 1537 |
#ifndef CURL_DISABLE_TELNET |
| 1538 |
struct curl_slist *telnet_options; |
| 1539 |
#endif |
| 1540 |
struct curl_slist *resolve; |
| 1541 |
|
| 1542 |
struct curl_slist *connect_to; |
| 1543 |
|
| 1544 |
time_t timevalue; |
| 1545 |
struct ssl_config_data ssl; |
| 1546 |
#ifndef CURL_DISABLE_PROXY |
| 1547 |
struct ssl_config_data proxy_ssl; |
| 1548 |
struct curl_slist *proxyheaders; |
| 1549 |
unsigned short proxyport; |
| 1550 |
|
| 1551 |
|
| 1552 |
unsigned char proxytype; |
| 1553 |
unsigned char socks5auth; |
| 1554 |
#endif |
| 1555 |
struct ssl_general_config general_ssl; |
| 1556 |
int dns_cache_timeout; |
| 1557 |
unsigned int buffer_size; |
| 1558 |
unsigned int upload_buffer_size; |
| 1559 |
|
| 1560 |
void *private_data; |
| 1561 |
#ifndef CURL_DISABLE_HTTP |
| 1562 |
struct curl_slist *http200aliases; |
| 1563 |
#endif |
| 1564 |
curl_off_t max_filesize; |
| 1565 |
#ifndef CURL_DISABLE_FTP |
| 1566 |
unsigned int accepttimeout; |
| 1567 |
unsigned char ftp_filemethod; |
| 1568 |
unsigned char ftpsslauth; |
| 1569 |
unsigned char ftp_ccc; |
| 1570 |
#endif |
| 1571 |
#if !defined(CURL_DISABLE_FTP) || defined(USE_SSH) |
| 1572 |
struct curl_slist *quote; |
| 1573 |
struct curl_slist *postquote; |
| 1574 |
struct curl_slist *prequote; |
| 1575 |
#endif |
| 1576 |
#ifdef USE_LIBSSH2 |
| 1577 |
curl_sshhostkeycallback ssh_hostkeyfunc; |
| 1578 |
void *ssh_hostkeyfunc_userp; |
| 1579 |
#endif |
| 1580 |
#ifdef USE_SSH |
| 1581 |
curl_sshkeycallback ssh_keyfunc; |
| 1582 |
void *ssh_keyfunc_userp; |
| 1583 |
int ssh_auth_types; |
| 1584 |
unsigned int new_directory_perms; |
| 1585 |
#endif |
| 1586 |
unsigned int new_file_perms; |
| 1587 |
char *str[STRING_LAST]; |
| 1588 |
struct curl_blob *blobs[BLOB_LAST]; |
| 1589 |
#ifdef USE_IPV6 |
| 1590 |
unsigned int scope_id; |
| 1591 |
#endif |
| 1592 |
curl_prot_t allowed_protocols; |
| 1593 |
curl_prot_t redir_protocols; |
| 1594 |
#ifndef CURL_DISABLE_RTSP |
| 1595 |
void *rtp_out; |
| 1596 |
|
| 1597 |
Curl_RtspReq rtspreq; |
| 1598 |
#endif |
| 1599 |
#ifndef CURL_DISABLE_FTP |
| 1600 |
curl_chunk_bgn_callback chunk_bgn; |
| 1601 |
|
| 1602 |
curl_chunk_end_callback chunk_end; |
| 1603 |
|
| 1604 |
curl_fnmatch_callback fnmatch; |
| 1605 |
|
| 1606 |
void *fnmatch_data; |
| 1607 |
void *wildcardptr; |
| 1608 |
#endif |
| 1609 |
|
| 1610 |
unsigned int timeout; |
| 1611 |
unsigned int connecttimeout; |
| 1612 |
unsigned int happy_eyeballs_timeout; |
| 1613 |
unsigned int server_response_timeout; |
| 1614 |
unsigned int shutdowntimeout; |
| 1615 |
int tcp_keepidle; |
| 1616 |
int tcp_keepintvl; |
| 1617 |
int tcp_keepcnt; |
| 1618 |
|
| 1619 |
long expect_100_timeout; |
| 1620 |
#if defined(USE_HTTP2) || defined(USE_HTTP3) |
| 1621 |
struct Curl_data_priority priority; |
| 1622 |
#endif |
| 1623 |
curl_resolver_start_callback resolver_start; |
| 1624 |
|
| 1625 |
void *resolver_start_client; |
| 1626 |
long upkeep_interval_ms; |
| 1627 |
CURLU *uh; |
| 1628 |
#ifndef CURL_DISABLE_HTTP |
| 1629 |
void *trailer_data; |
| 1630 |
curl_trailer_callback trailer_callback; |
| 1631 |
#endif |
| 1632 |
#ifndef CURL_DISABLE_SMTP |
| 1633 |
struct curl_slist *mail_rcpt; |
| 1634 |
#endif |
| 1635 |
unsigned int maxconnects; |
| 1636 |
#ifdef USE_ECH |
| 1637 |
int tls_ech; |
| 1638 |
#endif |
| 1639 |
unsigned short use_port; |
| 1640 |
#ifndef CURL_DISABLE_BINDLOCAL |
| 1641 |
unsigned short localport; |
| 1642 |
unsigned short localportrange; |
| 1643 |
|
| 1644 |
|
| 1645 |
#endif |
| 1646 |
#ifndef CURL_DISABLE_NETRC |
| 1647 |
unsigned char use_netrc; |
| 1648 |
#endif |
| 1649 |
#if !defined(CURL_DISABLE_FTP) || defined(USE_SSH) |
| 1650 |
|
| 1651 |
|
| 1652 |
|
| 1653 |
|
| 1654 |
unsigned char ftp_create_missing_dirs; |
| 1655 |
#endif |
| 1656 |
unsigned char use_ssl; |
| 1657 |
|
| 1658 |
char keep_post; |
| 1659 |
|
| 1660 |
unsigned char timecondition; |
| 1661 |
unsigned char method; |
| 1662 |
unsigned char httpwant; |
| 1663 |
|
| 1664 |
unsigned char ipver; |
| 1665 |
|
| 1666 |
unsigned char upload_flags; |
| 1667 |
#ifdef HAVE_GSSAPI |
| 1668 |
|
| 1669 |
|
| 1670 |
unsigned char gssapi_delegation; |
| 1671 |
#endif |
| 1672 |
unsigned char http_follow_mode; |
| 1673 |
BIT(connect_only); |
| 1674 |
|
| 1675 |
BIT(connect_only_ws); |
| 1676 |
#ifndef CURL_DISABLE_SMTP |
| 1677 |
BIT(mail_rcpt_allowfails); |
| 1678 |
|
| 1679 |
#endif |
| 1680 |
#ifndef CURL_DISABLE_MIME |
| 1681 |
BIT(mime_formescape); |
| 1682 |
#endif |
| 1683 |
BIT(is_fread_set); |
| 1684 |
#ifndef CURL_DISABLE_TFTP |
| 1685 |
BIT(tftp_no_options); |
| 1686 |
#endif |
| 1687 |
BIT(sep_headers); |
| 1688 |
#ifndef CURL_DISABLE_COOKIES |
| 1689 |
BIT(cookiesession); |
| 1690 |
#endif |
| 1691 |
BIT(crlf); |
| 1692 |
#ifdef USE_SSH |
| 1693 |
BIT(ssh_compression); |
| 1694 |
#endif |
| 1695 |
|
| 1696 |
|
| 1697 |
|
| 1698 |
|
| 1699 |
BIT(quick_exit); |
| 1700 |
|
| 1701 |
|
| 1702 |
|
| 1703 |
BIT(get_filetime); |
| 1704 |
#ifndef CURL_DISABLE_PROXY |
| 1705 |
BIT(tunnel_thru_httpproxy); |
| 1706 |
#endif |
| 1707 |
BIT(prefer_ascii); |
| 1708 |
BIT(remote_append); |
| 1709 |
#ifdef CURL_LIST_ONLY_PROTOCOL |
| 1710 |
BIT(list_only); |
| 1711 |
#endif |
| 1712 |
#ifndef CURL_DISABLE_FTP |
| 1713 |
BIT(ftp_use_port); |
| 1714 |
BIT(ftp_use_epsv); |
| 1715 |
BIT(ftp_use_eprt); |
| 1716 |
BIT(ftp_use_pret); |
| 1717 |
BIT(ftp_skip_ip); |
| 1718 |
|
| 1719 |
BIT(wildcard_enabled); |
| 1720 |
#endif |
| 1721 |
BIT(http_fail_on_error); |
| 1722 |
BIT(http_keep_sending_on_error); |
| 1723 |
BIT(http_transfer_encoding); |
| 1724 |
BIT(allow_auth_to_other_hosts); |
| 1725 |
BIT(include_header); |
| 1726 |
BIT(http_set_referer); |
| 1727 |
BIT(http_auto_referer); |
| 1728 |
|
| 1729 |
BIT(opt_no_body); |
| 1730 |
BIT(verbose); |
| 1731 |
#if defined(HAVE_GSSAPI) |
| 1732 |
BIT(krb); |
| 1733 |
#endif |
| 1734 |
BIT(reuse_forbid); |
| 1735 |
BIT(reuse_fresh); |
| 1736 |
BIT(no_signal); |
| 1737 |
BIT(tcp_nodelay); |
| 1738 |
BIT(ignorecl); |
| 1739 |
BIT(http_te_skip); |
| 1740 |
|
| 1741 |
BIT(http_ce_skip); |
| 1742 |
|
| 1743 |
BIT(proxy_transfer_mode); |
| 1744 |
|
| 1745 |
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) |
| 1746 |
BIT(socks5_gssapi_nec); |
| 1747 |
#endif |
| 1748 |
BIT(sasl_ir); |
| 1749 |
BIT(tcp_keepalive); |
| 1750 |
BIT(tcp_fastopen); |
| 1751 |
BIT(ssl_enable_alpn); |
| 1752 |
BIT(path_as_is); |
| 1753 |
BIT(pipewait); |
| 1754 |
|
| 1755 |
BIT(suppress_connect_headers); |
| 1756 |
|
| 1757 |
BIT(dns_shuffle_addresses); |
| 1758 |
#ifndef CURL_DISABLE_PROXY |
| 1759 |
BIT(haproxyprotocol); |
| 1760 |
|
| 1761 |
#endif |
| 1762 |
#ifdef USE_UNIX_SOCKETS |
| 1763 |
BIT(abstract_unix_socket); |
| 1764 |
#endif |
| 1765 |
BIT(disallow_username_in_url); |
| 1766 |
#ifndef CURL_DISABLE_DOH |
| 1767 |
BIT(doh); |
| 1768 |
BIT(doh_verifypeer); |
| 1769 |
BIT(doh_verifyhost); |
| 1770 |
BIT(doh_verifystatus); |
| 1771 |
#endif |
| 1772 |
BIT(http09_allowed); |
| 1773 |
#ifndef CURL_DISABLE_WEBSOCKETS |
| 1774 |
BIT(ws_raw_mode); |
| 1775 |
BIT(ws_no_auto_pong); |
| 1776 |
#endif |
| 1777 |
}; |
| 1778 |
|
| 1779 |
#ifndef CURL_DISABLE_MIME |
| 1780 |
#define IS_MIME_POST(a) ((a)->set.mimepost.kind != MIMEKIND_NONE) |
| 1781 |
#else |
| 1782 |
#define IS_MIME_POST(a) FALSE |
| 1783 |
#endif |
| 1784 |
|
| 1785 |
|
| 1786 |
|
| 1787 |
typedef void multi_sub_xfer_done_cb(struct Curl_easy *master_easy, |
| 1788 |
struct Curl_easy *sub_easy, |
| 1789 |
CURLcode result); |
| 1790 |
|
| 1791 |
|
| 1792 |
|
| 1793 |
|
| 1794 |
|
| 1795 |
|
| 1796 |
|
| 1797 |
|
| 1798 |
|
| 1799 |
|
| 1800 |
|
| 1801 |
struct Curl_easy { |
| 1802 |
|
| 1803 |
|
| 1804 |
unsigned int magic; |
| 1805 |
|
| 1806 |
|
| 1807 |
|
| 1808 |
|
| 1809 |
|
| 1810 |
|
| 1811 |
curl_off_t id; |
| 1812 |
|
| 1813 |
|
| 1814 |
|
| 1815 |
unsigned int mid; |
| 1816 |
unsigned int master_mid; |
| 1817 |
multi_sub_xfer_done_cb *sub_xfer_done; |
| 1818 |
|
| 1819 |
struct connectdata *conn; |
| 1820 |
|
| 1821 |
CURLMstate mstate; |
| 1822 |
CURLcode result; |
| 1823 |
|
| 1824 |
struct Curl_message msg; |
| 1825 |
|
| 1826 |
struct Curl_multi *multi; |
| 1827 |
|
| 1828 |
|
| 1829 |
struct Curl_multi *multi_easy; |
| 1830 |
|
| 1831 |
|
| 1832 |
struct Curl_share *share; |
| 1833 |
|
| 1834 |
|
| 1835 |
|
| 1836 |
|
| 1837 |
|
| 1838 |
struct Curl_hash meta_hash; |
| 1839 |
|
| 1840 |
#ifdef USE_LIBPSL |
| 1841 |
struct PslCache *psl; |
| 1842 |
#endif |
| 1843 |
struct SingleRequest req; |
| 1844 |
struct UserDefined set; |
| 1845 |
#ifndef CURL_DISABLE_COOKIES |
| 1846 |
struct CookieInfo *cookies; |
| 1847 |
|
| 1848 |
|
| 1849 |
|
| 1850 |
#endif |
| 1851 |
#ifndef CURL_DISABLE_HSTS |
| 1852 |
struct hsts *hsts; |
| 1853 |
#endif |
| 1854 |
#ifndef CURL_DISABLE_ALTSVC |
| 1855 |
struct altsvcinfo *asi; |
| 1856 |
#endif |
| 1857 |
struct Progress progress; |
| 1858 |
struct UrlState state; |
| 1859 |
|
| 1860 |
#ifndef CURL_DISABLE_FTP |
| 1861 |
struct WildcardData *wildcard; |
| 1862 |
#endif |
| 1863 |
struct PureInfo info; |
| 1864 |
struct curl_tlssessioninfo tsi; |
| 1865 |
|
| 1866 |
}; |
| 1867 |
|
| 1868 |
#define LIBCURL_NAME "libcurl" |
| 1869 |
|
| 1870 |
#endif |