9a9b6d8d30f1e942a367a6f6e280ae6ac038e581
[platform/upstream/curl.git] / src / tool_cfgable.h
1 #ifndef HEADER_CURL_TOOL_CFGABLE_H
2 #define HEADER_CURL_TOOL_CFGABLE_H
3 /***************************************************************************
4  *                                  _   _ ____  _
5  *  Project                     ___| | | |  _ \| |
6  *                             / __| | | | |_) | |
7  *                            | (__| |_| |  _ <| |___
8  *                             \___|\___/|_| \_\_____|
9  *
10  * Copyright (C) 1998 - 2012, 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 http://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 #include "tool_setup.h"
25
26 #include "tool_sdecls.h"
27
28 #include "tool_metalink.h"
29
30 struct Configurable {
31   CURL *easy;               /* once we have one, we keep it here */
32   bool remote_time;
33   char *random_file;
34   char *egd_file;
35   char *useragent;
36   char *cookie;             /* single line with specified cookies */
37   char *cookiejar;          /* write to this file */
38   char *cookiefile;         /* read from this file */
39   bool cookiesession;       /* new session? */
40   bool encoding;            /* Accept-Encoding please */
41   bool tr_encoding;         /* Transfer-Encoding please */
42   unsigned long authtype;   /* auth bitmask */
43   bool use_resume;
44   bool resume_from_current;
45   bool disable_epsv;
46   bool disable_eprt;
47   bool ftp_pret;
48   long proto;
49   bool proto_present;
50   long proto_redir;
51   bool proto_redir_present;
52   curl_off_t resume_from;
53   char *postfields;
54   curl_off_t postfieldsize;
55   char *referer;
56   double timeout;
57   double connecttimeout;
58   long maxredirs;
59   curl_off_t max_filesize;
60   char *headerfile;
61   char *ftpport;
62   char *iface;
63   int localport;
64   int localportrange;
65   unsigned short porttouse;
66   char *range;
67   long low_speed_limit;
68   long low_speed_time;
69   int showerror; /* -1 == unset, default => show errors
70                     0 => -s is used to NOT show errors
71                     1 => -S has been used to show errors */
72   char *userpwd;
73   char *tls_username;
74   char *tls_password;
75   char *tls_authtype;
76   char *proxyuserpwd;
77   char *proxy;
78   int proxyver;             /* set to CURLPROXY_HTTP* define */
79   char *noproxy;
80   char *mail_from;
81   struct curl_slist *mail_rcpt;
82   char *mail_auth;
83   bool sasl_ir;             /* Enable/disable SASL initial response */
84   bool proxytunnel;
85   bool ftp_append;          /* APPE on ftp */
86   bool mute;                /* don't show messages, --silent given */
87   bool use_ascii;           /* select ascii or text transfer */
88   bool autoreferer;         /* automatically set referer */
89   bool failonerror;         /* fail on (HTTP) errors */
90   bool include_headers;     /* send headers to data output */
91   bool no_body;             /* don't get the body */
92   bool dirlistonly;         /* only get the FTP dir list */
93   bool followlocation;      /* follow http redirects */
94   bool unrestricted_auth;   /* Continue to send authentication (user+password)
95                                when following ocations, even when hostname
96                                changed */
97   bool netrc_opt;
98   bool netrc;
99   char *netrc_file;
100   bool noprogress;          /* don't show progress meter, --silent given */
101   bool isatty;              /* updated internally only if output is a tty */
102   struct getout *url_list;  /* point to the first node */
103   struct getout *url_last;  /* point to the last/current node */
104   struct getout *url_get;   /* point to the node to fill in URL */
105   struct getout *url_out;   /* point to the node to fill in outfile */
106   char *cipher_list;
107   char *cert;
108   char *cert_type;
109   char *cacert;
110   char *capath;
111   char *crlfile;
112   char *key;
113   char *key_type;
114   char *key_passwd;
115   char *pubkey;
116   char *hostpubmd5;
117   char *engine;
118   bool list_engines;
119   bool crlf;
120   char *customrequest;
121   char *krblevel;
122   char *trace_dump;         /* file to dump the network trace to, or NULL */
123   FILE *trace_stream;
124   bool trace_fopened;
125   trace tracetype;
126   bool tracetime;           /* include timestamp? */
127   long httpversion;
128   int progressmode;         /* CURL_PROGRESS_BAR or CURL_PROGRESS_STATS */
129   bool nobuffer;
130   bool readbusy;            /* set when reading input returns EAGAIN */
131   bool globoff;
132   bool use_httpget;
133   bool insecure_ok;         /* set TRUE to allow insecure SSL connects */
134   bool create_dirs;
135   bool ftp_create_dirs;
136   bool ftp_skip_ip;
137   bool proxynegotiate;
138   bool proxyntlm;
139   bool proxydigest;
140   bool proxybasic;
141   bool proxyanyauth;
142   char *writeout;           /* %-styled format string to output */
143   bool writeenv;            /* write results to environment, if available */
144   FILE *errors;             /* errors stream, defaults to stderr */
145   bool errors_fopened;      /* whether errors stream isn't stderr */
146   struct curl_slist *quote;
147   struct curl_slist *postquote;
148   struct curl_slist *prequote;
149   long ssl_version;
150   long ip_version;
151   curl_TimeCond timecond;
152   time_t condtime;
153   struct curl_slist *headers;
154   struct curl_httppost *httppost;
155   struct curl_httppost *last_post;
156   struct curl_slist *telnet_options;
157   struct curl_slist *resolve;
158   HttpReq httpreq;
159
160   /* for bandwidth limiting features: */
161   curl_off_t sendpersecond; /* send to peer */
162   curl_off_t recvpersecond; /* receive from peer */
163
164   bool ftp_ssl;
165   bool ftp_ssl_reqd;
166   bool ftp_ssl_control;
167   bool ftp_ssl_ccc;
168   int ftp_ssl_ccc_mode;
169
170   char *socksproxy;         /* set to server string */
171   int socksver;             /* set to CURLPROXY_SOCKS* define */
172   char *socks5_gssapi_service;  /* set service name for gssapi principal
173                                  * default rcmd */
174   int socks5_gssapi_nec ;   /* The NEC reference server does not protect
175                              * the encryption type exchange */
176
177   bool tcp_nodelay;
178   long req_retry;           /* number of retries */
179   long retry_delay;         /* delay between retries (in seconds) */
180   long retry_maxtime;       /* maximum time to keep retrying */
181
182   char *ftp_account;        /* for ACCT */
183   char *ftp_alternative_to_user;  /* send command if USER/PASS fails */
184   int ftp_filemethod;
185   long tftp_blksize;        /* TFTP BLKSIZE option */
186   bool ignorecl;            /* --ignore-content-length */
187   bool disable_sessionid;
188
189   char *libcurl;            /* output libcurl code to this file name */
190   bool raw;
191   bool post301;
192   bool post302;
193   bool post303;
194   bool nokeepalive;         /* for keepalive needs */
195   long alivetime;
196   bool content_disposition; /* use Content-disposition filename */
197
198   int default_node_flags;   /* default flags to search for each 'node', which
199                                is basically each given URL to transfer */
200
201   bool xattr;               /* store metadata in extended attributes */
202   long gssapi_delegation;
203   bool ssl_allow_beast;     /* allow this SSL vulnerability */
204
205   bool use_metalink;        /* process given URLs as metalink XML file */
206   metalinkfile *metalinkfile_list; /* point to the first node */
207   metalinkfile *metalinkfile_last; /* point to the last/current node */
208 }; /* struct Configurable */
209
210 void free_config_fields(struct Configurable *config);
211
212 #endif /* HEADER_CURL_TOOL_CFGABLE_H */
213