2011-09-16 15:44:45 -04:00
|
|
|
#ifndef HEADER_CURL_TOOL_CFGABLE_H
|
|
|
|
#define HEADER_CURL_TOOL_CFGABLE_H
|
|
|
|
/***************************************************************************
|
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2012-02-06 16:25:04 -05:00
|
|
|
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2011-09-16 15:44:45 -04:00
|
|
|
*
|
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
|
|
|
* are also available at http://curl.haxx.se/docs/copyright.html.
|
|
|
|
*
|
|
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
* copies of the Software, and permit persons to whom the Software is
|
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
***************************************************************************/
|
2012-04-06 17:35:15 -04:00
|
|
|
#include "tool_setup.h"
|
2011-09-16 15:44:45 -04:00
|
|
|
|
2011-09-20 09:58:35 -04:00
|
|
|
#include "tool_sdecls.h"
|
2011-09-16 15:44:45 -04:00
|
|
|
|
2012-04-26 09:59:52 -04:00
|
|
|
#include "tool_metalink.h"
|
|
|
|
|
2011-09-16 15:44:45 -04:00
|
|
|
struct Configurable {
|
|
|
|
CURL *easy; /* once we have one, we keep it here */
|
|
|
|
bool remote_time;
|
|
|
|
char *random_file;
|
|
|
|
char *egd_file;
|
|
|
|
char *useragent;
|
|
|
|
char *cookie; /* single line with specified cookies */
|
|
|
|
char *cookiejar; /* write to this file */
|
|
|
|
char *cookiefile; /* read from this file */
|
|
|
|
bool cookiesession; /* new session? */
|
|
|
|
bool encoding; /* Accept-Encoding please */
|
|
|
|
bool tr_encoding; /* Transfer-Encoding please */
|
2012-04-18 17:04:35 -04:00
|
|
|
unsigned long authtype; /* auth bitmask */
|
2011-09-16 15:44:45 -04:00
|
|
|
bool use_resume;
|
|
|
|
bool resume_from_current;
|
|
|
|
bool disable_epsv;
|
|
|
|
bool disable_eprt;
|
|
|
|
bool ftp_pret;
|
|
|
|
long proto;
|
|
|
|
bool proto_present;
|
|
|
|
long proto_redir;
|
|
|
|
bool proto_redir_present;
|
|
|
|
curl_off_t resume_from;
|
|
|
|
char *postfields;
|
|
|
|
curl_off_t postfieldsize;
|
|
|
|
char *referer;
|
|
|
|
long timeout;
|
|
|
|
long connecttimeout;
|
|
|
|
long maxredirs;
|
|
|
|
curl_off_t max_filesize;
|
|
|
|
char *headerfile;
|
|
|
|
char *ftpport;
|
|
|
|
char *iface;
|
|
|
|
int localport;
|
|
|
|
int localportrange;
|
|
|
|
unsigned short porttouse;
|
|
|
|
char *range;
|
|
|
|
long low_speed_limit;
|
|
|
|
long low_speed_time;
|
2011-10-16 17:39:59 -04:00
|
|
|
int showerror; /* -1 == unset, default => show errors
|
|
|
|
0 => -s is used to NOT show errors
|
|
|
|
1 => -S has been used to show errors */
|
2011-09-16 15:44:45 -04:00
|
|
|
char *userpwd;
|
|
|
|
char *tls_username;
|
|
|
|
char *tls_password;
|
|
|
|
char *tls_authtype;
|
|
|
|
char *proxyuserpwd;
|
|
|
|
char *proxy;
|
|
|
|
int proxyver; /* set to CURLPROXY_HTTP* define */
|
|
|
|
char *noproxy;
|
|
|
|
char *mail_from;
|
|
|
|
struct curl_slist *mail_rcpt;
|
2012-02-16 07:19:47 -05:00
|
|
|
char *mail_auth;
|
2011-09-16 15:44:45 -04:00
|
|
|
bool proxytunnel;
|
|
|
|
bool ftp_append; /* APPE on ftp */
|
2011-09-20 09:58:35 -04:00
|
|
|
bool mute; /* don't show messages, --silent given */
|
2011-09-16 15:44:45 -04:00
|
|
|
bool use_ascii; /* select ascii or text transfer */
|
|
|
|
bool autoreferer; /* automatically set referer */
|
|
|
|
bool failonerror; /* fail on (HTTP) errors */
|
|
|
|
bool include_headers; /* send headers to data output */
|
|
|
|
bool no_body; /* don't get the body */
|
|
|
|
bool dirlistonly; /* only get the FTP dir list */
|
|
|
|
bool followlocation; /* follow http redirects */
|
|
|
|
bool unrestricted_auth; /* Continue to send authentication (user+password)
|
|
|
|
when following ocations, even when hostname
|
|
|
|
changed */
|
|
|
|
bool netrc_opt;
|
|
|
|
bool netrc;
|
|
|
|
char *netrc_file;
|
2011-09-20 19:54:14 -04:00
|
|
|
bool noprogress; /* don't show progress meter, --silent given */
|
2011-09-16 15:44:45 -04:00
|
|
|
bool isatty; /* updated internally only if output is a tty */
|
|
|
|
struct getout *url_list; /* point to the first node */
|
|
|
|
struct getout *url_last; /* point to the last/current node */
|
|
|
|
struct getout *url_get; /* point to the node to fill in URL */
|
|
|
|
struct getout *url_out; /* point to the node to fill in outfile */
|
|
|
|
char *cipher_list;
|
|
|
|
char *cert;
|
|
|
|
char *cert_type;
|
|
|
|
char *cacert;
|
|
|
|
char *capath;
|
|
|
|
char *crlfile;
|
|
|
|
char *key;
|
|
|
|
char *key_type;
|
|
|
|
char *key_passwd;
|
|
|
|
char *pubkey;
|
|
|
|
char *hostpubmd5;
|
|
|
|
char *engine;
|
|
|
|
bool list_engines;
|
|
|
|
bool crlf;
|
|
|
|
char *customrequest;
|
|
|
|
char *krblevel;
|
|
|
|
char *trace_dump; /* file to dump the network trace to, or NULL */
|
|
|
|
FILE *trace_stream;
|
|
|
|
bool trace_fopened;
|
|
|
|
trace tracetype;
|
|
|
|
bool tracetime; /* include timestamp? */
|
|
|
|
long httpversion;
|
2011-09-20 19:54:14 -04:00
|
|
|
int progressmode; /* CURL_PROGRESS_BAR or CURL_PROGRESS_STATS */
|
2011-09-16 15:44:45 -04:00
|
|
|
bool nobuffer;
|
|
|
|
bool readbusy; /* set when reading input returns EAGAIN */
|
|
|
|
bool globoff;
|
|
|
|
bool use_httpget;
|
|
|
|
bool insecure_ok; /* set TRUE to allow insecure SSL connects */
|
|
|
|
bool create_dirs;
|
|
|
|
bool ftp_create_dirs;
|
|
|
|
bool ftp_skip_ip;
|
|
|
|
bool proxynegotiate;
|
|
|
|
bool proxyntlm;
|
|
|
|
bool proxydigest;
|
|
|
|
bool proxybasic;
|
|
|
|
bool proxyanyauth;
|
|
|
|
char *writeout; /* %-styled format string to output */
|
|
|
|
bool writeenv; /* write results to environment, if available */
|
2011-09-20 09:58:35 -04:00
|
|
|
FILE *errors; /* errors stream, defaults to stderr */
|
|
|
|
bool errors_fopened; /* whether errors stream isn't stderr */
|
2011-09-16 15:44:45 -04:00
|
|
|
struct curl_slist *quote;
|
|
|
|
struct curl_slist *postquote;
|
|
|
|
struct curl_slist *prequote;
|
|
|
|
long ssl_version;
|
|
|
|
long ip_version;
|
|
|
|
curl_TimeCond timecond;
|
|
|
|
time_t condtime;
|
|
|
|
struct curl_slist *headers;
|
|
|
|
struct curl_httppost *httppost;
|
|
|
|
struct curl_httppost *last_post;
|
|
|
|
struct curl_slist *telnet_options;
|
|
|
|
struct curl_slist *resolve;
|
|
|
|
HttpReq httpreq;
|
|
|
|
|
|
|
|
/* for bandwidth limiting features: */
|
|
|
|
curl_off_t sendpersecond; /* send to peer */
|
|
|
|
curl_off_t recvpersecond; /* receive from peer */
|
|
|
|
|
|
|
|
bool ftp_ssl;
|
|
|
|
bool ftp_ssl_reqd;
|
|
|
|
bool ftp_ssl_control;
|
|
|
|
bool ftp_ssl_ccc;
|
|
|
|
int ftp_ssl_ccc_mode;
|
|
|
|
|
|
|
|
char *socksproxy; /* set to server string */
|
|
|
|
int socksver; /* set to CURLPROXY_SOCKS* define */
|
|
|
|
char *socks5_gssapi_service; /* set service name for gssapi principal
|
|
|
|
* default rcmd */
|
|
|
|
int socks5_gssapi_nec ; /* The NEC reference server does not protect
|
|
|
|
* the encryption type exchange */
|
|
|
|
|
|
|
|
bool tcp_nodelay;
|
|
|
|
long req_retry; /* number of retries */
|
|
|
|
long retry_delay; /* delay between retries (in seconds) */
|
|
|
|
long retry_maxtime; /* maximum time to keep retrying */
|
|
|
|
|
|
|
|
char *ftp_account; /* for ACCT */
|
|
|
|
char *ftp_alternative_to_user; /* send command if USER/PASS fails */
|
|
|
|
int ftp_filemethod;
|
|
|
|
long tftp_blksize; /* TFTP BLKSIZE option */
|
|
|
|
bool ignorecl; /* --ignore-content-length */
|
|
|
|
bool disable_sessionid;
|
|
|
|
|
|
|
|
char *libcurl; /* output libcurl code to this file name */
|
|
|
|
bool raw;
|
|
|
|
bool post301;
|
|
|
|
bool post302;
|
2012-04-05 17:34:12 -04:00
|
|
|
bool post303;
|
2011-09-16 15:44:45 -04:00
|
|
|
bool nokeepalive; /* for keepalive needs */
|
|
|
|
long alivetime;
|
|
|
|
bool content_disposition; /* use Content-disposition filename */
|
|
|
|
|
|
|
|
int default_node_flags; /* default flags to search for each 'node', which
|
|
|
|
is basically each given URL to transfer */
|
2011-09-30 14:56:56 -04:00
|
|
|
|
2011-09-16 15:44:45 -04:00
|
|
|
bool xattr; /* store metadata in extended attributes */
|
|
|
|
long gssapi_delegation;
|
2012-02-06 16:25:04 -05:00
|
|
|
bool ssl_allow_beast; /* allow this SSL vulnerability */
|
2012-05-26 09:51:03 -04:00
|
|
|
|
2012-06-20 11:51:06 -04:00
|
|
|
bool use_metalink; /* process given URLs as metalink XML file */
|
2012-05-25 06:24:32 -04:00
|
|
|
metalinkfile *metalinkfile_list; /* point to the first node */
|
|
|
|
metalinkfile *metalinkfile_last; /* point to the last/current node */
|
2011-09-16 15:44:45 -04:00
|
|
|
}; /* struct Configurable */
|
|
|
|
|
|
|
|
void free_config_fields(struct Configurable *config);
|
|
|
|
|
|
|
|
#endif /* HEADER_CURL_TOOL_CFGABLE_H */
|
2011-09-19 12:18:17 -04:00
|
|
|
|