Newer
Older
that subsequent bound-requested connections aren't accidentally re-using
wrong connections. */
char *localdev;
unsigned short localport;
int localportrange;
/* tunnel as in tunnel through a HTTP proxy with CONNECT */
enum {
TUNNEL_INIT, /* init/default/no tunnel state */
TUNNEL_CONNECT, /* CONNECT has been sent off */
TUNNEL_COMPLETE /* CONNECT response received completely */
} tunnel_state[2]; /* two separate ones to allow FTP */
struct connectbundle *bundle; /* The bundle we are member of */
Daniel Stenberg
committed
};
/* The end of connectdata. */
Daniel Stenberg
committed
/*
* Struct to keep statistical and informational data.
*/
struct PureInfo {
Daniel Stenberg
committed
int httpcode; /* Recent HTTP, FTP, or RTSP response code */
Daniel Stenberg
committed
int httpproxycode; /* response code from proxy when received separate */
int httpversion; /* the http version number X.Y = X*10+Y */
Daniel Stenberg
committed
long filetime; /* If requested, this is might get set. Set to -1 if the time
was unretrievable. We cannot have this of type time_t,
since time_t is unsigned on several platforms such as
OpenVMS. */
Daniel Stenberg
committed
bool timecond; /* set to TRUE if the time condition didn't match, which
thus made the document NOT get fetched */
Daniel Stenberg
committed
long header_size; /* size of read header(s) in bytes */
long request_size; /* the amount of bytes sent in the request(s) */
unsigned long proxyauthavail; /* what proxy auth types were announced */
unsigned long httpauthavail; /* what host auth types were announced */
long numconnects; /* how many new connection did libcurl created */
char *contenttype; /* the content type of the object */
Daniel Stenberg
committed
char *wouldredirect; /* URL this would've been redirected to if asked to */
/* PureInfo members 'conn_primary_ip', 'conn_primary_port', 'conn_local_ip'
and, 'conn_local_port' are copied over from the connectdata struct in
order to allow curl_easy_getinfo() to return this information even when
the session handle is no longer associated with a connection, and also
allow curl_easy_reset() to clear this information from the session handle
without disturbing information which is still alive, and that might be
reused, in the connection cache. */
char conn_primary_ip[MAX_IPADR_LEN];
long conn_primary_port;
char conn_local_ip[MAX_IPADR_LEN];
long conn_local_port;
Daniel Stenberg
committed
struct curl_certinfo certs; /* info about the certs, only populated in
OpenSSL builds. Asked for with
CURLOPT_CERTINFO / CURLINFO_CERTINFO */
Daniel Stenberg
committed
long lastshow; /* time() of the last displayed progress meter or NULL to
force redraw at next call */
Daniel Stenberg
committed
curl_off_t size_dl; /* total expected size */
curl_off_t size_ul; /* total expected size */
curl_off_t downloaded; /* transferred so far */
curl_off_t uploaded; /* transferred so far */
Daniel Stenberg
committed
curl_off_t current_speed; /* uses the currently fastest transfer */
bool callback; /* set when progress callback is used */
int width; /* screen width at download start */
int flags; /* see progress.h */
Daniel Stenberg
committed
curl_off_t dlspeed;
curl_off_t ulspeed;
Daniel Stenberg
committed
double t_nslookup;
double t_connect;
double t_appconnect;
double t_pretransfer;
double t_redirect;
Daniel Stenberg
committed
struct timeval start;
struct timeval t_startsingle;
struct timeval t_acceptdata;
#define CURR_TIME (5+1) /* 6 entries for 5 seconds */
Daniel Stenberg
committed
curl_off_t speeder[ CURR_TIME ];
Daniel Stenberg
committed
typedef enum {
HTTPREQ_NONE, /* first in list */
HTTPREQ_GET,
HTTPREQ_POST,
HTTPREQ_POST_FORM, /* we make a difference internally */
HTTPREQ_PUT,
Daniel Stenberg
committed
HTTPREQ_HEAD,
Daniel Stenberg
committed
HTTPREQ_CUSTOM,
HTTPREQ_LAST /* last in list */
} Curl_HttpReq;
Daniel Stenberg
committed
typedef enum {
RTSPREQ_NONE, /* first in list */
RTSPREQ_OPTIONS,
RTSPREQ_DESCRIBE,
RTSPREQ_ANNOUNCE,
RTSPREQ_SETUP,
RTSPREQ_PLAY,
RTSPREQ_PAUSE,
RTSPREQ_TEARDOWN,
RTSPREQ_GET_PARAMETER,
RTSPREQ_SET_PARAMETER,
RTSPREQ_RECORD,
RTSPREQ_RECEIVE,
RTSPREQ_LAST /* last in list */
} Curl_RtspReq;
Daniel Stenberg
committed
/*
* Values that are generated, temporary or calculated internally for a
* "session handle" must be defined within the 'struct UrlState'. This struct
Daniel Stenberg
committed
* will be used within the SessionHandle struct. When the 'SessionHandle'
* struct is cloned, this data MUST NOT be copied.
*
* Remember that any "state" information goes globally for the curl handle.
* Session-data MUST be put in the connectdata struct and here. */
#define MAX_CURL_USER_LENGTH 256
#define MAX_CURL_PASSWORD_LENGTH 256
#define MAX_CURL_USER_LENGTH_TXT "255"
#define MAX_CURL_PASSWORD_LENGTH_TXT "255"
Daniel Stenberg
committed
unsigned long want; /* Bitmask set to the authentication methods wanted by
app (with CURLOPT_HTTPAUTH or CURLOPT_PROXYAUTH). */
unsigned long picked;
unsigned long avail; /* Bitmask for what the server reports to support for
this resource */
bool done; /* TRUE when the auth phase is done and ready to do the *actual*
request */
bool multi; /* TRUE if this is not yet authenticated but within the auth
multipass negotiation */
bool iestyle; /* TRUE if digest should be done IE-style or FALSE if it should
be RFC compliant */
Daniel Stenberg
committed
struct UrlState {
/* Points to the connection cache */
struct conncache *conn_cache;
/* when curl_easy_perform() is called, the multi handle is "owned" by
the easy handle so curl_easy_cleanup() on such an easy handle will
also close the multi handle! */
bool multi_owned_by_easy;
Daniel Stenberg
committed
/* buffers to store authentication data in, as parsed from input options */
struct timeval keeps_speed; /* for the progress meter really */
struct connectdata *pending_conn; /* This points to the connection we want
to open when we are waiting in the
CONNECT_PEND state in the multi
interface. This to avoid recreating it
when we enter the CONNECT state again.
*/
struct connectdata *lastconnect; /* The last connection, NULL if undefined */
Daniel Stenberg
committed
char *headerbuff; /* allocated buffer to store headers in */
size_t headersize; /* size of the allocation */
Daniel Stenberg
committed
char buffer[BUFSIZE+1]; /* download buffer */
char uploadbuffer[BUFSIZE+1]; /* upload buffer */
curl_off_t current_speed; /* the ProgressShow() funcion sets this,
bytes / second */
Daniel Stenberg
committed
bool this_is_a_follow; /* this is a followed Location: request */
Daniel Stenberg
committed
Daniel Stenberg
committed
char *first_host; /* if set, this should be the host name that we will
sent authorization to, no else. Used to make Location:
following not keep sending user+password... This is
strdup() data.
Daniel Stenberg
committed
*/
struct curl_ssl_session *session; /* array of 'max_ssl_sessions' size */
Daniel Stenberg
committed
long sessionage; /* number of the most recent session */
Daniel Stenberg
committed
char *tempwrite; /* allocated buffer to keep data in when a write
callback returns to make the connection paused */
size_t tempwritesize; /* size of the 'tempwrite' allocated buffer */
int tempwritetype; /* type of the 'tempwrite' buffer as a bitmask that is
used with Curl_client_write() */
char *scratch; /* huge buffer[BUFSIZE*2] when doing upload CRLF replacing */
Daniel Stenberg
committed
bool errorbuf; /* Set to TRUE if the error buffer is already filled in.
This must be set to FALSE every time _easy_perform() is
called. */
Daniel Stenberg
committed
int os_errno; /* filled in with errno whenever an error occurs */
#ifdef HAVE_SIGNAL
/* storage for the previous bag^H^H^HSIGPIPE signal handler :-) */
void (*prev_signal)(int sig);
#endif
bool allow_port; /* Is set.use_port allowed to take effect or not. This
is always set TRUE when curl_easy_perform() is called. */
struct digestdata digest; /* state data for host Digest auth */
struct digestdata proxydigest; /* state data for proxy Digest auth */
#ifdef USE_HTTP_NEGOTIATE
Daniel Stenberg
committed
struct negotiatedata negotiate; /* state data for host Negotiate auth */
struct negotiatedata proxyneg; /* state data for proxy Negotiate auth */
#endif
struct auth authhost; /* auth details for host */
struct auth authproxy; /* auth details for proxy */
Daniel Stenberg
committed
Daniel Stenberg
committed
bool authproblem; /* TRUE if there's some problem authenticating */
void *resolver; /* resolver state, if it is used in the URL state -
ares_channel f.e. */
Daniel Stenberg
committed
#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
ENGINE *engine;
#endif /* USE_SSLEAY */
Daniel Stenberg
committed
struct timeval expiretime; /* set this with Curl_expire() only */
struct Curl_tree timenode; /* for the splay stuff */
struct curl_llist *timeoutlist; /* list of pending timeouts */
/* a place to store the most recently set FTP entrypath */
char *most_recent_ftp_entrypath;
Daniel Stenberg
committed
/* set after initial USER failure, to prevent an authentication loop */
bool ftp_trying_alternative;
int httpversion; /* the lowest HTTP version*10 reported by any server
involved in this request */
Daniel Stenberg
committed
bool expect100header; /* TRUE if we added Expect: 100-continue */
bool pipe_broke; /* TRUE if the connection we were pipelined on broke
and we need to restart from the beginning */
#if !defined(WIN32) && !defined(MSDOS) && !defined(__EMX__) && \
!defined(__SYMBIAN32__)
/* do FTP line-end conversions on most platforms */
#define CURL_DO_LINEEND_CONV
/* for FTP downloads: track CRLF sequences that span blocks */
bool prev_block_had_trailing_cr;
/* for FTP downloads: how many CRLFs did we converted to LFs? */
Daniel Stenberg
committed
curl_off_t crlf_conversions;
#endif
Daniel Stenberg
committed
char *pathbuffer;/* allocated buffer to store the URL's path part in */
char *path; /* path to use, points to somewhere within the pathbuffer
area */
bool slash_removed; /* set TRUE if the 'path' points to a path where the
initial URL slash separator has been taken off */
Daniel Stenberg
committed
bool use_range;
bool rangestringalloc; /* the range string is malloc()'ed */
char *range; /* range, if used. See README for detailed specification on
this syntax. */
curl_off_t resume_from; /* continue [ftp] transfer from here */
Daniel Stenberg
committed
/* This RTSP state information survives requests and connections */
long rtsp_next_client_CSeq; /* the session's next client CSeq */
long rtsp_next_server_CSeq; /* the session's next server CSeq */
long rtsp_CSeq_recv; /* most recent CSeq received */
Daniel Stenberg
committed
/* Protocol specific data.
*
*************************************************************************
* Note that this data will be REMOVED after each request, so anything that
* should be kept/stored on a per-connection basis and thus live for the
* next request on the same connection MUST be put in the connectdata struct!
Daniel Stenberg
committed
*************************************************************************/
union {
struct HTTP *http;
struct HTTP *https; /* alias, just for the sake of being more readable */
Daniel Stenberg
committed
struct RTSP *rtsp;
Daniel Stenberg
committed
struct FTP *ftp;
Daniel Stenberg
committed
/* void *tftp; not used */
Daniel Stenberg
committed
struct FILEPROTO *file;
void *telnet; /* private for telnet.c-eyes only */
Daniel Stenberg
committed
void *generic;
struct SSHPROTO *ssh;
struct FTP *imap;
struct FTP *pop3;
struct FTP *smtp;
Daniel Stenberg
committed
} proto;
/* current user of this SessionHandle instance, or NULL */
struct connectdata *current_conn;
/* if true, force SSL connection retry (workaround for certain servers) */
bool ssl_connect_retry;
Daniel Stenberg
committed
Daniel Stenberg
committed
* This 'DynamicStatic' struct defines dynamic states that actually change
* values in the 'UserDefined' area, which MUST be taken into consideration
* if the UserDefined struct is cloned or similar. You can probably just
* copy these, but each one indicate a special action on other data.
*/
struct DynamicStatic {
char *url; /* work URL, copied from UserDefined */
bool url_alloc; /* URL string is malloc()'ed */
char *referer; /* referer string */
bool referer_alloc; /* referer sting is malloc()ed */
Daniel Stenberg
committed
struct curl_slist *cookielist; /* list of cookie files set by
curl_easy_setopt(COOKIEFILE) calls */
struct curl_slist *resolve; /* set to point to the set.resolve list when
this should be dealt with in pretransfer */
Daniel Stenberg
committed
};
/*
* This 'UserDefined' struct must only contain data that is set once to go
* for many (perhaps) independent connections. Values that are generated or
Daniel Stenberg
committed
* calculated internally for the "session handle" MUST be defined within the
* 'struct UrlState' instead. The only exceptions MUST note the changes in
Daniel Stenberg
committed
* the 'DynamicStatic' struct.
Daniel Stenberg
committed
* Character pointer fields point to dynamic storage, unless otherwise stated.
struct Curl_one_easy; /* declared and used only in multi.c */
struct Curl_multi; /* declared and used only in multi.c */
Daniel Stenberg
committed
enum dupstring {
STRING_CERT, /* client certificate file name */
STRING_CERT_TYPE, /* format for certificate (default: PEM)*/
STRING_COOKIE, /* HTTP cookie string to send */
STRING_COOKIEJAR, /* dump all cookies to this file */
Daniel Stenberg
committed
STRING_CUSTOMREQUEST, /* HTTP/FTP/RTSP request/method to use */
Daniel Stenberg
committed
STRING_DEVICE, /* local network interface/address to use */
STRING_ENCODING, /* Accept-Encoding string */
STRING_FTP_ACCOUNT, /* ftp account data */
STRING_FTP_ALTERNATIVE_TO_USER, /* command to send if USER/PASS fails */
STRING_FTPPORT, /* port to send with the FTP PORT command */
STRING_KEY, /* private key file name */
STRING_KEY_PASSWD, /* plain text private key password */
STRING_KEY_TYPE, /* format for private key (default: PEM) */
STRING_KRB_LEVEL, /* krb security level */
STRING_NETRC_FILE, /* if not NULL, use this instead of trying to find
$HOME/.netrc */
STRING_COPYPOSTFIELDS, /* if POST, set the fields' values here */
Daniel Stenberg
committed
STRING_PROXY, /* proxy to use */
STRING_SET_RANGE, /* range, if used */
STRING_SET_REFERER, /* custom string for the HTTP referer field */
STRING_SET_URL, /* what original URL to work on */
STRING_SSL_CAPATH, /* CA directory name (doesn't work on windows) */
STRING_SSL_CAFILE, /* certificate file to verify peer against */
STRING_SSL_CIPHER_LIST, /* list of ciphers to use */
STRING_SSL_EGDSOCKET, /* path to file containing the EGD daemon socket */
STRING_SSL_RANDOM_FILE, /* path to file containing "random" data */
STRING_USERAGENT, /* User-Agent string */
Daniel Stenberg
committed
STRING_SSL_CRLFILE, /* crl file to check certificate */
Daniel Stenberg
committed
STRING_SSL_ISSUERCERT, /* issuer cert file to check certificate */
STRING_USERNAME, /* <username>, if used */
STRING_PASSWORD, /* <password>, if used */
STRING_PROXYUSERNAME, /* Proxy <username>, if used */
STRING_PROXYPASSWORD, /* Proxy <password>, if used */
Daniel Stenberg
committed
STRING_NOPROXY, /* List of hosts which should not use the proxy, if
used */
Daniel Stenberg
committed
STRING_RTSP_SESSION_ID, /* Session ID to use */
STRING_RTSP_STREAM_URI, /* Stream URI for this request */
STRING_RTSP_TRANSPORT, /* Transport for this session */
Daniel Stenberg
committed
#ifdef USE_LIBSSH2
STRING_SSH_PRIVATE_KEY, /* path to the private key file for auth */
STRING_SSH_PUBLIC_KEY, /* path to the public key file for auth */
STRING_SSH_HOST_PUBLIC_KEY_MD5, /* md5 of host public key in ascii hex */
STRING_SSH_KNOWNHOSTS, /* file name of knownhosts file */
#endif
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
STRING_SOCKS5_GSSAPI_SERVICE, /* GSSAPI service name */
#endif
STRING_MAIL_FROM,
STRING_MAIL_AUTH,
Daniel Stenberg
committed
#ifdef USE_TLS_SRP
STRING_TLSAUTH_USERNAME, /* TLS auth <username> */
STRING_TLSAUTH_PASSWORD, /* TLS auth <password> */
#endif
Daniel Stenberg
committed
/* -- end of strings -- */
STRING_LAST /* not used, just an end-of-list marker */
};
Daniel Stenberg
committed
struct UserDefined {
FILE *err; /* the stderr user data goes here */
void *debugdata; /* the data that will be passed to fdebug */
Daniel Stenberg
committed
char *errorbuffer; /* (Static) store failure messages in here */
long proxyport; /* If non-zero, use this port number by default. If the
proxy string features a ":[port]" that one will override
void *out; /* the fetched file goes here */
void *in; /* the uploaded file is read from here */
void *writeheader; /* write the header to this if non-NULL */
Daniel Stenberg
committed
void *rtp_out; /* write RTP to this if non-NULL */
Daniel Stenberg
committed
long use_port; /* which port to use (when not using default) */
unsigned long httpauth; /* kind of HTTP authentication to use (bitmask) */
unsigned long proxyauth; /* kind of proxy authentication to use (bitmask) */
Daniel Stenberg
committed
long followlocation; /* as in HTTP Location: */
long maxredirs; /* maximum no. of http(s) redirects to follow, set to -1
for infinity */
int keep_post; /* keep POSTs as POSTs after a 30x request; each
bit represents a request, from 301 to 303 */
bool free_referer; /* set TRUE if 'referer' points to a string we
allocated */
void *postfields; /* if POST, set the fields' values here */
Daniel Stenberg
committed
curl_seek_callback seek_func; /* function that seeks the input */
curl_off_t postfieldsize; /* if POST, this might have a size to use instead
of strlen(), and then the data *may* be binary
(contain zero bytes) */
Daniel Stenberg
committed
unsigned short localport; /* local port number to bind to */
int localportrange; /* number of additional port numbers to test in case the
'localport' one can't be bind()ed */
curl_write_callback fwrite_func; /* function that stores the output */
Daniel Stenberg
committed
curl_write_callback fwrite_header; /* function that stores headers */
Daniel Stenberg
committed
curl_write_callback fwrite_rtp; /* function that stores interleaved RTP */
curl_read_callback fread_func; /* function that reads the input */
int is_fread_set; /* boolean, has read callback been set to non-NULL? */
int is_fwrite_set; /* boolean, has write callback been set to non-NULL? */
Daniel Stenberg
committed
curl_progress_callback fprogress; /* function for progress information */
curl_debug_callback fdebug; /* function that write informational data */
curl_ioctl_callback ioctl_func; /* function for I/O control */
curl_sockopt_callback fsockopt; /* function for setting socket options */
void *sockopt_client; /* pointer to pass to the socket options callback */
curl_opensocket_callback fopensocket; /* function for checking/translating
the address and opening the
socket */
void* opensocket_client;
curl_closesocket_callback fclosesocket; /* function for closing the
socket */
void* closesocket_client;
Daniel Stenberg
committed
void *seek_client; /* pointer to pass to the seek callback */
/* the 3 curl_conv_callback functions below are used on non-ASCII hosts */
/* function to convert from the network encoding: */
curl_conv_callback convfromnetwork;
/* function to convert to the network encoding: */
curl_conv_callback convtonetwork;
/* function to convert from UTF-8 encoding: */
curl_conv_callback convfromutf8;
void *progress_client; /* pointer to pass to the progress callback */
void *ioctl_client; /* pointer to pass to the ioctl callback */
Daniel Stenberg
committed
long timeout; /* in milliseconds, 0 means no timeout */
long connecttimeout; /* in milliseconds, 0 means no timeout */
long accepttimeout; /* in milliseconds, 0 means no timeout */
long server_response_timeout; /* in milliseconds, 0 means no timeout */
Daniel Stenberg
committed
long tftp_blksize ; /* in bytes, 0 means use default */
curl_off_t infilesize; /* size of file to upload, -1 means unknown */
long low_speed_limit; /* bytes/second */
long low_speed_time; /* number of seconds */
curl_off_t max_send_speed; /* high speed limit in bytes/second for upload */
curl_off_t max_recv_speed; /* high speed limit in bytes/second for
download */
curl_off_t set_resume_from; /* continue [ftp] transfer from here */
struct curl_slist *headers; /* linked list of extra headers */
struct curl_httppost *httppost; /* linked list of POST data */
bool cookiesession; /* new cookie session? */
Daniel Stenberg
committed
bool crlf; /* convert crlf on ftp upload(?) */
struct curl_slist *quote; /* after connection is established */
struct curl_slist *postquote; /* after the transfer */
struct curl_slist *prequote; /* before the transfer, after type */
struct curl_slist *source_quote; /* 3rd party quote */
struct curl_slist *source_prequote; /* in 3rd party transfer mode - before
the transfer on source host */
struct curl_slist *source_postquote; /* in 3rd party transfer mode - after
the transfer on source host */
struct curl_slist *telnet_options; /* linked list of telnet options */
struct curl_slist *resolve; /* list of names to add/remove from
DNS cache */
curl_TimeCond timecondition; /* kind of time/date comparison */
time_t timevalue; /* what time to compare with */
Daniel Stenberg
committed
Curl_HttpReq httpreq; /* what kind of HTTP request (if any) is this */
long httpversion; /* when non-zero, a specific HTTP version requested to
be used in the library's request(s) */
Daniel Stenberg
committed
struct ssl_config_data ssl; /* user defined SSL stuff */
Daniel Stenberg
committed
curl_proxytype proxytype; /* what kind of proxy that is in use */
long dns_cache_timeout; /* DNS cache timeout */
long buffer_size; /* size of receive buffer to use */
void *private_data; /* application-private data */
Daniel Stenberg
committed
struct Curl_one_easy *one_easy; /* When adding an easy handle to a multi
handle, an internal 'Curl_one_easy'
struct is created and this is a pointer
to the particular struct associated with
this SessionHandle */
struct curl_slist *http200aliases; /* linked list of aliases for http200 */
long ipver; /* the CURL_IPRESOLVE_* defines in the public header file
0 - whatever, 1 - v2, 2 - v6 */
curl_off_t max_filesize; /* Maximum file size to download */
curl_ftpfile ftp_filemethod; /* how to get to a file when FTP is used */
Daniel Stenberg
committed
int ftp_create_missing_dirs; /* 1 - create directories that don't exist
2 - the same but also allow MKD to fail once
*/
Daniel Stenberg
committed
curl_sshkeycallback ssh_keyfunc; /* key matching callback */
void *ssh_keyfunc_userp; /* custom pointer to callback */
Daniel Stenberg
committed
/* Here follows boolean settings that define how to behave during
this session. They are STATIC, set by libcurl users or at least initially
and they don't change during operations. */
bool printhost; /* printing host name in debug info */
bool get_filetime; /* get the time and get of the remote file */
bool tunnel_thru_httpproxy; /* use CONNECT through a HTTP proxy */
bool prefer_ascii; /* ASCII rather than binary */
bool ftp_append; /* append, not overwrite, on upload */
bool ftp_list_only; /* switch FTP command for listing directories */
bool ftp_use_port; /* use the FTP PORT command */
bool hide_progress; /* don't use the progress meter */
Daniel Stenberg
committed
bool http_fail_on_error; /* fail on HTTP error codes >= 300 */
bool http_follow_location; /* follow HTTP redirects */
bool http_transfer_encoding; /* request compressed HTTP transfer-encoding */
bool http_disable_hostname_check_before_authentication;
bool include_header; /* include received protocol headers in data output */
bool http_set_referer; /* is a custom referer used */
Daniel Stenberg
committed
bool http_auto_referer; /* set "correct" referer when following location: */
Daniel Stenberg
committed
bool opt_no_body; /* as set with CURLOPT_NO_BODY */
bool set_port; /* custom port number used */
bool upload; /* upload request */
enum CURL_NETRC_OPTION
use_netrc; /* defined in include/curl.h */
bool krb; /* kerberos connection requested */
Daniel Stenberg
committed
bool reuse_forbid; /* forbidden to be reused, close after use */
bool reuse_fresh; /* do not re-use an existing connection */
bool ftp_use_epsv; /* if EPSV is to be attempted or not */
bool ftp_use_eprt; /* if EPRT is to be attempted or not */
Daniel Stenberg
committed
bool ftp_use_pret; /* if PRET is to be used before PASV or not */
Daniel Stenberg
committed
curl_usessl use_ssl; /* if AUTH TLS is to be attempted etc, for FTP or
IMAP or POP3 or others! */
curl_ftpauth ftpsslauth; /* what AUTH XXX to be attempted */
Linus Nielsen
committed
curl_ftpccc ftp_ccc; /* FTP CCC options */
bool no_signal; /* do not use any signal/alarm handler */
Daniel Stenberg
committed
bool global_dns_cache; /* subject for future removal */
Daniel Stenberg
committed
bool tcp_nodelay; /* whether to enable TCP_NODELAY or not */
Daniel Stenberg
committed
bool ignorecl; /* ignore content length */
bool ftp_skip_ip; /* skip the IP address the FTP server passes on to
us */
Daniel Stenberg
committed
bool connect_only; /* make connection, let application use the socket */
bool ssl_enable_beast; /* especially allow this flaw for interoperability's
sake*/
long ssh_auth_types; /* allowed SSH auth types */
Daniel Stenberg
committed
bool http_te_skip; /* pass the raw body data to the user, even when
transfer-encoded (chunked, compressed) */
bool http_ce_skip; /* pass the raw body data to the user, even when
content-encoded (chunked, compressed) */
long new_file_perms; /* Permissions to use when creating remote files */
long new_directory_perms; /* Permissions to use when creating remote dirs */
Daniel Stenberg
committed
bool proxy_transfer_mode; /* set transfer mode (;type=<a|i>) when doing FTP
via an HTTP proxy */
Daniel Stenberg
committed
char *str[STRING_LAST]; /* array of strings, pointing to allocated memory */
Daniel Stenberg
committed
unsigned int scope; /* address scope for IPv6 */
long allowed_protocols;
long redir_protocols;
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
long socks5_gssapi_nec; /* flag to support nec socks5 server */
#endif
Daniel Stenberg
committed
struct curl_slist *mail_rcpt; /* linked list of mail recipients */
Daniel Stenberg
committed
/* Common RTSP header options */
Curl_RtspReq rtspreq; /* RTSP request type */
long rtspversion; /* like httpversion, for RTSP */
bool wildcardmatch; /* enable wildcard matching */
curl_chunk_bgn_callback chunk_bgn; /* called before part of transfer
starts */
curl_chunk_end_callback chunk_end; /* called after part transferring
stopped */
curl_fnmatch_callback fnmatch; /* callback to decide which file corresponds
to pattern (e.g. if WILDCARDMATCH is on) */
long gssapi_delegation; /* GSSAPI credential delegation, see the
documentation of CURLOPT_GSSAPI_DELEGATION */
bool tcp_keepalive; /* use TCP keepalives */
long tcp_keepidle; /* seconds in idle before sending keepalive probe */
long tcp_keepintvl; /* seconds between TCP keepalive probes */
size_t maxconnects; /* Max idle connections in the connection cache */
Daniel Stenberg
committed
};
Daniel Stenberg
committed
struct Names {
struct curl_hash *hostcache;
enum {
HCACHE_NONE, /* not pointing to anything */
HCACHE_GLOBAL, /* points to the (shrug) global one */
HCACHE_MULTI, /* points to a shared one in the multi handle */
HCACHE_SHARED /* points to a shared one in a shared object */
} hostcachetype;
};
Daniel Stenberg
committed
/*
Daniel Stenberg
committed
* The 'connectdata' struct MUST have all the connection oriented stuff as we
* may have several simultaneous connections and connection structs in memory.
Daniel Stenberg
committed
*
Daniel Stenberg
committed
* The 'struct UserDefined' must only contain data that is set once to go for
* many (perhaps) independent connections. Values that are generated or
Daniel Stenberg
committed
* calculated internally for the "session handle" must be defined within the
Daniel Stenberg
committed
* 'struct UrlState' instead.
*/
Daniel Stenberg
committed
struct SessionHandle {
Daniel Stenberg
committed
struct Names dns;
Daniel Stenberg
committed
struct Curl_multi *multi; /* if non-NULL, points to the multi handle
struct to which this "belongs" when used by
the multi interface */
struct Curl_multi *multi_easy; /* if non-NULL, points to the multi handle
struct to which this "belongs" when used
by the easy interface */
struct Curl_one_easy *multi_pos; /* if non-NULL, points to its position
Daniel Stenberg
committed
in multi controlling structure to assist
in removal. */
struct Curl_share *share; /* Share, handles global variable mutexing */
Daniel Stenberg
committed
struct SingleRequest req; /* Request-specific data */
Daniel Stenberg
committed
struct UserDefined set; /* values set by the libcurl user */
struct DynamicStatic change; /* possibly modified userdefined data */
struct CookieInfo *cookies; /* the cookies, read from files and servers.
NOTE that the 'cookie' field in the
UserDefined struct defines if the "engine"
is to be used or not. */
Daniel Stenberg
committed
struct Progress progress; /* for all the progress meter data */
struct UrlState state; /* struct for fields used for state info and
other dynamic purposes */
struct WildcardData wildcard; /* wildcard download state info */
Daniel Stenberg
committed
struct PureInfo info; /* stats, reports and info data */
#if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV)
iconv_t outbound_cd; /* for translating to the network encoding */
iconv_t inbound_cd; /* for translating from the network encoding */
iconv_t utf8_cd; /* for translating to UTF8 */
#endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */
unsigned int magic; /* set to a CURLEASY_MAGIC_NUMBER */
#endif /* HEADER_CURL_URLDATA_H */