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 - 2011, 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
28struct 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  bool proxytunnel;
81  bool ftp_append;          /* APPE on ftp */
82  bool mute;                /* don't show messages, --silent given */
83  bool use_ascii;           /* select ascii or text transfer */
84  bool autoreferer;         /* automatically set referer */
85  bool failonerror;         /* fail on (HTTP) errors */
86  bool include_headers;     /* send headers to data output */
87  bool no_body;             /* don't get the body */
88  bool dirlistonly;         /* only get the FTP dir list */
89  bool followlocation;      /* follow http redirects */
90  bool unrestricted_auth;   /* Continue to send authentication (user+password)
91                               when following ocations, even when hostname
92                               changed */
93  bool netrc_opt;
94  bool netrc;
95  char *netrc_file;
96  bool noprogress;          /* don't show progress meter, --silent given */
97  bool isatty;              /* updated internally only if output is a tty */
98  struct getout *url_list;  /* point to the first node */
99  struct getout *url_last;  /* point to the last/current node */
100  struct getout *url_get;   /* point to the node to fill in URL */
101  struct getout *url_out;   /* point to the node to fill in outfile */
102  char *cipher_list;
103  char *cert;
104  char *cert_type;
105  char *cacert;
106  char *capath;
107  char *crlfile;
108  char *key;
109  char *key_type;
110  char *key_passwd;
111  char *pubkey;
112  char *hostpubmd5;
113  char *engine;
114  bool list_engines;
115  bool crlf;
116  char *customrequest;
117  char *krblevel;
118  char *trace_dump;         /* file to dump the network trace to, or NULL */
119  FILE *trace_stream;
120  bool trace_fopened;
121  trace tracetype;
122  bool tracetime;           /* include timestamp? */
123  long httpversion;
124  int progressmode;         /* CURL_PROGRESS_BAR or CURL_PROGRESS_STATS */
125  bool nobuffer;
126  bool readbusy;            /* set when reading input returns EAGAIN */
127  bool globoff;
128  bool use_httpget;
129  bool insecure_ok;         /* set TRUE to allow insecure SSL connects */
130  bool create_dirs;
131  bool ftp_create_dirs;
132  bool ftp_skip_ip;
133  bool proxynegotiate;
134  bool proxyntlm;
135  bool proxydigest;
136  bool proxybasic;
137  bool proxyanyauth;
138  char *writeout;           /* %-styled format string to output */
139  bool writeenv;            /* write results to environment, if available */
140  FILE *errors;             /* errors stream, defaults to stderr */
141  bool errors_fopened;      /* whether errors stream isn't stderr */
142  struct curl_slist *quote;
143  struct curl_slist *postquote;
144  struct curl_slist *prequote;
145  long ssl_version;
146  long ip_version;
147  curl_TimeCond timecond;
148  time_t condtime;
149  struct curl_slist *headers;
150  struct curl_httppost *httppost;
151  struct curl_httppost *last_post;
152  struct curl_slist *telnet_options;
153  struct curl_slist *resolve;
154  HttpReq httpreq;
155
156  /* for bandwidth limiting features: */
157  curl_off_t sendpersecond; /* send to peer */
158  curl_off_t recvpersecond; /* receive from peer */
159
160  bool ftp_ssl;
161  bool ftp_ssl_reqd;
162  bool ftp_ssl_control;
163  bool ftp_ssl_ccc;
164  int ftp_ssl_ccc_mode;
165
166  char *socksproxy;         /* set to server string */
167  int socksver;             /* set to CURLPROXY_SOCKS* define */
168  char *socks5_gssapi_service;  /* set service name for gssapi principal
169                                 * default rcmd */
170  int socks5_gssapi_nec ;   /* The NEC reference server does not protect
171                             * the encryption type exchange */
172
173  bool tcp_nodelay;
174  long req_retry;           /* number of retries */
175  long retry_delay;         /* delay between retries (in seconds) */
176  long retry_maxtime;       /* maximum time to keep retrying */
177
178  char *ftp_account;        /* for ACCT */
179  char *ftp_alternative_to_user;  /* send command if USER/PASS fails */
180  int ftp_filemethod;
181  long tftp_blksize;        /* TFTP BLKSIZE option */
182  bool ignorecl;            /* --ignore-content-length */
183  bool disable_sessionid;
184
185  char *libcurl;            /* output libcurl code to this file name */
186  bool raw;
187  bool post301;
188  bool post302;
189  bool nokeepalive;         /* for keepalive needs */
190  long alivetime;
191  bool content_disposition; /* use Content-disposition filename */
192
193  int default_node_flags;   /* default flags to search for each 'node', which
194                               is basically each given URL to transfer */
195
196  bool xattr;               /* store metadata in extended attributes */
197  long gssapi_delegation;
198
199}; /* struct Configurable */
200
201void free_config_fields(struct Configurable *config);
202
203#endif /* HEADER_CURL_TOOL_CFGABLE_H */
204
205