urldata.h
Go to the documentation of this file.
1 #ifndef HEADER_CURL_URLDATA_H
2 #define HEADER_CURL_URLDATA_H
3 /***************************************************************************
4  * _ _ ____ _
5  * Project ___| | | | _ \| |
6  * / __| | | | |_) | |
7  * | (__| |_| | _ <| |___
8  * \___|\___/|_| \_\_____|
9  *
10  * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
11  *
12  * This software is licensed as described in the file COPYING, which
13  * you should have received as part of this distribution. The terms
14  * are also available at https://curl.haxx.se/docs/copyright.html.
15  *
16  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17  * copies of the Software, and permit persons to whom the Software is
18  * furnished to do so, under the terms of the COPYING file.
19  *
20  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21  * KIND, either express or implied.
22  *
23  ***************************************************************************/
24 
25 /* This file is for lib internal stuff */
26 
27 #include "curl_setup.h"
28 
29 #define PORT_FTP 21
30 #define PORT_FTPS 990
31 #define PORT_TELNET 23
32 #define PORT_HTTP 80
33 #define PORT_HTTPS 443
34 #define PORT_DICT 2628
35 #define PORT_LDAP 389
36 #define PORT_LDAPS 636
37 #define PORT_TFTP 69
38 #define PORT_SSH 22
39 #define PORT_IMAP 143
40 #define PORT_IMAPS 993
41 #define PORT_POP3 110
42 #define PORT_POP3S 995
43 #define PORT_SMB 445
44 #define PORT_SMBS 445
45 #define PORT_SMTP 25
46 #define PORT_SMTPS 465 /* sometimes called SSMTP */
47 #define PORT_RTSP 554
48 #define PORT_RTMP 1935
49 #define PORT_RTMPT PORT_HTTP
50 #define PORT_RTMPS PORT_HTTPS
51 #define PORT_GOPHER 70
52 
53 #define DICT_MATCH "/MATCH:"
54 #define DICT_MATCH2 "/M:"
55 #define DICT_MATCH3 "/FIND:"
56 #define DICT_DEFINE "/DEFINE:"
57 #define DICT_DEFINE2 "/D:"
58 #define DICT_DEFINE3 "/LOOKUP:"
59 
60 #define CURL_DEFAULT_USER "anonymous"
61 #define CURL_DEFAULT_PASSWORD "ftp@example.com"
62 
63 /* Convenience defines for checking protocols or their SSL based version. Each
64  protocol handler should only ever have a single CURLPROTO_ in its protocol
65  field. */
66 #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP|CURLPROTO_HTTPS)
67 #define PROTO_FAMILY_FTP (CURLPROTO_FTP|CURLPROTO_FTPS)
68 #define PROTO_FAMILY_POP3 (CURLPROTO_POP3|CURLPROTO_POP3S)
69 #define PROTO_FAMILY_SMB (CURLPROTO_SMB|CURLPROTO_SMBS)
70 #define PROTO_FAMILY_SMTP (CURLPROTO_SMTP|CURLPROTO_SMTPS)
71 
72 #define DEFAULT_CONNCACHE_SIZE 5
73 
74 /* length of longest IPv6 address string including the trailing null */
75 #define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
76 
77 /* Default FTP/IMAP etc response timeout in milliseconds.
78  Symbian OS panics when given a timeout much greater than 1/2 hour.
79 */
80 #define RESP_TIMEOUT (1800*1000)
81 
82 #include "cookie.h"
83 #include "formdata.h"
84 
85 #ifdef HAVE_NETINET_IN_H
86 #include <netinet/in.h>
87 #endif
88 
89 #include "timeval.h"
90 
91 #ifdef HAVE_ZLIB_H
92 #include <zlib.h> /* for content-encoding */
93 #ifdef __SYMBIAN32__
94 /* zlib pollutes the namespace with this definition */
95 #undef WIN32
96 #endif
97 #endif
98 
99 #include <curl/curl.h>
100 
101 #include "http_chunks.h" /* for the structs and enum stuff */
102 #include "hostip.h"
103 #include "hash.h"
104 #include "splay.h"
105 
106 #include "mime.h"
107 #include "imap.h"
108 #include "pop3.h"
109 #include "smtp.h"
110 #include "ftp.h"
111 #include "file.h"
112 #include "ssh.h"
113 #include "http.h"
114 #include "rtsp.h"
115 #include "smb.h"
116 #include "wildcard.h"
117 #include "multihandle.h"
118 
119 #ifdef HAVE_GSSAPI
120 # ifdef HAVE_GSSGNU
121 # include <gss.h>
122 # elif defined HAVE_GSSMIT
123 # include <gssapi/gssapi.h>
124 # include <gssapi/gssapi_generic.h>
125 # else
126 # include <gssapi.h>
127 # endif
128 #endif
129 
130 #ifdef HAVE_LIBSSH2_H
131 #include <libssh2.h>
132 #include <libssh2_sftp.h>
133 #endif /* HAVE_LIBSSH2_H */
134 
135 /* The upload buffer size, should not be smaller than CURL_MAX_WRITE_SIZE, as
136  it needs to hold a full buffer as could be sent in a write callback */
137 #define UPLOAD_BUFSIZE CURL_MAX_WRITE_SIZE
138 
139 /* The "master buffer" is for HTTP pipelining */
140 #define MASTERBUF_SIZE 16384
141 
142 /* Initial size of the buffer to store headers in, it'll be enlarged in case
143  of need. */
144 #define HEADERSIZE 256
145 
146 #define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
147 #define GOOD_EASY_HANDLE(x) \
148  ((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER))
149 
150 /* Some convenience macros to get the larger/smaller value out of two given.
151  We prefix with CURL to prevent name collisions. */
152 #define CURLMAX(x,y) ((x)>(y)?(x):(y))
153 #define CURLMIN(x,y) ((x)<(y)?(x):(y))
154 
155 #ifdef HAVE_GSSAPI
156 /* Types needed for krb5-ftp connections */
157 struct krb5buffer {
158  void *data;
159  size_t size;
160  size_t index;
161  int eof_flag;
162 };
163 
164 enum protection_level {
165  PROT_NONE, /* first in list */
166  PROT_CLEAR,
167  PROT_SAFE,
168  PROT_CONFIDENTIAL,
169  PROT_PRIVATE,
170  PROT_CMD,
171  PROT_LAST /* last in list */
172 };
173 #endif
174 
175 /* enum for the nonblocking SSL connection state machine */
176 typedef enum {
184 
185 typedef enum {
190 
191 /* SSL backend-specific data; declared differently by each SSL backend */
192 struct ssl_backend_data;
193 
194 /* struct for data related to each SSL connection */
196  /* Use ssl encrypted communications TRUE/FALSE, not necessarily using it atm
197  but at least asked to or meaning to use it. See 'state' for the exact
198  current state of the connection. */
199  bool use;
202 #if defined(USE_SSL)
203  struct ssl_backend_data *backend;
204 #endif
205 };
206 
208  long version; /* what version the client wants to use */
209  long version_max; /* max supported version the client wants to use*/
210  bool verifypeer; /* set TRUE if this is desired */
211  bool verifyhost; /* set TRUE if CN/SAN must match hostname */
212  bool verifystatus; /* set TRUE if certificate status must be checked */
213  bool sessionid; /* cache session IDs or not */
214  char *CApath; /* certificate dir (doesn't work on windows) */
215  char *CAfile; /* certificate to verify peer against */
216  char *clientcert;
217  char *random_file; /* path to file containing "random" data */
218  char *egdsocket; /* path to file containing the EGD daemon socket */
219  char *cipher_list; /* list of ciphers to use */
220 };
221 
223  struct ssl_primary_config primary;
224  bool enable_beast; /* especially allow this flaw for interoperability's
225  sake*/
226  bool no_revoke; /* disable SSL certificate revocation checks */
227  long certverifyresult; /* result from the certificate verification */
228  char *CRLfile; /* CRL to check certificate revocation */
229  char *issuercert;/* optional issuer certificate filename */
230  curl_ssl_ctx_callback fsslctx; /* function to initialize ssl ctx */
231  void *fsslctxp; /* parameter for call back */
232  bool certinfo; /* gather lots of certificate info */
234 
235  char *cert; /* client certificate file name */
236  char *cert_type; /* format for certificate (default: PEM)*/
237  char *key; /* private key file name */
238  char *key_type; /* format for private key (default: PEM) */
239  char *key_passwd; /* plain text private key password */
240 
241 #ifdef USE_TLS_SRP
242  char *username; /* TLS username (for, e.g., SRP) */
243  char *password; /* TLS password (for, e.g., SRP) */
244  enum CURL_TLSAUTH authtype; /* TLS authentication type (default SRP) */
245 #endif
246 };
247 
249  size_t max_ssl_sessions; /* SSL session id cache size */
250 };
251 
252 /* information stored about one single SSL session */
254  char *name; /* host name for which this ID was used */
255  char *conn_to_host; /* host name for the connection (may be NULL) */
256  const char *scheme; /* protocol scheme used */
257  void *sessionid; /* as returned from the SSL layer */
258  size_t idsize; /* if known, otherwise 0 */
259  long age; /* just a number, the higher the more recent */
260  int remote_port; /* remote port */
261  int conn_to_port; /* remote port for the connection (may be -1) */
262  struct ssl_primary_config ssl_config; /* setup for this session */
263 };
264 
265 #ifdef USE_WINDOWS_SSPI
266 #include "curl_sspi.h"
267 #endif
268 
269 /* Struct used for Digest challenge-response authentication */
270 struct digestdata {
271 #if defined(USE_WINDOWS_SSPI)
272  BYTE *input_token;
273  size_t input_token_len;
274  CtxtHandle *http_context;
275  /* copy of user/passwd used to make the identity for http_context.
276  either may be NULL. */
277  char *user;
278  char *passwd;
279 #else
280  char *nonce;
281  char *cnonce;
282  char *realm;
283  int algo;
284  bool stale; /* set true for re-negotiation */
285  char *opaque;
286  char *qop;
287  char *algorithm;
288  int nc; /* nounce count */
289 #endif
290 };
291 
292 typedef enum {
298 } curlntlm;
299 
300 #if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
301 #include <iconv.h>
302 #endif
303 
304 /* Struct used for GSSAPI (Kerberos V5) authentication */
305 #if defined(USE_KERBEROS5)
306 struct kerberos5data {
307 #if defined(USE_WINDOWS_SSPI)
308  CredHandle *credentials;
309  CtxtHandle *context;
310  TCHAR *spn;
311  SEC_WINNT_AUTH_IDENTITY identity;
312  SEC_WINNT_AUTH_IDENTITY *p_identity;
313  size_t token_max;
314  BYTE *output_token;
315 #else
316  gss_ctx_id_t context;
317  gss_name_t spn;
318 #endif
319 };
320 #endif
321 
322 /* Struct used for NTLM challenge-response authentication */
323 #if defined(USE_NTLM)
324 struct ntlmdata {
325  curlntlm state;
326 #ifdef USE_WINDOWS_SSPI
327  CredHandle *credentials;
328  CtxtHandle *context;
329  SEC_WINNT_AUTH_IDENTITY identity;
330  SEC_WINNT_AUTH_IDENTITY *p_identity;
331  size_t token_max;
332  BYTE *output_token;
333  BYTE *input_token;
334  size_t input_token_len;
335 #else
336  unsigned int flags;
337  unsigned char nonce[8];
338  void *target_info; /* TargetInfo received in the ntlm type-2 message */
339  unsigned int target_info_len;
340 #endif
341 };
342 #endif
343 
344 #ifdef USE_SPNEGO
345 struct negotiatedata {
346  /* When doing Negotiate (SPNEGO) auth, we first need to send a token
347  and then validate the received one. */
348  enum { GSS_AUTHNONE, GSS_AUTHRECV, GSS_AUTHSENT } state;
349 #ifdef HAVE_GSSAPI
350  OM_uint32 status;
351  gss_ctx_id_t context;
352  gss_name_t spn;
353  gss_buffer_desc output_token;
354 #else
355 #ifdef USE_WINDOWS_SSPI
356  DWORD status;
357  CredHandle *credentials;
358  CtxtHandle *context;
359  SEC_WINNT_AUTH_IDENTITY identity;
360  SEC_WINNT_AUTH_IDENTITY *p_identity;
361  TCHAR *spn;
362  size_t token_max;
363  BYTE *output_token;
364  size_t output_token_length;
365 #endif
366 #endif
367 };
368 #endif
369 
370 
371 /*
372  * Boolean values that concerns this connection.
373  */
374 struct ConnectBits {
375  /* always modify bits.close with the connclose() and connkeep() macros! */
376  bool close; /* if set, we close the connection after this request */
377  bool reuse; /* if set, this is a re-used connection */
378  bool conn_to_host; /* if set, this connection has a "connect to host"
379  that overrides the host in the URL */
380  bool conn_to_port; /* if set, this connection has a "connect to port"
381  that overrides the port in the URL (remote port) */
382  bool proxy; /* if set, this transfer is done through a proxy - any type */
383  bool httpproxy; /* if set, this transfer is done through a http proxy */
384  bool socksproxy; /* if set, this transfer is done through a socks proxy */
385  bool user_passwd; /* do we use user+password for this connection? */
386  bool proxy_user_passwd; /* user+password for the proxy? */
387  bool ipv6_ip; /* we communicate with a remote site specified with pure IPv6
388  IP address */
389  bool ipv6; /* we communicate with a site using an IPv6 address */
390 
391  bool do_more; /* this is set TRUE if the ->curl_do_more() function is
392  supposed to be called, after ->curl_do() */
393  bool tcpconnect[2]; /* the TCP layer (or similar) is connected, this is set
394  the first time on the first connect function call */
395  bool protoconnstart;/* the protocol layer has STARTED its operation after
396  the TCP layer connect */
397 
398  bool retry; /* this connection is about to get closed and then
399  re-attempted at another connection. */
400  bool tunnel_proxy; /* if CONNECT is used to "tunnel" through the proxy.
401  This is implicit when SSL-protocols are used through
402  proxies, but can also be enabled explicitly by
403  apps */
404  bool authneg; /* TRUE when the auth phase has started, which means
405  that we are creating a request with an auth header,
406  but it is not the final request in the auth
407  negotiation. */
408  bool rewindaftersend;/* TRUE when the sending couldn't be stopped even
409  though it will be discarded. When the whole send
410  operation is done, we must call the data rewind
411  callback. */
412  bool ftp_use_epsv; /* As set with CURLOPT_FTP_USE_EPSV, but if we find out
413  EPSV doesn't work we disable it for the forthcoming
414  requests */
415 
416  bool ftp_use_eprt; /* As set with CURLOPT_FTP_USE_EPRT, but if we find out
417  EPRT doesn't work we disable it for the forthcoming
418  requests */
419  bool ftp_use_data_ssl; /* Enabled SSL for the data connection */
420  bool netrc; /* name+password provided by netrc */
421  bool userpwd_in_url; /* name+password found in url */
422  bool stream_was_rewound; /* Indicates that the stream was rewound after a
423  request read past the end of its response byte
424  boundary */
425  bool proxy_connect_closed; /* set true if a proxy disconnected the
426  connection in a CONNECT request with auth, so
427  that libcurl should reconnect and continue. */
428  bool bound; /* set true if bind() has already been done on this socket/
429  connection */
430  bool type_set; /* type= was used in the URL */
431  bool multiplex; /* connection is multiplexed */
432 
433  bool tcp_fastopen; /* use TCP Fast Open */
434  bool tls_enable_npn; /* TLS NPN extension? */
435  bool tls_enable_alpn; /* TLS ALPN extension? */
436  bool proxy_ssl_connected[2]; /* TRUE when SSL initialization for HTTPS proxy
437  is complete */
438  bool socksproxy_connecting; /* connecting through a socks proxy */
439 };
440 
441 struct hostname {
442  char *rawalloc; /* allocated "raw" version of the name */
443  char *encalloc; /* allocated IDN-encoded version of the name */
444  char *name; /* name to use internally, might be encoded, might be raw */
445  const char *dispname; /* name to display, as 'name' might be encoded */
446 };
447 
448 /*
449  * Flags on the keepon member of the Curl_transfer_keeper
450  */
451 
452 #define KEEP_NONE 0
453 #define KEEP_RECV (1<<0) /* there is or may be data to read */
454 #define KEEP_SEND (1<<1) /* there is or may be data to write */
455 #define KEEP_RECV_HOLD (1<<2) /* when set, no reading should be done but there
456  might still be data to read */
457 #define KEEP_SEND_HOLD (1<<3) /* when set, no writing should be done but there
458  might still be data to write */
459 #define KEEP_RECV_PAUSE (1<<4) /* reading is paused */
460 #define KEEP_SEND_PAUSE (1<<5) /* writing is paused */
461 
462 #define KEEP_RECVBITS (KEEP_RECV | KEEP_RECV_HOLD | KEEP_RECV_PAUSE)
463 #define KEEP_SENDBITS (KEEP_SEND | KEEP_SEND_HOLD | KEEP_SEND_PAUSE)
464 
465 
466 #ifdef HAVE_LIBZ
467 typedef enum {
468  ZLIB_UNINIT, /* uninitialized */
469  ZLIB_INIT, /* initialized */
470  ZLIB_GZIP_HEADER, /* reading gzip header */
471  ZLIB_GZIP_INFLATING, /* inflating gzip stream */
472  ZLIB_INIT_GZIP /* initialized in transparent gzip mode */
473 } zlibInitState;
474 #endif
475 
476 #ifdef CURLRES_ASYNCH
477 struct Curl_async {
478  char *hostname;
479  int port;
480  struct Curl_dns_entry *dns;
481  bool done; /* set TRUE when the lookup is complete */
482  int status; /* if done is TRUE, this is the status from the callback */
483  void *os_specific; /* 'struct thread_data' for Windows */
484 };
485 #endif
486 
487 #define FIRSTSOCKET 0
488 #define SECONDARYSOCKET 1
489 
490 /* These function pointer types are here only to allow easier typecasting
491  within the source when we need to cast between data pointers (such as NULL)
492  and function pointers. */
493 typedef CURLcode (*Curl_do_more_func)(struct connectdata *, int *);
495 
496 enum expect100 {
497  EXP100_SEND_DATA, /* enough waiting, just send the body now */
498  EXP100_AWAITING_CONTINUE, /* waiting for the 100 Continue header */
499  EXP100_SENDING_REQUEST, /* still sending the request but will wait for
500  the 100 header once done with the request */
501  EXP100_FAILED /* used on 417 Expectation Failed */
502 };
503 
505  UPGR101_INIT, /* default state */
506  UPGR101_REQUESTED, /* upgrade requested */
507  UPGR101_RECEIVED, /* response received */
508  UPGR101_WORKING /* talking upgraded protocol */
509 };
510 
511 /*
512  * Request specific data in the easy handle (Curl_easy). Previously,
513  * these members were on the connectdata struct but since a conn struct may
514  * now be shared between different Curl_easys, we store connection-specific
515  * data here. This struct only keeps stuff that's interesting for *this*
516  * request, as it will be cleared between multiple ones
517  */
519  curl_off_t size; /* -1 if unknown at this point */
520  curl_off_t *bytecountp; /* return number of bytes read or NULL */
521 
522  curl_off_t maxdownload; /* in bytes, the maximum amount of data to fetch,
523  -1 means unlimited */
524  curl_off_t *writebytecountp; /* return number of bytes written or NULL */
525 
526  curl_off_t bytecount; /* total number of bytes read */
527  curl_off_t writebytecount; /* number of bytes written */
528 
529  long headerbytecount; /* only count received headers */
530  long deductheadercount; /* this amount of bytes doesn't count when we check
531  if anything has been transferred at the end of a
532  connection. We use this counter to make only a
533  100 reply (without a following second response
534  code) result in a CURLE_GOT_NOTHING error code */
535 
536  struct curltime start; /* transfer started at this time */
537  struct curltime now; /* current time */
538  bool header; /* incoming data has HTTP header */
539  enum {
540  HEADER_NORMAL, /* no bad header at all */
541  HEADER_PARTHEADER, /* part of the chunk is a bad header, the rest
542  is normal data */
543  HEADER_ALLBAD /* all was believed to be header */
544  } badheader; /* the header was deemed bad and will be
545  written as body */
546  int headerline; /* counts header lines to better track the
547  first one */
548  char *hbufp; /* points at *end* of header line */
549  size_t hbuflen;
550  char *str; /* within buf */
551  char *str_start; /* within buf */
552  char *end_ptr; /* within buf */
553  char *p; /* within headerbuff */
554  bool content_range; /* set TRUE if Content-Range: was found */
555  curl_off_t offset; /* possible resume offset read from the
556  Content-Range: header */
557  int httpcode; /* error code from the 'HTTP/1.? XXX' or
558  'RTSP/1.? XXX' line */
559  struct curltime start100; /* time stamp to wait for the 100 code from */
560  enum expect100 exp100; /* expect 100 continue state */
561  enum upgrade101 upgr101; /* 101 upgrade state */
562 
563  int auto_decoding; /* What content encoding. sec 3.5, RFC2616. */
564 
565 #define IDENTITY 0 /* No encoding */
566 #define DEFLATE 1 /* zlib deflate [RFC 1950 & 1951] */
567 #define GZIP 2 /* gzip algorithm [RFC 1952] */
568 
569 #ifdef HAVE_LIBZ
570  zlibInitState zlib_init; /* possible zlib init state;
571  undefined if Content-Encoding header. */
572  z_stream z; /* State structure for zlib. */
573 #endif
574 
575  time_t timeofdoc;
577 
578  char *buf;
580 
581  int keepon;
582 
583  bool upload_done; /* set to TRUE when doing chunked transfer-encoding upload
584  and we're uploading the last chunk */
585 
586  bool ignorebody; /* we read a response-body but we ignore it! */
587  bool ignorecl; /* This HTTP response has no body so we ignore the Content-
588  Length: header */
589 
590  char *location; /* This points to an allocated version of the Location:
591  header data */
592  char *newurl; /* Set to the new URL to use when a redirect or a retry is
593  wanted */
594 
595  /* 'upload_present' is used to keep a byte counter of how much data there is
596  still left in the buffer, aimed for upload. */
598 
599  /* 'upload_fromhere' is used as a read-pointer when we uploaded parts of a
600  buffer, so the next read should read from where this pointer points to,
601  and the 'upload_present' contains the number of bytes available at this
602  position */
604 
605  bool chunk; /* if set, this is a chunked transfer-encoding */
606  bool upload_chunky; /* set TRUE if we are doing chunked transfer-encoding
607  on upload */
608  bool getheader; /* TRUE if header parsing is wanted */
609 
610  bool forbidchunk; /* used only to explicitly forbid chunk-upload for
611  specific upload buffers. See readmoredata() in
612  http.c for details. */
613 
614  void *protop; /* Allocated protocol-specific data. Each protocol
615  handler makes sure this points to data it needs. */
616 };
617 
618 /*
619  * Specific protocol handler.
620  */
621 
622 struct Curl_handler {
623  const char *scheme; /* URL scheme name. */
624 
625  /* Complement to setup_connection_internals(). */
626  CURLcode (*setup_connection)(struct connectdata *);
627 
628  /* These two functions MUST be set to be protocol dependent */
629  CURLcode (*do_it)(struct connectdata *, bool *done);
631 
632  /* If the curl_do() function is better made in two halves, this
633  * curl_do_more() function will be called afterwards, if set. For example
634  * for doing the FTP stuff after the PASV/PORT command.
635  */
637 
638  /* This function *MAY* be set to a protocol-dependent function that is run
639  * after the connect() and everything is done, as a step in the connection.
640  * The 'done' pointer points to a bool that should be set to TRUE if the
641  * function completes before return. If it doesn't complete, the caller
642  * should call the curl_connecting() function until it is.
643  */
644  CURLcode (*connect_it)(struct connectdata *, bool *done);
645 
646  /* See above. Currently only used for FTP. */
647  CURLcode (*connecting)(struct connectdata *, bool *done);
648  CURLcode (*doing)(struct connectdata *, bool *done);
649 
650  /* Called from the multi interface during the PROTOCONNECT phase, and it
651  should then return a proper fd set */
652  int (*proto_getsock)(struct connectdata *conn,
653  curl_socket_t *socks,
654  int numsocks);
655 
656  /* Called from the multi interface during the DOING phase, and it should
657  then return a proper fd set */
658  int (*doing_getsock)(struct connectdata *conn,
659  curl_socket_t *socks,
660  int numsocks);
661 
662  /* Called from the multi interface during the DO_MORE phase, and it should
663  then return a proper fd set */
664  int (*domore_getsock)(struct connectdata *conn,
665  curl_socket_t *socks,
666  int numsocks);
667 
668  /* Called from the multi interface during the DO_DONE, PERFORM and
669  WAITPERFORM phases, and it should then return a proper fd set. Not setting
670  this will make libcurl use the generic default one. */
671  int (*perform_getsock)(const struct connectdata *conn,
672  curl_socket_t *socks,
673  int numsocks);
674 
675  /* This function *MAY* be set to a protocol-dependent function that is run
676  * by the curl_disconnect(), as a step in the disconnection. If the handler
677  * is called because the connection has been considered dead, dead_connection
678  * is set to TRUE.
679  */
680  CURLcode (*disconnect)(struct connectdata *, bool dead_connection);
681 
682  /* If used, this function gets called from transfer.c:readwrite_data() to
683  allow the protocol to do extra reads/writes */
684  CURLcode (*readwrite)(struct Curl_easy *data, struct connectdata *conn,
685  ssize_t *nread, bool *readmore);
686 
687  /* This function can perform various checks on the connection. See
688  CONNCHECK_* for more information about the checks that can be performed,
689  and CONNRESULT_* for the results that can be returned. */
690  unsigned int (*connection_check)(struct connectdata *conn,
691  unsigned int checks_to_perform);
692 
693  long defport; /* Default port. */
694  unsigned int protocol; /* See CURLPROTO_* - this needs to be the single
695  specific protocol bit */
696  unsigned int flags; /* Extra particular characteristics, see PROTOPT_* */
697 };
698 
699 #define PROTOPT_NONE 0 /* nothing extra */
700 #define PROTOPT_SSL (1<<0) /* uses SSL */
701 #define PROTOPT_DUAL (1<<1) /* this protocol uses two connections */
702 #define PROTOPT_CLOSEACTION (1<<2) /* need action before socket close */
703 /* some protocols will have to call the underlying functions without regard to
704  what exact state the socket signals. IE even if the socket says "readable",
705  the send function might need to be called while uploading, or vice versa.
706 */
707 #define PROTOPT_DIRLOCK (1<<3)
708 #define PROTOPT_NONETWORK (1<<4) /* protocol doesn't use the network! */
709 #define PROTOPT_NEEDSPWD (1<<5) /* needs a password, and if none is set it
710  gets a default */
711 #define PROTOPT_NOURLQUERY (1<<6) /* protocol can't handle
712  url query strings (?foo=bar) ! */
713 #define PROTOPT_CREDSPERREQUEST (1<<7) /* requires login credentials per
714  request instead of per connection */
715 #define PROTOPT_ALPN_NPN (1<<8) /* set ALPN and/or NPN for this */
716 #define PROTOPT_STREAM (1<<9) /* a protocol with individual logical streams */
717 #define PROTOPT_URLOPTIONS (1<<10) /* allow options part in the userinfo field
718  of the URL */
719 #define PROTOPT_PROXY_AS_HTTP (1<<11) /* allow this non-HTTP scheme over a
720  HTTP proxy as HTTP proxies may know
721  this protocol and act as a gateway */
722 
723 #define CONNCHECK_NONE 0 /* No checks */
724 #define CONNCHECK_ISDEAD (1<<0) /* Check if the connection is dead. */
725 
726 #define CONNRESULT_NONE 0 /* No extra information. */
727 #define CONNRESULT_DEAD (1<<0) /* The connection is dead. */
728 
729 /* return the count of bytes sent, or -1 on error */
730 typedef ssize_t (Curl_send)(struct connectdata *conn, /* connection data */
731  int sockindex, /* socketindex */
732  const void *buf, /* data to write */
733  size_t len, /* max amount to write */
734  CURLcode *err); /* error to return */
735 
736 /* return the count of bytes read, or -1 on error */
737 typedef ssize_t (Curl_recv)(struct connectdata *conn, /* connection data */
738  int sockindex, /* socketindex */
739  char *buf, /* store data here */
740  size_t len, /* max amount to read */
741  CURLcode *err); /* error to return */
742 
743 #ifdef USE_RECV_BEFORE_SEND_WORKAROUND
744 struct postponed_data {
745  char *buffer; /* Temporal store for received data during
746  sending, must be freed */
747  size_t allocated_size; /* Size of temporal store */
748  size_t recv_size; /* Size of received data during sending */
749  size_t recv_processed; /* Size of processed part of postponed data */
750 #ifdef DEBUGBUILD
751  curl_socket_t bindsock;/* Structure must be bound to specific socket,
752  used only for DEBUGASSERT */
753 #endif /* DEBUGBUILD */
754 };
755 #endif /* USE_RECV_BEFORE_SEND_WORKAROUND */
756 
757 struct proxy_info {
758  struct hostname host;
759  long port;
760  curl_proxytype proxytype; /* what kind of proxy that is in use */
761  char *user; /* proxy user name string, allocated */
762  char *passwd; /* proxy password string, allocated */
763 };
764 
765 #define CONNECT_BUFFER_SIZE 16384
766 
767 /* struct for HTTP CONNECT state data */
769  char connect_buffer[CONNECT_BUFFER_SIZE];
770  int perline; /* count bytes per line */
771  int keepon;
772  char *line_start;
773  char *ptr; /* where to store more data */
774  curl_off_t cl; /* size of content to read and ignore */
776  enum {
777  TUNNEL_INIT, /* init/default/no tunnel state */
778  TUNNEL_CONNECT, /* CONNECT has been sent off */
779  TUNNEL_COMPLETE /* CONNECT response received completely */
780  } tunnel_state;
781 };
782 
783 /*
784  * The connectdata struct contains all fields and variables that should be
785  * unique for an entire connection.
786  */
787 struct connectdata {
788  /* 'data' is the CURRENT Curl_easy using this connection -- take great
789  caution that this might very well vary between different times this
790  connection is used! */
791  struct Curl_easy *data;
792 
793  struct curl_llist_element bundle_node; /* conncache */
794 
795  /* chunk is for HTTP chunked encoding, but is in the general connectdata
796  struct only because we can do just about any protocol through a HTTP proxy
797  and a HTTP proxy may in fact respond using chunked encoding */
798  struct Curl_chunker chunk;
799 
800  curl_closesocket_callback fclosesocket; /* function closing the socket(s) */
802 
803  bool inuse; /* This is a marker for the connection cache logic. If this is
804  TRUE this handle is being used by an easy handle and cannot
805  be used by any other easy handle without careful
806  consideration (== only for pipelining). */
807 
808  /**** Fields set when inited and not modified again */
809  long connection_id; /* Contains a unique number to make it easier to
810  track the connections in the log output */
811 
812  /* 'dns_entry' is the particular host we use. This points to an entry in the
813  DNS cache and it will not get pruned while locked. It gets unlocked in
814  Curl_done(). This entry will be NULL if the connection is re-used as then
815  there is no name resolve done. */
817 
818  /* 'ip_addr' is the particular IP we connected to. It points to a struct
819  within the DNS cache, so this pointer is only valid as long as the DNS
820  cache entry remains locked. It gets unlocked in Curl_done() */
822  Curl_addrinfo *tempaddr[2]; /* for happy eyeballs */
823 
824  /* 'ip_addr_str' is the ip_addr data as a human readable string.
825  It remains available as long as the connection does, which is longer than
826  the ip_addr itself. */
827  char ip_addr_str[MAX_IPADR_LEN];
828 
829  unsigned int scope_id; /* Scope id for IPv6 */
830 
831  int socktype; /* SOCK_STREAM or SOCK_DGRAM */
832 
833  struct hostname host;
834  char *secondaryhostname; /* secondary socket host name (ftp) */
835  struct hostname conn_to_host; /* the host to connect to. valid only if
836  bits.conn_to_host is set */
837 
838  struct proxy_info socks_proxy;
839  struct proxy_info http_proxy;
840 
841  long port; /* which port to use locally */
842  int remote_port; /* the remote port, not the proxy port! */
843  int conn_to_port; /* the remote port to connect to. valid only if
844  bits.conn_to_port is set */
845  unsigned short secondary_port; /* secondary socket remote port to connect to
846  (ftp) */
847 
848  /* 'primary_ip' and 'primary_port' get filled with peer's numerical
849  ip address and port number whenever an outgoing connection is
850  *attempted* from the primary socket to a remote address. When more
851  than one address is tried for a connection these will hold data
852  for the last attempt. When the connection is actually established
853  these are updated with data which comes directly from the socket. */
854 
855  char primary_ip[MAX_IPADR_LEN];
857 
858  /* 'local_ip' and 'local_port' get filled with local's numerical
859  ip address and port number whenever an outgoing connection is
860  **established** from the primary socket to a remote address. */
861 
862  char local_ip[MAX_IPADR_LEN];
864 
865  char *user; /* user name string, allocated */
866  char *passwd; /* password string, allocated */
867  char *options; /* options string, allocated */
868 
869  char *oauth_bearer; /* bearer token for OAuth 2.0, allocated */
870 
871  int httpversion; /* the HTTP version*10 reported by the server */
872  int rtspversion; /* the RTSP version*10 reported by the server */
873 
874  struct curltime now; /* "current" time */
875  struct curltime created; /* creation time */
876  curl_socket_t sock[2]; /* two sockets, the second is used for the data
877  transfer when doing FTP */
878  curl_socket_t tempsock[2]; /* temporary sockets for happy eyeballs */
879  bool sock_accepted[2]; /* TRUE if the socket on this index was created with
880  accept() */
881  Curl_recv *recv[2];
882  Curl_send *send[2];
883 
884 #ifdef USE_RECV_BEFORE_SEND_WORKAROUND
885  struct postponed_data postponed[2]; /* two buffers for two sockets */
886 #endif /* USE_RECV_BEFORE_SEND_WORKAROUND */
887  struct ssl_connect_data ssl[2]; /* this is for ssl-stuff */
888  struct ssl_connect_data proxy_ssl[2]; /* this is for proxy ssl-stuff */
889  struct ssl_primary_config ssl_config;
890  struct ssl_primary_config proxy_ssl_config;
892 
893  struct ConnectBits bits; /* various state-flags for this connection */
894 
895  /* connecttime: when connect() is called on the current IP address. Used to
896  be able to track when to move on to try next IP - but only when the multi
897  interface is used. */
898  struct curltime connecttime;
899  /* The two fields below get set in Curl_connecthost */
900  int num_addr; /* number of addresses to try to connect to */
901  time_t timeoutms_per_addr; /* how long time in milliseconds to spend on
902  trying to connect to each IP address */
903 
904  const struct Curl_handler *handler; /* Connection's protocol handler */
905  const struct Curl_handler *given; /* The protocol first given */
906 
907  long ip_version; /* copied from the Curl_easy at creation time */
908 
909  /**** curl_get() phase fields */
910 
911  curl_socket_t sockfd; /* socket to read from or CURL_SOCKET_BAD */
912  curl_socket_t writesockfd; /* socket to write to, it may very
913  well be the same we read from.
914  CURL_SOCKET_BAD disables */
915 
920  char *uagent;
922  char *userpwd;
923  char *rangeline;
924  char *ref;
925  char *host;
926  char *cookiehost;
928  char *te; /* TE: request header */
929  } allocptr;
930 
931 #ifdef HAVE_GSSAPI
932  int sec_complete; /* if Kerberos is enabled for this connection */
933  enum protection_level command_prot;
934  enum protection_level data_prot;
935  enum protection_level request_data_prot;
936  size_t buffer_size;
937  struct krb5buffer in_buffer;
938  void *app_data;
939  const struct Curl_sec_client_mech *mech;
940  struct sockaddr_in local_addr;
941 #endif
942 
943 #if defined(USE_KERBEROS5) /* Consider moving some of the above GSS-API */
944  struct kerberos5data krb5; /* variables into the structure definition, */
945 #endif /* however, some of them are ftp specific. */
946 
947  /* the two following *_inuse fields are only flags, not counters in any way.
948  If TRUE it means the channel is in use, and if FALSE it means the channel
949  is up for grabs by one. */
950 
951  bool readchannel_inuse; /* whether the read channel is in use by an easy
952  handle */
953  bool writechannel_inuse; /* whether the write channel is in use by an easy
954  handle */
955  struct curl_llist send_pipe; /* List of handles waiting to send on this
956  pipeline */
957  struct curl_llist recv_pipe; /* List of handles waiting to read their
958  responses on this pipeline */
959  char *master_buffer; /* The master buffer allocated on-demand;
960  used for pipelining. */
961  size_t read_pos; /* Current read position in the master buffer */
962  size_t buf_len; /* Length of the buffer?? */
963 
964 
965  curl_seek_callback seek_func; /* function that seeks the input */
966  void *seek_client; /* pointer to pass to the seek() above */
967 
968  /*************** Request - specific items ************/
969 
970 #if defined(USE_NTLM)
971  struct ntlmdata ntlm; /* NTLM differs from other authentication schemes
972  because it authenticates connections, not
973  single requests! */
974  struct ntlmdata proxyntlm; /* NTLM data for proxy */
975 
976 #if defined(NTLM_WB_ENABLED)
977  /* used for communication with Samba's winbind daemon helper ntlm_auth */
978  curl_socket_t ntlm_auth_hlpr_socket;
979  pid_t ntlm_auth_hlpr_pid;
980  char *challenge_header;
981  char *response_header;
982 #endif
983 #endif
984 
985  char syserr_buf [256]; /* buffer for Curl_strerror() */
986 
987 #ifdef CURLRES_ASYNCH
988  /* data used for the asynch name resolve callback */
989  struct Curl_async async;
990 #endif
991 
992  /* These three are used for chunked-encoding trailer support */
993  char *trailer; /* allocated buffer to store trailer in */
994  int trlMax; /* allocated buffer size */
995  int trlPos; /* index of where to store data */
996 
997  union {
998  struct ftp_conn ftpc;
999  struct http_conn httpc;
1000  struct ssh_conn sshc;
1002  struct imap_conn imapc;
1003  struct pop3_conn pop3c;
1004  struct smtp_conn smtpc;
1005  struct rtsp_conn rtspc;
1006  struct smb_conn smbc;
1007  void *generic; /* RTMP and LDAP use this */
1008  } proto;
1009 
1010  int cselect_bits; /* bitmask of socket events */
1011  int waitfor; /* current READ/WRITE bits to wait for */
1012 
1013 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
1014  int socks5_gssapi_enctype;
1015 #endif
1016 
1017  /* When this connection is created, store the conditions for the local end
1018  bind. This is stored before the actual bind and before any connection is
1019  made and will serve the purpose of being used for comparison reasons so
1020  that subsequent bound-requested connections aren't accidentally re-using
1021  wrong connections. */
1022  char *localdev;
1023  unsigned short localport;
1025  struct http_connect_state *connect_state; /* for HTTP CONNECT */
1026  struct connectbundle *bundle; /* The bundle we are member of */
1027  int negnpn; /* APLN or NPN TLS negotiated protocol, CURL_HTTP_VERSION* */
1028 
1029 #ifdef USE_UNIX_SOCKETS
1030  char *unix_domain_socket;
1031  bool abstract_unix_socket;
1032 #endif
1033 
1034 #ifdef USE_SSL
1035  /*
1036  * To avoid multiple malloc() calls, the ssl_connect_data structures
1037  * associated with a connectdata struct are allocated in the same block
1038  * as the latter. This field forces alignment to an 8-byte boundary so
1039  * that this all works.
1040  */
1041  long long *align_data__do_not_use;
1042 #endif
1043 };
1044 
1045 /* The end of connectdata. */
1046 
1047 /*
1048  * Struct to keep statistical and informational data.
1049  * All variables in this struct must be initialized/reset in Curl_initinfo().
1050  */
1051 struct PureInfo {
1052  int httpcode; /* Recent HTTP, FTP, RTSP or SMTP response code */
1053  int httpproxycode; /* response code from proxy when received separate */
1054  int httpversion; /* the http version number X.Y = X*10+Y */
1055  long filetime; /* If requested, this is might get set. Set to -1 if the time
1056  was unretrievable. We cannot have this of type time_t,
1057  since time_t is unsigned on several platforms such as
1058  OpenVMS. */
1059  bool timecond; /* set to TRUE if the time condition didn't match, which
1060  thus made the document NOT get fetched */
1061  long header_size; /* size of read header(s) in bytes */
1062  long request_size; /* the amount of bytes sent in the request(s) */
1063  unsigned long proxyauthavail; /* what proxy auth types were announced */
1064  unsigned long httpauthavail; /* what host auth types were announced */
1065  long numconnects; /* how many new connection did libcurl created */
1066  char *contenttype; /* the content type of the object */
1067  char *wouldredirect; /* URL this would've been redirected to if asked to */
1068 
1069  /* PureInfo members 'conn_primary_ip', 'conn_primary_port', 'conn_local_ip'
1070  and, 'conn_local_port' are copied over from the connectdata struct in
1071  order to allow curl_easy_getinfo() to return this information even when
1072  the session handle is no longer associated with a connection, and also
1073  allow curl_easy_reset() to clear this information from the session handle
1074  without disturbing information which is still alive, and that might be
1075  reused, in the connection cache. */
1076 
1077  char conn_primary_ip[MAX_IPADR_LEN];
1079 
1080  char conn_local_ip[MAX_IPADR_LEN];
1082 
1083  const char *conn_scheme;
1084  unsigned int conn_protocol;
1085 
1086  struct curl_certinfo certs; /* info about the certs, only populated in
1087  OpenSSL builds. Asked for with
1088  CURLOPT_CERTINFO / CURLINFO_CERTINFO */
1089 };
1090 
1091 
1092 struct Progress {
1093  time_t lastshow; /* time() of the last displayed progress meter or NULL to
1094  force redraw at next call */
1095  curl_off_t size_dl; /* total expected size */
1096  curl_off_t size_ul; /* total expected size */
1097  curl_off_t downloaded; /* transferred so far */
1098  curl_off_t uploaded; /* transferred so far */
1099 
1100  curl_off_t current_speed; /* uses the currently fastest transfer */
1101 
1102  bool callback; /* set when progress callback is used */
1103  int width; /* screen width at download start */
1104  int flags; /* see progress.h */
1105 
1106  time_t timespent;
1107 
1110 
1111  time_t t_nslookup;
1112  time_t t_connect;
1116  time_t t_redirect;
1117 
1118  struct curltime start;
1119  struct curltime t_startsingle;
1120  struct curltime t_startop;
1121  struct curltime t_acceptdata;
1122 
1124 
1125  /* upload speed limit */
1126  struct curltime ul_limit_start;
1128  /* download speed limit */
1129  struct curltime dl_limit_start;
1131 
1132 #define CURR_TIME (5 + 1) /* 6 entries for 5 seconds */
1133 
1134  curl_off_t speeder[ CURR_TIME ];
1135  struct curltime speeder_time[ CURR_TIME ];
1137 };
1138 
1139 typedef enum {
1140  HTTPREQ_NONE, /* first in list */
1143  HTTPREQ_POST_FORM, /* we make a difference internally */
1144  HTTPREQ_POST_MIME, /* we make a difference internally */
1149  HTTPREQ_LAST /* last in list */
1150 } Curl_HttpReq;
1151 
1152 typedef enum {
1153  RTSPREQ_NONE, /* first in list */
1165  RTSPREQ_LAST /* last in list */
1166 } Curl_RtspReq;
1167 
1168 /*
1169  * Values that are generated, temporary or calculated internally for a
1170  * "session handle" must be defined within the 'struct UrlState'. This struct
1171  * will be used within the Curl_easy struct. When the 'Curl_easy'
1172  * struct is cloned, this data MUST NOT be copied.
1173  *
1174  * Remember that any "state" information goes globally for the curl handle.
1175  * Session-data MUST be put in the connectdata struct and here. */
1176 #define MAX_CURL_USER_LENGTH 256
1177 #define MAX_CURL_PASSWORD_LENGTH 256
1178 
1179 struct auth {
1180  unsigned long want; /* Bitmask set to the authentication methods wanted by
1181  app (with CURLOPT_HTTPAUTH or CURLOPT_PROXYAUTH). */
1182  unsigned long picked;
1183  unsigned long avail; /* Bitmask for what the server reports to support for
1184  this resource */
1185  bool done; /* TRUE when the auth phase is done and ready to do the *actual*
1186  request */
1187  bool multipass; /* TRUE if this is not yet authenticated but within the
1188  auth multipass negotiation */
1189  bool iestyle; /* TRUE if digest should be done IE-style or FALSE if it should
1190  be RFC compliant */
1191 };
1192 
1195  struct Curl_easy *data;
1196 };
1197 
1198 /*
1199  * This struct is for holding data that was attemped to get sent to the user's
1200  * callback but is held due to pausing. One instance per type (BOTH, HEADER,
1201  * BODY).
1202  */
1203 struct tempbuf {
1204  char *buf; /* allocated buffer to keep data in when a write callback
1205  returns to make the connection paused */
1206  size_t len; /* size of the 'tempwrite' allocated buffer */
1207  int type; /* type of the 'tempwrite' buffer as a bitmask that is used with
1208  Curl_client_write() */
1209 };
1210 
1211 /* Timers */
1212 typedef enum {
1223  EXPIRE_LAST /* not an actual timer, used as a marker only */
1224 } expire_id;
1225 
1226 /*
1227  * One instance for each timeout an easy handle can set.
1228  */
1229 struct time_node {
1230  struct curl_llist_element list;
1231  struct curltime time;
1233 };
1234 
1235 struct UrlState {
1236 
1237  /* Points to the connection cache */
1239 
1240  /* when curl_easy_perform() is called, the multi handle is "owned" by
1241  the easy handle so curl_easy_cleanup() on such an easy handle will
1242  also close the multi handle! */
1244 
1245  /* buffers to store authentication data in, as parsed from input options */
1246  struct curltime keeps_speed; /* for the progress meter really */
1247 
1248  struct connectdata *lastconnect; /* The last connection, NULL if undefined */
1249 
1250  char *headerbuff; /* allocated buffer to store headers in */
1251  size_t headersize; /* size of the allocation */
1252 
1253  char *buffer; /* download buffer */
1254  char uploadbuffer[UPLOAD_BUFSIZE + 1]; /* upload buffer */
1255  curl_off_t current_speed; /* the ProgressShow() function sets this,
1256  bytes / second */
1257  bool this_is_a_follow; /* this is a followed Location: request */
1258 
1259  char *first_host; /* host name of the first (not followed) request.
1260  if set, this should be the host name that we will
1261  sent authorization to, no else. Used to make Location:
1262  following not keep sending user+password... This is
1263  strdup() data.
1264  */
1265  int first_remote_port; /* remote port of the first (not followed) request */
1266  struct curl_ssl_session *session; /* array of 'max_ssl_sessions' size */
1267  long sessionage; /* number of the most recent session */
1268  unsigned int tempcount; /* number of entries in use in tempwrite, 0 - 3 */
1269  struct tempbuf tempwrite[3]; /* BOTH, HEADER, BODY */
1270  char *scratch; /* huge buffer[set.buffer_size*2] for upload CRLF replacing */
1271  bool errorbuf; /* Set to TRUE if the error buffer is already filled in.
1272  This must be set to FALSE every time _easy_perform() is
1273  called. */
1274  int os_errno; /* filled in with errno whenever an error occurs */
1275 #ifdef HAVE_SIGNAL
1276  /* storage for the previous bag^H^H^HSIGPIPE signal handler :-) */
1277  void (*prev_signal)(int sig);
1278 #endif
1279  bool allow_port; /* Is set.use_port allowed to take effect or not. This
1280  is always set TRUE when curl_easy_perform() is called. */
1281  struct digestdata digest; /* state data for host Digest auth */
1282  struct digestdata proxydigest; /* state data for proxy Digest auth */
1283 
1284 #ifdef USE_SPNEGO
1285  struct negotiatedata negotiate; /* state data for host Negotiate auth */
1286  struct negotiatedata proxyneg; /* state data for proxy Negotiate auth */
1287 #endif
1288 
1289  struct auth authhost; /* auth details for host */
1290  struct auth authproxy; /* auth details for proxy */
1291 
1292  bool authproblem; /* TRUE if there's some problem authenticating */
1293 
1294  void *resolver; /* resolver state, if it is used in the URL state -
1295  ares_channel f.e. */
1296 
1297 #if defined(USE_OPENSSL) && defined(HAVE_OPENSSL_ENGINE_H)
1298  /* void instead of ENGINE to avoid bleeding OpenSSL into this header */
1299  void *engine;
1300 #endif /* USE_OPENSSL */
1301  struct curltime expiretime; /* set this with Curl_expire() only */
1302  struct Curl_tree timenode; /* for the splay stuff */
1303  struct curl_llist timeoutlist; /* list of pending timeouts */
1304  struct time_node expires[EXPIRE_LAST]; /* nodes for each expire type */
1305 
1306  /* a place to store the most recently set FTP entrypath */
1308 
1309  /* set after initial USER failure, to prevent an authentication loop */
1311 
1312  int httpversion; /* the lowest HTTP version*10 reported by any server
1313  involved in this request */
1314  bool expect100header; /* TRUE if we added Expect: 100-continue */
1315 
1316  bool pipe_broke; /* TRUE if the connection we were pipelined on broke
1317  and we need to restart from the beginning */
1318 
1319 #if !defined(WIN32) && !defined(MSDOS) && !defined(__EMX__) && \
1320  !defined(__SYMBIAN32__)
1321 /* do FTP line-end conversions on most platforms */
1322 #define CURL_DO_LINEEND_CONV
1323  /* for FTP downloads: track CRLF sequences that span blocks */
1325  /* for FTP downloads: how many CRLFs did we converted to LFs? */
1327 #endif
1328  char *pathbuffer;/* allocated buffer to store the URL's path part in */
1329  char *path; /* path to use, points to somewhere within the pathbuffer
1330  area */
1331  bool slash_removed; /* set TRUE if the 'path' points to a path where the
1332  initial URL slash separator has been taken off */
1334  bool rangestringalloc; /* the range string is malloc()'ed */
1335 
1336  char *range; /* range, if used. See README for detailed specification on
1337  this syntax. */
1338  curl_off_t resume_from; /* continue [ftp] transfer from here */
1339 
1340  /* This RTSP state information survives requests and connections */
1341  long rtsp_next_client_CSeq; /* the session's next client CSeq */
1342  long rtsp_next_server_CSeq; /* the session's next server CSeq */
1343  long rtsp_CSeq_recv; /* most recent CSeq received */
1344 
1345  curl_off_t infilesize; /* size of file to upload, -1 means unknown.
1346  Copied from set.filesize at start of operation */
1347 
1348  size_t drain; /* Increased when this stream has data to read, even if its
1349  socket is not necessarily is readable. Decreased when
1350  checked. */
1351  bool done; /* set to FALSE when Curl_init_do() is called and set to TRUE
1352  when multi_done() is called, to prevent multi_done() to get
1353  invoked twice when the multi interface is used. */
1354 
1355  curl_read_callback fread_func; /* read callback/function */
1356  void *in; /* CURLOPT_READDATA */
1357 
1359  bool stream_depends_e; /* set or don't set the Exclusive bit */
1361 };
1362 
1363 
1364 /*
1365  * This 'DynamicStatic' struct defines dynamic states that actually change
1366  * values in the 'UserDefined' area, which MUST be taken into consideration
1367  * if the UserDefined struct is cloned or similar. You can probably just
1368  * copy these, but each one indicate a special action on other data.
1369  */
1370 
1372  char *url; /* work URL, copied from UserDefined */
1373  bool url_alloc; /* URL string is malloc()'ed */
1374  char *referer; /* referer string */
1375  bool referer_alloc; /* referer sting is malloc()ed */
1376  struct curl_slist *cookielist; /* list of cookie files set by
1377  curl_easy_setopt(COOKIEFILE) calls */
1378  struct curl_slist *resolve; /* set to point to the set.resolve list when
1379  this should be dealt with in pretransfer */
1380 };
1381 
1382 /*
1383  * This 'UserDefined' struct must only contain data that is set once to go
1384  * for many (perhaps) independent connections. Values that are generated or
1385  * calculated internally for the "session handle" MUST be defined within the
1386  * 'struct UrlState' instead. The only exceptions MUST note the changes in
1387  * the 'DynamicStatic' struct.
1388  * Character pointer fields point to dynamic storage, unless otherwise stated.
1389  */
1390 
1391 struct Curl_multi; /* declared and used only in multi.c */
1392 
1394  STRING_CERT_ORIG, /* client certificate file name */
1395  STRING_CERT_PROXY, /* client certificate file name */
1396  STRING_CERT_TYPE_ORIG, /* format for certificate (default: PEM)*/
1397  STRING_CERT_TYPE_PROXY, /* format for certificate (default: PEM)*/
1398  STRING_COOKIE, /* HTTP cookie string to send */
1399  STRING_COOKIEJAR, /* dump all cookies to this file */
1400  STRING_CUSTOMREQUEST, /* HTTP/FTP/RTSP request/method to use */
1401  STRING_DEFAULT_PROTOCOL, /* Protocol to use when the URL doesn't specify */
1402  STRING_DEVICE, /* local network interface/address to use */
1403  STRING_ENCODING, /* Accept-Encoding string */
1404  STRING_FTP_ACCOUNT, /* ftp account data */
1405  STRING_FTP_ALTERNATIVE_TO_USER, /* command to send if USER/PASS fails */
1406  STRING_FTPPORT, /* port to send with the FTP PORT command */
1407  STRING_KEY_ORIG, /* private key file name */
1408  STRING_KEY_PROXY, /* private key file name */
1409  STRING_KEY_PASSWD_ORIG, /* plain text private key password */
1410  STRING_KEY_PASSWD_PROXY, /* plain text private key password */
1411  STRING_KEY_TYPE_ORIG, /* format for private key (default: PEM) */
1412  STRING_KEY_TYPE_PROXY, /* format for private key (default: PEM) */
1413  STRING_KRB_LEVEL, /* krb security level */
1414  STRING_NETRC_FILE, /* if not NULL, use this instead of trying to find
1415  $HOME/.netrc */
1416  STRING_PROXY, /* proxy to use */
1417  STRING_PRE_PROXY, /* pre socks proxy to use */
1418  STRING_SET_RANGE, /* range, if used */
1419  STRING_SET_REFERER, /* custom string for the HTTP referer field */
1420  STRING_SET_URL, /* what original URL to work on */
1421  STRING_SSL_CAPATH_ORIG, /* CA directory name (doesn't work on windows) */
1422  STRING_SSL_CAPATH_PROXY, /* CA directory name (doesn't work on windows) */
1423  STRING_SSL_CAFILE_ORIG, /* certificate file to verify peer against */
1424  STRING_SSL_CAFILE_PROXY, /* certificate file to verify peer against */
1425  STRING_SSL_PINNEDPUBLICKEY_ORIG, /* public key file to verify peer against */
1426  STRING_SSL_PINNEDPUBLICKEY_PROXY, /* public key file to verify proxy */
1427  STRING_SSL_CIPHER_LIST_ORIG, /* list of ciphers to use */
1428  STRING_SSL_CIPHER_LIST_PROXY, /* list of ciphers to use */
1429  STRING_SSL_EGDSOCKET, /* path to file containing the EGD daemon socket */
1430  STRING_SSL_RANDOM_FILE, /* path to file containing "random" data */
1431  STRING_USERAGENT, /* User-Agent string */
1432  STRING_SSL_CRLFILE_ORIG, /* crl file to check certificate */
1433  STRING_SSL_CRLFILE_PROXY, /* crl file to check certificate */
1434  STRING_SSL_ISSUERCERT_ORIG, /* issuer cert file to check certificate */
1435  STRING_SSL_ISSUERCERT_PROXY, /* issuer cert file to check certificate */
1436  STRING_USERNAME, /* <username>, if used */
1437  STRING_PASSWORD, /* <password>, if used */
1438  STRING_OPTIONS, /* <options>, if used */
1439  STRING_PROXYUSERNAME, /* Proxy <username>, if used */
1440  STRING_PROXYPASSWORD, /* Proxy <password>, if used */
1441  STRING_NOPROXY, /* List of hosts which should not use the proxy, if
1442  used */
1443  STRING_RTSP_SESSION_ID, /* Session ID to use */
1444  STRING_RTSP_STREAM_URI, /* Stream URI for this request */
1445  STRING_RTSP_TRANSPORT, /* Transport for this session */
1446 #ifdef USE_LIBSSH2
1447  STRING_SSH_PRIVATE_KEY, /* path to the private key file for auth */
1448  STRING_SSH_PUBLIC_KEY, /* path to the public key file for auth */
1449  STRING_SSH_HOST_PUBLIC_KEY_MD5, /* md5 of host public key in ascii hex */
1450  STRING_SSH_KNOWNHOSTS, /* file name of knownhosts file */
1451 #endif
1452 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
1453  STRING_PROXY_SERVICE_NAME, /* Proxy service name */
1454 #endif
1455 #if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \
1456  defined(USE_SPNEGO)
1457  STRING_SERVICE_NAME, /* Service name */
1458 #endif
1461 
1462 #ifdef USE_TLS_SRP
1463  STRING_TLSAUTH_USERNAME_ORIG, /* TLS auth <username> */
1464  STRING_TLSAUTH_USERNAME_PROXY, /* TLS auth <username> */
1465  STRING_TLSAUTH_PASSWORD_ORIG, /* TLS auth <password> */
1466  STRING_TLSAUTH_PASSWORD_PROXY, /* TLS auth <password> */
1467 #endif
1468  STRING_BEARER, /* <bearer>, if used */
1469 #ifdef USE_UNIX_SOCKETS
1470  STRING_UNIX_SOCKET_PATH, /* path to Unix socket, if used */
1471 #endif
1472  STRING_TARGET, /* CURLOPT_REQUEST_TARGET */
1473  /* -- end of zero-terminated strings -- */
1474 
1476 
1477  /* -- below this are pointers to binary data that cannot be strdup'ed.
1478  Each such pointer must be added manually to Curl_dupset() --- */
1479 
1480  STRING_COPYPOSTFIELDS, /* if POST, set the fields' values here */
1481 
1482  STRING_LAST /* not used, just an end-of-list marker */
1483 };
1484 
1485 struct UserDefined {
1486  FILE *err; /* the stderr user data goes here */
1487  void *debugdata; /* the data that will be passed to fdebug */
1488  char *errorbuffer; /* (Static) store failure messages in here */
1489  long proxyport; /* If non-zero, use this port number by default. If the
1490  proxy string features a ":[port]" that one will override
1491  this. */
1492  void *out; /* CURLOPT_WRITEDATA */
1493  void *in_set; /* CURLOPT_READDATA */
1494  void *writeheader; /* write the header to this if non-NULL */
1495  void *rtp_out; /* write RTP to this if non-NULL */
1496  long use_port; /* which port to use (when not using default) */
1497  unsigned long httpauth; /* kind of HTTP authentication to use (bitmask) */
1498  unsigned long proxyauth; /* kind of proxy authentication to use (bitmask) */
1499  unsigned long socks5auth;/* kind of SOCKS5 authentication to use (bitmask) */
1500  long followlocation; /* as in HTTP Location: */
1501  long maxredirs; /* maximum no. of http(s) redirects to follow, set to -1
1502  for infinity */
1503 
1504  int keep_post; /* keep POSTs as POSTs after a 30x request; each
1505  bit represents a request, from 301 to 303 */
1506  bool free_referer; /* set TRUE if 'referer' points to a string we
1507  allocated */
1508  void *postfields; /* if POST, set the fields' values here */
1509  curl_seek_callback seek_func; /* function that seeks the input */
1510  curl_off_t postfieldsize; /* if POST, this might have a size to use instead
1511  of strlen(), and then the data *may* be binary
1512  (contain zero bytes) */
1513  unsigned short localport; /* local port number to bind to */
1514  int localportrange; /* number of additional port numbers to test in case the
1515  'localport' one can't be bind()ed */
1516  curl_write_callback fwrite_func; /* function that stores the output */
1517  curl_write_callback fwrite_header; /* function that stores headers */
1518  curl_write_callback fwrite_rtp; /* function that stores interleaved RTP */
1519  curl_read_callback fread_func_set; /* function that reads the input */
1520  int is_fread_set; /* boolean, has read callback been set to non-NULL? */
1521  int is_fwrite_set; /* boolean, has write callback been set to non-NULL? */
1522  curl_progress_callback fprogress; /* OLD and deprecated progress callback */
1523  curl_xferinfo_callback fxferinfo; /* progress callback */
1524  curl_debug_callback fdebug; /* function that write informational data */
1525  curl_ioctl_callback ioctl_func; /* function for I/O control */
1526  curl_sockopt_callback fsockopt; /* function for setting socket options */
1527  void *sockopt_client; /* pointer to pass to the socket options callback */
1528  curl_opensocket_callback fopensocket; /* function for checking/translating
1529  the address and opening the
1530  socket */
1532  curl_closesocket_callback fclosesocket; /* function for closing the
1533  socket */
1535 
1536  void *seek_client; /* pointer to pass to the seek callback */
1537  /* the 3 curl_conv_callback functions below are used on non-ASCII hosts */
1538  /* function to convert from the network encoding: */
1540  /* function to convert to the network encoding: */
1542  /* function to convert from UTF-8 encoding: */
1544 
1545  void *progress_client; /* pointer to pass to the progress callback */
1546  void *ioctl_client; /* pointer to pass to the ioctl callback */
1547  long timeout; /* in milliseconds, 0 means no timeout */
1548  long connecttimeout; /* in milliseconds, 0 means no timeout */
1549  long accepttimeout; /* in milliseconds, 0 means no timeout */
1550  long server_response_timeout; /* in milliseconds, 0 means no timeout */
1551  long tftp_blksize; /* in bytes, 0 means use default */
1552  bool tftp_no_options; /* do not send TFTP options requests */
1553  curl_off_t filesize; /* size of file to upload, -1 means unknown */
1554  long low_speed_limit; /* bytes/second */
1555  long low_speed_time; /* number of seconds */
1556  curl_off_t max_send_speed; /* high speed limit in bytes/second for upload */
1557  curl_off_t max_recv_speed; /* high speed limit in bytes/second for
1558  download */
1559  curl_off_t set_resume_from; /* continue [ftp] transfer from here */
1560  struct curl_slist *headers; /* linked list of extra headers */
1561  struct curl_slist *proxyheaders; /* linked list of extra CONNECT headers */
1562  struct curl_httppost *httppost; /* linked list of old POST data */
1563  curl_mimepart mimepost; /* MIME/POST data. */
1564  bool sep_headers; /* handle host and proxy headers separately */
1565  bool cookiesession; /* new cookie session? */
1566  bool crlf; /* convert crlf on ftp upload(?) */
1567  struct curl_slist *quote; /* after connection is established */
1568  struct curl_slist *postquote; /* after the transfer */
1569  struct curl_slist *prequote; /* before the transfer, after type */
1570  struct curl_slist *source_quote; /* 3rd party quote */
1571  struct curl_slist *source_prequote; /* in 3rd party transfer mode - before
1572  the transfer on source host */
1573  struct curl_slist *source_postquote; /* in 3rd party transfer mode - after
1574  the transfer on source host */
1575  struct curl_slist *telnet_options; /* linked list of telnet options */
1576  struct curl_slist *resolve; /* list of names to add/remove from
1577  DNS cache */
1578  struct curl_slist *connect_to; /* list of host:port mappings to override
1579  the hostname and port to connect to */
1580  curl_TimeCond timecondition; /* kind of time/date comparison */
1581  time_t timevalue; /* what time to compare with */
1582  Curl_HttpReq httpreq; /* what kind of HTTP request (if any) is this */
1583  long httpversion; /* when non-zero, a specific HTTP version requested to
1584  be used in the library's request(s) */
1585  bool strip_path_slash; /* strip off initial slash from path */
1586  struct ssl_config_data ssl; /* user defined SSL stuff */
1587  struct ssl_config_data proxy_ssl; /* user defined SSL stuff for proxy */
1588  struct ssl_general_config general_ssl; /* general user defined SSL stuff */
1589  curl_proxytype proxytype; /* what kind of proxy that is in use */
1590  long dns_cache_timeout; /* DNS cache timeout */
1591  long buffer_size; /* size of receive buffer to use */
1592  void *private_data; /* application-private data */
1593 
1594  struct curl_slist *http200aliases; /* linked list of aliases for http200 */
1595 
1596  long ipver; /* the CURL_IPRESOLVE_* defines in the public header file
1597  0 - whatever, 1 - v2, 2 - v6 */
1598 
1599  curl_off_t max_filesize; /* Maximum file size to download */
1600 
1601  curl_ftpfile ftp_filemethod; /* how to get to a file when FTP is used */
1602 
1603  int ftp_create_missing_dirs; /* 1 - create directories that don't exist
1604  2 - the same but also allow MKD to fail once
1605  */
1606 
1607  curl_sshkeycallback ssh_keyfunc; /* key matching callback */
1608  void *ssh_keyfunc_userp; /* custom pointer to callback */
1609  bool ssh_compression; /* enable SSH compression */
1610 
1611 /* Here follows boolean settings that define how to behave during
1612  this session. They are STATIC, set by libcurl users or at least initially
1613  and they don't change during operations. */
1614 
1615  bool printhost; /* printing host name in debug info */
1616  bool get_filetime; /* get the time and get of the remote file */
1617  bool tunnel_thru_httpproxy; /* use CONNECT through a HTTP proxy */
1618  bool prefer_ascii; /* ASCII rather than binary */
1619  bool ftp_append; /* append, not overwrite, on upload */
1620  bool ftp_list_only; /* switch FTP command for listing directories */
1621  bool ftp_use_port; /* use the FTP PORT command */
1622  bool hide_progress; /* don't use the progress meter */
1623  bool http_fail_on_error; /* fail on HTTP error codes >= 400 */
1624  bool http_keep_sending_on_error; /* for HTTP status codes >= 300 */
1625  bool http_follow_location; /* follow HTTP redirects */
1626  bool http_transfer_encoding; /* request compressed HTTP transfer-encoding */
1628  bool include_header; /* include received protocol headers in data output */
1629  bool http_set_referer; /* is a custom referer used */
1630  bool http_auto_referer; /* set "correct" referer when following location: */
1631  bool opt_no_body; /* as set with CURLOPT_NOBODY */
1632  bool upload; /* upload request */
1634  use_netrc; /* defined in include/curl.h */
1635  bool verbose; /* output verbosity */
1636  bool krb; /* Kerberos connection requested */
1637  bool reuse_forbid; /* forbidden to be reused, close after use */
1638  bool reuse_fresh; /* do not re-use an existing connection */
1639  bool ftp_use_epsv; /* if EPSV is to be attempted or not */
1640  bool ftp_use_eprt; /* if EPRT is to be attempted or not */
1641  bool ftp_use_pret; /* if PRET is to be used before PASV or not */
1642 
1643  curl_usessl use_ssl; /* if AUTH TLS is to be attempted etc, for FTP or
1644  IMAP or POP3 or others! */
1645  curl_ftpauth ftpsslauth; /* what AUTH XXX to be attempted */
1646  curl_ftpccc ftp_ccc; /* FTP CCC options */
1647  bool no_signal; /* do not use any signal/alarm handler */
1648  bool global_dns_cache; /* subject for future removal */
1649  bool tcp_nodelay; /* whether to enable TCP_NODELAY or not */
1650  bool ignorecl; /* ignore content length */
1651  bool ftp_skip_ip; /* skip the IP address the FTP server passes on to
1652  us */
1653  bool connect_only; /* make connection, let application use the socket */
1654  long ssh_auth_types; /* allowed SSH auth types */
1655  bool http_te_skip; /* pass the raw body data to the user, even when
1656  transfer-encoded (chunked, compressed) */
1657  bool http_ce_skip; /* pass the raw body data to the user, even when
1658  content-encoded (chunked, compressed) */
1659  long new_file_perms; /* Permissions to use when creating remote files */
1660  long new_directory_perms; /* Permissions to use when creating remote dirs */
1661  bool proxy_transfer_mode; /* set transfer mode (;type=<a|i>) when doing FTP
1662  via an HTTP proxy */
1663  char *str[STRING_LAST]; /* array of strings, pointing to allocated memory */
1664  unsigned int scope_id; /* Scope id for IPv6 */
1667 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
1668  bool socks5_gssapi_nec; /* Flag to support NEC SOCKS5 server */
1669 #endif
1670  struct curl_slist *mail_rcpt; /* linked list of mail recipients */
1671  bool sasl_ir; /* Enable/disable SASL initial response */
1672  /* Common RTSP header options */
1673  Curl_RtspReq rtspreq; /* RTSP request type */
1674  long rtspversion; /* like httpversion, for RTSP */
1675  bool wildcardmatch; /* enable wildcard matching */
1676  curl_chunk_bgn_callback chunk_bgn; /* called before part of transfer
1677  starts */
1678  curl_chunk_end_callback chunk_end; /* called after part transferring
1679  stopped */
1680  curl_fnmatch_callback fnmatch; /* callback to decide which file corresponds
1681  to pattern (e.g. if WILDCARDMATCH is on) */
1683 
1684  long gssapi_delegation; /* GSS-API credential delegation, see the
1685  documentation of CURLOPT_GSSAPI_DELEGATION */
1686 
1687  bool tcp_keepalive; /* use TCP keepalives */
1688  long tcp_keepidle; /* seconds in idle before sending keepalive probe */
1689  long tcp_keepintvl; /* seconds between TCP keepalive probes */
1690  bool tcp_fastopen; /* use TCP Fast Open */
1691 
1692  size_t maxconnects; /* Max idle connections in the connection cache */
1693 
1694  bool ssl_enable_npn; /* TLS NPN extension? */
1695  bool ssl_enable_alpn; /* TLS ALPN extension? */
1696  bool path_as_is; /* allow dotdots? */
1697  bool pipewait; /* wait for pipe/multiplex status before starting a
1698  new connection */
1699  long expect_100_timeout; /* in milliseconds */
1700  bool suppress_connect_headers; /* suppress proxy CONNECT response headers
1701  from user callbacks */
1702 
1704  bool stream_depends_e; /* set or don't set the Exclusive bit */
1706 
1708 
1710 };
1711 
1712 struct Names {
1714  enum {
1715  HCACHE_NONE, /* not pointing to anything */
1716  HCACHE_GLOBAL, /* points to the (shrug) global one */
1717  HCACHE_MULTI, /* points to a shared one in the multi handle */
1718  HCACHE_SHARED /* points to a shared one in a shared object */
1719  } hostcachetype;
1720 };
1721 
1722 /*
1723  * The 'connectdata' struct MUST have all the connection oriented stuff as we
1724  * may have several simultaneous connections and connection structs in memory.
1725  *
1726  * The 'struct UserDefined' must only contain data that is set once to go for
1727  * many (perhaps) independent connections. Values that are generated or
1728  * calculated internally for the "session handle" must be defined within the
1729  * 'struct UrlState' instead.
1730  */
1731 
1732 struct Curl_easy {
1733  /* first, two fields for the linked list of these */
1734  struct Curl_easy *next;
1735  struct Curl_easy *prev;
1736 
1737  struct connectdata *easy_conn; /* the "unit's" connection */
1738  struct curl_llist_element connect_queue;
1739  struct curl_llist_element pipeline_queue;
1740 
1741  CURLMstate mstate; /* the handle's state */
1742  CURLcode result; /* previous result */
1743 
1744  struct Curl_message msg; /* A single posted message. */
1745 
1746  /* Array with the plain socket numbers this handle takes care of, in no
1747  particular order. Note that all sockets are added to the sockhash, where
1748  the state etc are also kept. This array is mostly used to detect when a
1749  socket is to be removed from the hash. See singlesocket(). */
1752 
1753  struct Names dns;
1754  struct Curl_multi *multi; /* if non-NULL, points to the multi handle
1755  struct to which this "belongs" when used by
1756  the multi interface */
1757  struct Curl_multi *multi_easy; /* if non-NULL, points to the multi handle
1758  struct to which this "belongs" when used
1759  by the easy interface */
1760  struct Curl_share *share; /* Share, handles global variable mutexing */
1761  struct SingleRequest req; /* Request-specific data */
1762  struct UserDefined set; /* values set by the libcurl user */
1763  struct DynamicStatic change; /* possibly modified userdefined data */
1764  struct CookieInfo *cookies; /* the cookies, read from files and servers.
1765  NOTE that the 'cookie' field in the
1766  UserDefined struct defines if the "engine"
1767  is to be used or not. */
1768  struct Progress progress; /* for all the progress meter data */
1769  struct UrlState state; /* struct for fields used for state info and
1770  other dynamic purposes */
1771  struct WildcardData wildcard; /* wildcard download state info */
1772  struct PureInfo info; /* stats, reports and info data */
1773  struct curl_tlssessioninfo tsi; /* Information about the TLS session, only
1774  valid after a client has asked for it */
1775 #if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
1776  iconv_t outbound_cd; /* for translating to the network encoding */
1777  iconv_t inbound_cd; /* for translating from the network encoding */
1778  iconv_t utf8_cd; /* for translating to UTF8 */
1779 #endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
1780  unsigned int magic; /* set to a CURLEASY_MAGIC_NUMBER */
1781 };
1782 
1783 #define LIBCURL_NAME "libcurl"
1784 
1785 #endif /* HEADER_CURL_URLDATA_H */
bool crlf
Definition: urldata.h:1566
long timeout
Definition: urldata.h:1547
bool timecond
Definition: urldata.h:1059
void * opensocket_client
Definition: urldata.h:1531
curl_ftpfile
Definition: ftp.h:93
char * str_start
Definition: urldata.h:551
bool errorbuf
Definition: urldata.h:1271
bool upload_chunky
Definition: urldata.h:606
struct connectdata * lastconnect
Definition: urldata.h:1248
curl_mimepart mimepost
Definition: urldata.h:1563
Definition: hash.h:46
long followlocation
Definition: urldata.h:1500
#define state(x, y)
Definition: ftp.c:100
bool tcp_fastopen
Definition: urldata.h:433
char * end_ptr
Definition: urldata.h:552
ssize_t( Curl_recv)(struct connectdata *conn, int sockindex, char *buf, size_t len, CURLcode *err)
Definition: urldata.h:737
int(* curl_fnmatch_callback)(void *ptr, const char *pattern, const char *string)
Definition: curl.h:335
struct Curl_easy * stream_depends_on
Definition: urldata.h:1703
char * upload_fromhere
Definition: urldata.h:603
bool tcp_nodelay
Definition: urldata.h:1649
const char * scheme
Definition: urldata.h:256
bool prev_block_had_trailing_cr
Definition: urldata.h:1324
int numsocks
Definition: urldata.h:1751
Curl_RtspReq
Definition: urldata.h:1152
bool bound
Definition: urldata.h:428
bool close
Definition: urldata.h:376
curl_write_callback fwrite_rtp
Definition: urldata.h:1518
char * errorbuffer
Definition: urldata.h:1488
int trlMax
Definition: urldata.h:994
char * issuercert
Definition: urldata.h:229
bool wildcardmatch
Definition: urldata.h:1675
struct curl_slist * source_prequote
Definition: urldata.h:1571
bool socksproxy_connecting
Definition: urldata.h:438
char * egdsocket
Definition: urldata.h:218
void * fnmatch_data
Definition: urldata.h:1682
curl_off_t resume_from
Definition: urldata.h:1338
curl_off_t size
Definition: urldata.h:519
expect100
Definition: urldata.h:496
static int domore_getsock(struct connectdata *conn, curl_socket_t *socks, int numsocks)
Definition: multi.c:843
struct curl_slist * prequote
Definition: urldata.h:1569
curl_opensocket_callback fopensocket
Definition: urldata.h:1528
bool printhost
Definition: urldata.h:1615
struct Curl_easy * stream_depends_on
Definition: urldata.h:1358
int waitfor
Definition: urldata.h:1011
unsigned char BYTE
int(* curl_xferinfo_callback)(void *clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
Definition: curl.h:211
bool opt_no_body
Definition: urldata.h:1631
size_t idsize
Definition: urldata.h:258
long numconnects
Definition: urldata.h:1065
bool ftp_append
Definition: urldata.h:1619
Definition: smtp.h:65
char * url
Definition: urldata.h:1372
int negnpn
Definition: urldata.h:1027
char * range
Definition: urldata.h:1336
long connecttimeout
Definition: urldata.h:1548
Curl_HttpReq
Definition: urldata.h:1139
struct Curl_multi * multi_easy
Definition: urldata.h:1757
long server_response_timeout
Definition: urldata.h:1550
void * writeheader
Definition: urldata.h:1494
unsigned long httpauth
Definition: urldata.h:1497
struct Curl_easy * data
Definition: urldata.h:1195
bool ftp_use_pret
Definition: urldata.h:1641
long rtsp_next_client_CSeq
Definition: urldata.h:1341
curl_off_t set_resume_from
Definition: urldata.h:1559
long filetime
Definition: urldata.h:1055
long request_size
Definition: urldata.h:1062
bool type_set
Definition: urldata.h:430
bool prefer_ascii
Definition: urldata.h:1618
const char * conn_scheme
Definition: urldata.h:1083
curl_proxytype
Definition: curl.h:664
bool ftp_use_data_ssl
Definition: urldata.h:419
bool include_header
Definition: urldata.h:1628
long ssh_auth_types
Definition: urldata.h:1654
char * most_recent_ftp_entrypath
Definition: urldata.h:1307
int cselect_bits
Definition: urldata.h:1010
bool http_keep_sending_on_error
Definition: urldata.h:1624
void * fsslctxp
Definition: urldata.h:231
char * first_host
Definition: urldata.h:1259
bool tunnel_thru_httpproxy
Definition: urldata.h:1617
long new_directory_perms
Definition: urldata.h:1660
int rtspversion
Definition: urldata.h:872
struct curl_slist * postquote
Definition: urldata.h:1568
int algo
Definition: urldata.h:283
ssl_connect_state connecting_state
Definition: urldata.h:201
curl_xferinfo_callback fxferinfo
Definition: urldata.h:1523
bool tcp_fastopen
Definition: urldata.h:1690
CURLcode result
Definition: urldata.h:1742
curl_socket_t maxfd
Definition: urldata.h:579
#define MAX_SOCKSPEREASYHANDLE
Definition: multihandle.h:64
bool protoconnstart
Definition: urldata.h:395
Definition: hostip.h:66
unsigned int scope_id
Definition: urldata.h:1664
bool ftp_use_eprt
Definition: urldata.h:416
struct Curl_http2_dep * stream_dependents
Definition: urldata.h:1707
const struct Curl_handler * handler
Definition: urldata.h:904
curl_socket_t sockfd
Definition: urldata.h:911
bool http_auto_referer
Definition: urldata.h:1630
bool pipewait
Definition: urldata.h:1697
int conn_to_port
Definition: urldata.h:843
bool inuse
Definition: urldata.h:803
struct Curl_multi * multi
Definition: urldata.h:1754
bool pipe_broke
Definition: urldata.h:1316
CURLcode
Definition: curl.h:454
char * cert_type
Definition: urldata.h:236
long conn_primary_port
Definition: urldata.h:1078
curl_ftpccc
Definition: curl.h:804
bool referer_alloc
Definition: urldata.h:1375
bool stream_depends_e
Definition: urldata.h:1359
CURLcode(* curl_conv_callback)(char *buffer, size_t length)
Definition: curl.h:657
int(* curl_closesocket_callback)(void *clientp, curl_socket_t item)
Definition: curl.h:393
struct Curl_dns_entry * dns_entry
Definition: urldata.h:816
CURL_NETRC_OPTION
Definition: curl.h:1901
bool http_transfer_encoding
Definition: urldata.h:1626
curl_off_t uploaded
Definition: urldata.h:1098
struct curl_slist * connect_to
Definition: urldata.h:1578
int httpproxycode
Definition: urldata.h:1053
struct curltime now
Definition: unit1399.c:83
#define CURR_TIME
Definition: urldata.h:1132
bool http_fail_on_error
Definition: urldata.h:1623
bool slash_removed
Definition: urldata.h:1331
char * encalloc
Definition: urldata.h:443
size_t buf_len
Definition: urldata.h:962
bool stream_depends_e
Definition: urldata.h:1704
long rtsp_CSeq_recv
Definition: urldata.h:1343
char * key_type
Definition: urldata.h:238
#define CONNECT_BUFFER_SIZE
Definition: urldata.h:765
bool tls_upgraded
Definition: urldata.h:891
bool global_dns_cache
Definition: urldata.h:1648
Curl_HttpReq httpreq
Definition: urldata.h:1582
static char * password
Definition: unit1304.c:27
bool http_te_skip
Definition: urldata.h:1655
bool header
Definition: urldata.h:538
bool authneg
Definition: urldata.h:404
size_t max_ssl_sessions
Definition: urldata.h:249
struct curl_slist * telnet_options
Definition: urldata.h:1575
bool conn_to_port
Definition: urldata.h:380
struct curl_slist * headers
Definition: urldata.h:1560
time_t t_pretransfer
Definition: urldata.h:1114
curl_conv_callback convtonetwork
Definition: urldata.h:1541
struct curl_slist * resolve
Definition: urldata.h:1576
bool iestyle
Definition: urldata.h:1189
curl_fnmatch_callback fnmatch
Definition: urldata.h:1680
curl_sshkeycallback ssh_keyfunc
Definition: urldata.h:1607
char * oauth_bearer
Definition: urldata.h:869
void * seek_client
Definition: urldata.h:1536
struct gss_name_t_desc_struct * gss_name_t
Definition: stub_gssapi.h:85
long use_port
Definition: urldata.h:1496
bool expect100header
Definition: urldata.h:1314
bool tftp_no_options
Definition: urldata.h:1552
curl_off_t filesize
Definition: urldata.h:1553
bool connect_only
Definition: urldata.h:1653
int stream_weight
Definition: urldata.h:1360
struct curl_slist * quote
Definition: urldata.h:1567
char * name
Definition: urldata.h:444
bool ftp_list_only
Definition: urldata.h:1620
void * out
Definition: urldata.h:1492
char buffer[]
Definition: unit1308.c:48
struct curl_hash * hostcache
Definition: urldata.h:1713
long conn_local_port
Definition: urldata.h:1081
int(* curl_seek_callback)(void *instream, curl_off_t offset, int origin)
Definition: curl.h:344
struct Curl_share * share
Definition: urldata.h:1760
curl_usessl use_ssl
Definition: urldata.h:1643
bool upload_done
Definition: urldata.h:583
bool this_is_a_follow
Definition: urldata.h:1257
int flags
Definition: urldata.h:1104
char * nonce
Definition: urldata.h:280
char * clientcert
Definition: urldata.h:216
ssize_t upload_present
Definition: urldata.h:597
bool ftp_skip_ip
Definition: urldata.h:1651
char * p
Definition: urldata.h:553
int(* curl_debug_callback)(CURL *handle, curl_infotype type, char *data, size_t size, void *userptr)
Definition: curl.h:441
time_t t_appconnect
Definition: urldata.h:1113
int httpcode
Definition: urldata.h:1052
bool no_revoke
Definition: urldata.h:226
bool do_more
Definition: urldata.h:391
size_t len
Definition: curl_sasl.c:55
bool enable_beast
Definition: urldata.h:224
curl_off_t offset
Definition: urldata.h:555
expire_id eid
Definition: urldata.h:1232
void * sessionid
Definition: urldata.h:257
curl_seek_callback seek_func
Definition: urldata.h:965
char * passwd
Definition: urldata.h:866
unsigned int protocol
Definition: urldata.h:694
bool ignorecl
Definition: urldata.h:1650
time_t t_starttransfer
Definition: urldata.h:1115
curl_chunk_end_callback chunk_end
Definition: urldata.h:1678
curl_ftpccc ftp_ccc
Definition: urldata.h:1646
long headerbytecount
Definition: urldata.h:529
long maxredirs
Definition: urldata.h:1501
const char * scheme
Definition: urldata.h:623
ssl_connection_state state
Definition: urldata.h:200
long httpversion
Definition: urldata.h:1583
time_t timeofdoc
Definition: urldata.h:575
bool suppress_connect_headers
Definition: urldata.h:1700
curl_sockopt_callback fsockopt
Definition: urldata.h:1526
char * buf
Definition: urldata.h:578
#define MAX_IPADR_LEN
Definition: urldata.h:75
bool chunked_encoding
Definition: urldata.h:775
curl_off_t current_speed
Definition: urldata.h:1100
int headerline
Definition: urldata.h:546
curl_ftpauth ftpsslauth
Definition: urldata.h:1645
struct connectdata * easy_conn
Definition: urldata.h:1737
curl_off_t postfieldsize
Definition: urldata.h:1510
char * opaque
Definition: urldata.h:285
bool content_range
Definition: urldata.h:554
unsigned int conn_protocol
Definition: urldata.h:1084
long allowed_protocols
Definition: urldata.h:1665
Definition: urldata.h:1179
bool falsestart
Definition: urldata.h:233
Curl_addrinfo * ip_addr
Definition: urldata.h:821
bool userpwd_in_url
Definition: urldata.h:421
bool reuse_forbid
Definition: urldata.h:1637
int httpversion
Definition: urldata.h:871
expire_id
Definition: urldata.h:1212
char * CRLfile
Definition: urldata.h:228
void * debugdata
Definition: urldata.h:1487
bool http_follow_location
Definition: urldata.h:1625
curl_ftpfile ftp_filemethod
Definition: urldata.h:1601
bool ipv6
Definition: urldata.h:389
curl_closesocket_callback fclosesocket
Definition: urldata.h:1532
int nc
Definition: urldata.h:288
int localportrange
Definition: urldata.h:1024
bool cookiesession
Definition: urldata.h:1565
const char * str
Definition: unit1398.c:33
char * buffer
Definition: urldata.h:1253
char * conn_to_host
Definition: urldata.h:255
char * contenttype
Definition: urldata.h:1066
size_t len
Definition: urldata.h:1206
bool tls_enable_npn
Definition: urldata.h:434
char * referer
Definition: urldata.h:1374
bool readchannel_inuse
Definition: urldata.h:951
bool stale
Definition: urldata.h:284
struct curl_slist * mail_rcpt
Definition: urldata.h:1670
unsigned int flags
Definition: urldata.h:696
char * localdev
Definition: urldata.h:1022
char * line_start
Definition: urldata.h:772
bool abstract_unix_socket
Definition: urldata.h:1709
int speeder_c
Definition: urldata.h:1136
char * key
Definition: urldata.h:237
bool hide_progress
Definition: urldata.h:1622
time_t t_nslookup
Definition: urldata.h:1111
long new_file_perms
Definition: urldata.h:1659
bool tls_enable_alpn
Definition: urldata.h:435
long deductheadercount
Definition: urldata.h:530
void * in_set
Definition: urldata.h:1493
Curl_done_func done
Definition: urldata.h:630
char * algorithm
Definition: urldata.h:287
curl_off_t infilesize
Definition: urldata.h:1345
struct curl_slist * http200aliases
Definition: urldata.h:1594
unsigned short localport
Definition: urldata.h:1023
long low_speed_limit
Definition: urldata.h:1554
long rtspversion
Definition: urldata.h:1674
void * progress_client
Definition: urldata.h:1545
char * buf
Definition: urldata.h:1204
bool free_referer
Definition: urldata.h:1506
bool url_alloc
Definition: urldata.h:1373
bool allow_port
Definition: urldata.h:1279
int(* curl_sockopt_callback)(void *clientp, curl_socket_t curlfd, curlsocktype purpose)
Definition: curl.h:373
bool proxy
Definition: urldata.h:382
curl_TimeCond
Definition: curl.h:1955
char * cert
Definition: urldata.h:235
bool ignorebody
Definition: urldata.h:586
bool ssl_enable_alpn
Definition: urldata.h:1695
bool use_range
Definition: urldata.h:1333
bool httpproxy
Definition: urldata.h:383
static curl_socket_t sockets[MAX_EASY_HANDLES]
static void negotiate(struct connectdata *)
Definition: telnet.c:293
char * cipher_list
Definition: urldata.h:219
bool tunnel_proxy
Definition: urldata.h:400
curl_socket_t(* curl_opensocket_callback)(void *clientp, curlsocktype purpose, struct curl_sockaddr *address)
Definition: curl.h:388
bool http_disable_hostname_check_before_authentication
Definition: urldata.h:1627
curl_off_t cl
Definition: urldata.h:774
CURLcode(* curl_ssl_ctx_callback)(CURL *curl, void *ssl_ctx, void *userptr)
Definition: curl.h:659
UNITTEST_START struct Curl_easy data
Definition: unit1399.c:82
bool getheader
Definition: urldata.h:608
bool user_passwd
Definition: urldata.h:385
curl_off_t downloaded
Definition: urldata.h:1097
curl_proxytype proxytype
Definition: urldata.h:1589
bool is_t_startransfer_set
Definition: urldata.h:1123
struct curl_slist * source_postquote
Definition: urldata.h:1573
long low_speed_time
Definition: urldata.h:1555
char * wouldredirect
Definition: urldata.h:1067
bool tcp_keepalive
Definition: urldata.h:1687
struct http_connect_state * connect_state
Definition: urldata.h:1025
bool writechannel_inuse
Definition: urldata.h:953
long connection_id
Definition: urldata.h:809
curlioerr(* curl_ioctl_callback)(CURL *handle, int cmd, void *clientp)
Definition: curl.h:408
long bodywrites
Definition: urldata.h:576
void * closesocket_client
Definition: urldata.h:1534
bool forbidchunk
Definition: urldata.h:610
unsigned long proxyauth
Definition: urldata.h:1498
bool ftp_use_eprt
Definition: urldata.h:1640
long expect_100_timeout
Definition: urldata.h:1699
bool multi_owned_by_easy
Definition: urldata.h:1243
Definition: rtsp.h:41
int httpversion
Definition: urldata.h:1054
CURL_TYPEOF_CURL_OFF_T curl_off_t
Definition: system.h:420
struct curl_httppost * httppost
Definition: urldata.h:1562
void * ssh_keyfunc_userp
Definition: urldata.h:1608
long gssapi_delegation
Definition: urldata.h:1684
struct CookieInfo * cookies
Definition: urldata.h:1764
int socktype
Definition: urldata.h:831
char * passwd
Definition: urldata.h:762
long redir_protocols
Definition: urldata.h:1666
size_t(* curl_read_callback)(char *buffer, size_t size, size_t nitems, void *instream)
Definition: curl.h:355
char * headerbuff
Definition: urldata.h:1250
curl_ssl_ctx_callback fsslctx
Definition: urldata.h:230
#define UPLOAD_BUFSIZE
Definition: urldata.h:137
ssl_connection_state
Definition: urldata.h:185
bool callback
Definition: urldata.h:1102
bool ftp_use_epsv
Definition: urldata.h:412
uint32_t OM_uint32
Definition: stub_gssapi.h:67
char * options
Definition: urldata.h:867
void * ioctl_client
Definition: urldata.h:1546
const struct Curl_handler * given
Definition: urldata.h:905
int os_errno
Definition: urldata.h:1274
char * pathbuffer
Definition: urldata.h:1328
int first_remote_port
Definition: urldata.h:1265
char * path
Definition: urldata.h:1329
Definition: ssh.h:110
ssize_t( Curl_send)(struct connectdata *conn, int sockindex, const void *buf, size_t len, CURLcode *err)
Definition: urldata.h:730
long port
Definition: urldata.h:759
bool conn_to_host
Definition: urldata.h:378
struct curl_slist * cookielist
Definition: urldata.h:1376
int trlPos
Definition: urldata.h:995
char * random_file
Definition: urldata.h:217
void * protop
Definition: urldata.h:614
curl_conv_callback convfromutf8
Definition: urldata.h:1543
static unsigned short port
Definition: sockfilt.c:137
long tftp_blksize
Definition: urldata.h:1551
dupstring
Definition: urldata.h:1393
curl_off_t dl_limit_size
Definition: urldata.h:1130
curl_off_t ulspeed
Definition: urldata.h:1109
curl_socket_t writesockfd
Definition: urldata.h:912
curl_ioctl_callback ioctl_func
Definition: urldata.h:1525
bool chunk
Definition: urldata.h:605
bool multipass
Definition: urldata.h:1187
TFSIMD_FORCE_INLINE const tfScalar & z() const
int width
Definition: urldata.h:1103
void * closesocket_client
Definition: urldata.h:801
struct curl_slist * source_quote
Definition: urldata.h:1570
bool stream_was_rewound
Definition: urldata.h:422
unsigned short secondary_port
Definition: urldata.h:845
CURLcode(* Curl_do_more_func)(struct connectdata *, int *)
Definition: urldata.h:493
time_t timeoutms_per_addr
Definition: urldata.h:901
bool get_filetime
Definition: urldata.h:1616
unsigned int magic
Definition: urldata.h:1780
int localportrange
Definition: urldata.h:1514
size_t hbuflen
Definition: urldata.h:549
bool strip_path_slash
Definition: urldata.h:1585
time_t timevalue
Definition: urldata.h:1581
long defport
Definition: urldata.h:693
curl_off_t dlspeed
Definition: urldata.h:1108
int(* curl_progress_callback)(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
Definition: curl.h:203
bool reuse_fresh
Definition: urldata.h:1638
CURLMstate mstate
Definition: urldata.h:1741
int type
Definition: urldata.h:1207
bool rewindaftersend
Definition: urldata.h:408
curl_off_t max_send_speed
Definition: urldata.h:1556
long proxyport
Definition: urldata.h:1489
curl_off_t writebytecount
Definition: urldata.h:527
curl_write_callback fwrite_func
Definition: urldata.h:1516
bool netrc
Definition: urldata.h:420
struct curl_slist * proxyheaders
Definition: urldata.h:1561
long(* curl_chunk_end_callback)(void *ptr)
Definition: curl.h:326
time_t timespent
Definition: urldata.h:1106
size_t(* curl_write_callback)(char *buffer, size_t size, size_t nitems, void *outstream)
Definition: curl.h:243
curl_usessl
Definition: curl.h:768
unsigned long proxyauthavail
Definition: urldata.h:1063
time_t t_connect
Definition: urldata.h:1112
curl_off_t * writebytecountp
Definition: urldata.h:524
#define ssize_t
Definition: config-win32.h:382
int keep_post
Definition: urldata.h:1504
Definition: imap.h:70
CURLcode(* Curl_done_func)(struct connectdata *, CURLcode, bool)
Definition: urldata.h:494
curl_progress_callback fprogress
Definition: urldata.h:1522
curl_off_t size_dl
Definition: urldata.h:1095
long ip_version
Definition: urldata.h:907
struct curl_ssl_session * session
Definition: urldata.h:1266
bool ssl_enable_npn
Definition: urldata.h:1694
char * newurl
Definition: urldata.h:592
bool reuse
Definition: urldata.h:377
int num_addr
Definition: urldata.h:900
curl_closesocket_callback fclosesocket
Definition: urldata.h:800
char * hbufp
Definition: urldata.h:548
int is_fwrite_set
Definition: urldata.h:1521
int auto_decoding
Definition: urldata.h:563
bool proxy_user_passwd
Definition: urldata.h:386
CURL_TLSAUTH
Definition: curl.h:1937
time_t t_redirect
Definition: urldata.h:1116
curl_chunk_bgn_callback chunk_bgn
Definition: urldata.h:1676
int(* curl_sshkeycallback)(CURL *easy, const struct curl_khkey *knownkey, const struct curl_khkey *foundkey, enum curl_khmatch, void *clientp)
Definition: curl.h:761
curl_TimeCond timecondition
Definition: urldata.h:1580
long local_port
Definition: urldata.h:863
curl_read_callback fread_func_set
Definition: urldata.h:1519
bool krb
Definition: urldata.h:1636
char * location
Definition: urldata.h:590
bool done
Definition: urldata.h:1185
char * scratch
Definition: urldata.h:1270
int httpversion
Definition: urldata.h:1312
void * in
Definition: urldata.h:1356
size_t read_pos
Definition: urldata.h:961
char * cnonce
Definition: urldata.h:281
struct Curl_easy * prev
Definition: urldata.h:1735
curl_off_t max_recv_speed
Definition: urldata.h:1557
unsigned long avail
Definition: urldata.h:1183
bool path_as_is
Definition: urldata.h:1696
unsigned long picked
Definition: urldata.h:1182
unsigned int scope_id
Definition: urldata.h:829
struct curl_slist * resolve
Definition: urldata.h:1378
char buf[3]
Definition: unit1398.c:32
struct connectbundle * bundle
Definition: urldata.h:1026
struct Curl_http2_dep * next
Definition: urldata.h:1194
curl_off_t * bytecountp
Definition: urldata.h:520
int stream_weight
Definition: urldata.h:1705
upgrade101
Definition: urldata.h:504
char * trailer
Definition: urldata.h:993
bool ftp_use_port
Definition: urldata.h:1621
bool verbose
Definition: urldata.h:1635
long accepttimeout
Definition: urldata.h:1549
void * postfields
Definition: urldata.h:1508
char * rawalloc
Definition: urldata.h:442
curl_off_t max_filesize
Definition: urldata.h:1599
long tcp_keepidle
Definition: urldata.h:1688
curl_off_t crlf_conversions
Definition: urldata.h:1326
char * qop
Definition: urldata.h:286
unsigned int tempcount
Definition: urldata.h:1268
void * resolver
Definition: urldata.h:1294
curlntlm
Definition: urldata.h:292
curl_read_callback fread_func
Definition: urldata.h:1355
curl_write_callback fwrite_header
Definition: urldata.h:1517
bool ipv6_ip
Definition: urldata.h:387
bool rangestringalloc
Definition: urldata.h:1334
long ipver
Definition: urldata.h:1596
curl_debug_callback fdebug
Definition: urldata.h:1524
long port
Definition: urldata.h:841
void * seek_client
Definition: urldata.h:966
ssl_connect_state
Definition: urldata.h:176
size_t drain
Definition: urldata.h:1348
char * str
Definition: urldata.h:550
void * rtp_out
Definition: urldata.h:1495
FILE * err
Definition: urldata.h:1486
size_t size
Definition: unit1302.c:52
curl_seek_callback seek_func
Definition: urldata.h:1509
Definition: pop3.h:60
char * master_buffer
Definition: urldata.h:959
curl_off_t ul_limit_size
Definition: urldata.h:1127
size_t headersize
Definition: urldata.h:1251
unsigned long want
Definition: urldata.h:1180
Definition: ftp.h:118
curl_proxytype proxytype
Definition: urldata.h:760
long primary_port
Definition: urldata.h:856
bool retry
Definition: urldata.h:398
struct tftp_state_data * tftpc
Definition: urldata.h:1001
Definition: smb.h:33
bool socksproxy
Definition: urldata.h:384
long rtsp_next_server_CSeq
Definition: urldata.h:1342
bool http_ce_skip
Definition: urldata.h:1657
time_t lastshow
Definition: urldata.h:1093
curl_off_t size_ul
Definition: urldata.h:1096
int curl_socket_t
Definition: curl.h:130
char * secondaryhostname
Definition: urldata.h:834
struct Curl_easy * next
Definition: urldata.h:1734
bool ssh_compression
Definition: urldata.h:1609
int is_fread_set
Definition: urldata.h:1520
long dns_cache_timeout
Definition: urldata.h:1590
bool sep_headers
Definition: urldata.h:1564
unsigned long httpauthavail
Definition: urldata.h:1064
long certverifyresult
Definition: urldata.h:227
bool no_signal
Definition: urldata.h:1647
long buffer_size
Definition: urldata.h:1591
int httpcode
Definition: urldata.h:557
bool ftp_use_epsv
Definition: urldata.h:1639
char * realm
Definition: urldata.h:282
struct conncache * conn_cache
Definition: urldata.h:1238
unsigned long socks5auth
Definition: urldata.h:1499
long sessionage
Definition: urldata.h:1267
char * user
Definition: urldata.h:761
bool upload
Definition: urldata.h:1632
long(* curl_chunk_bgn_callback)(const void *transfer_info, void *ptr, int remains)
Definition: curl.h:312
CURLMstate
Definition: multihandle.h:36
const char * dispname
Definition: urldata.h:445
curl_off_t bytecount
Definition: urldata.h:526
bool multiplex
Definition: urldata.h:431
bool http_set_referer
Definition: urldata.h:1629
long header_size
Definition: urldata.h:1061
long tcp_keepintvl
Definition: urldata.h:1689
Curl_RtspReq rtspreq
Definition: urldata.h:1673
void * sockopt_client
Definition: urldata.h:1527
bool ftp_trying_alternative
Definition: urldata.h:1310
bool authproblem
Definition: urldata.h:1292
int remote_port
Definition: urldata.h:842
char * user
Definition: urldata.h:865
char * key_passwd
Definition: urldata.h:239
bool ignorecl
Definition: urldata.h:587
curl_ftpauth
Definition: curl.h:812
curl_conv_callback convfromnetwork
Definition: urldata.h:1539
bool sasl_ir
Definition: urldata.h:1671
curl_off_t maxdownload
Definition: urldata.h:522
unsigned short localport
Definition: urldata.h:1513
Curl_do_more_func do_more
Definition: urldata.h:636
bool proxy_transfer_mode
Definition: urldata.h:1661
void * private_data
Definition: urldata.h:1592
bool done
Definition: urldata.h:1351
bool proxy_connect_closed
Definition: urldata.h:425
Dynamicly allocated strings, MUST be freed before this.
Definition: urldata.h:918
int ftp_create_missing_dirs
Definition: urldata.h:1603
size_t maxconnects
Definition: urldata.h:1692
curl_off_t current_speed
Definition: urldata.h:1255
struct Curl_easy * data
Definition: urldata.h:791


rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:16