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