tool_cfgable.h
Go to the documentation of this file.
00001 #ifndef HEADER_CURL_TOOL_CFGABLE_H
00002 #define HEADER_CURL_TOOL_CFGABLE_H
00003 /***************************************************************************
00004  *                                  _   _ ____  _
00005  *  Project                     ___| | | |  _ \| |
00006  *                             / __| | | | |_) | |
00007  *                            | (__| |_| |  _ <| |___
00008  *                             \___|\___/|_| \_\_____|
00009  *
00010  * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
00011  *
00012  * This software is licensed as described in the file COPYING, which
00013  * you should have received as part of this distribution. The terms
00014  * are also available at https://curl.haxx.se/docs/copyright.html.
00015  *
00016  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00017  * copies of the Software, and permit persons to whom the Software is
00018  * furnished to do so, under the terms of the COPYING file.
00019  *
00020  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00021  * KIND, either express or implied.
00022  *
00023  ***************************************************************************/
00024 #include "tool_setup.h"
00025 
00026 #include "tool_sdecls.h"
00027 
00028 #include "tool_metalink.h"
00029 
00030 struct GlobalConfig;
00031 
00032 struct OperationConfig {
00033   CURL *easy;               /* A copy of the handle from GlobalConfig */
00034   bool remote_time;
00035   char *random_file;
00036   char *egd_file;
00037   char *useragent;
00038   char *cookie;             /* single line with specified cookies */
00039   char *cookiejar;          /* write to this file */
00040   char *cookiefile;         /* read from this file */
00041   bool cookiesession;       /* new session? */
00042   bool encoding;            /* Accept-Encoding please */
00043   bool tr_encoding;         /* Transfer-Encoding please */
00044   unsigned long authtype;   /* auth bitmask */
00045   bool use_resume;
00046   bool resume_from_current;
00047   bool disable_epsv;
00048   bool disable_eprt;
00049   bool ftp_pret;
00050   long proto;
00051   bool proto_present;
00052   long proto_redir;
00053   bool proto_redir_present;
00054   char *proto_default;
00055   curl_off_t resume_from;
00056   char *postfields;
00057   curl_off_t postfieldsize;
00058   char *referer;
00059   double timeout;
00060   double connecttimeout;
00061   long maxredirs;
00062   curl_off_t max_filesize;
00063   char *headerfile;
00064   char *ftpport;
00065   char *iface;
00066   int localport;
00067   int localportrange;
00068   unsigned short porttouse;
00069   char *range;
00070   long low_speed_limit;
00071   long low_speed_time;
00072   char *dns_servers;   /* dot notation: 1.1.1.1;2.2.2.2 */
00073   char *dns_interface; /* interface name */
00074   char *dns_ipv4_addr; /* dot notation */
00075   char *dns_ipv6_addr; /* dot notation */
00076   char *userpwd;
00077   char *login_options;
00078   char *tls_username;
00079   char *tls_password;
00080   char *tls_authtype;
00081   char *proxy_tls_username;
00082   char *proxy_tls_password;
00083   char *proxy_tls_authtype;
00084   char *proxyuserpwd;
00085   char *proxy;
00086   int proxyver;             /* set to CURLPROXY_HTTP* define */
00087   char *noproxy;
00088   char *mail_from;
00089   struct curl_slist *mail_rcpt;
00090   char *mail_auth;
00091   bool sasl_ir;             /* Enable/disable SASL initial response */
00092   bool proxytunnel;
00093   bool ftp_append;          /* APPE on ftp */
00094   bool use_ascii;           /* select ascii or text transfer */
00095   bool autoreferer;         /* automatically set referer */
00096   bool failonerror;         /* fail on (HTTP) errors */
00097   bool include_headers;     /* send headers to data output */
00098   bool no_body;             /* don't get the body */
00099   bool dirlistonly;         /* only get the FTP dir list */
00100   bool followlocation;      /* follow http redirects */
00101   bool unrestricted_auth;   /* Continue to send authentication (user+password)
00102                                when following ocations, even when hostname
00103                                changed */
00104   bool netrc_opt;
00105   bool netrc;
00106   char *netrc_file;
00107   struct getout *url_list;  /* point to the first node */
00108   struct getout *url_last;  /* point to the last/current node */
00109   struct getout *url_get;   /* point to the node to fill in URL */
00110   struct getout *url_out;   /* point to the node to fill in outfile */
00111   char *cipher_list;
00112   char *proxy_cipher_list;
00113   char *cert;
00114   char *proxy_cert;
00115   char *cert_type;
00116   char *proxy_cert_type;
00117   char *cacert;
00118   char *proxy_cacert;
00119   char *capath;
00120   char *proxy_capath;
00121   char *crlfile;
00122   char *proxy_crlfile;
00123   char *pinnedpubkey;
00124   char *key;
00125   char *proxy_key;
00126   char *key_type;
00127   char *proxy_key_type;
00128   char *key_passwd;
00129   char *proxy_key_passwd;
00130   char *pubkey;
00131   char *hostpubmd5;
00132   char *engine;
00133   bool crlf;
00134   char *customrequest;
00135   char *krblevel;
00136   long httpversion;
00137   bool nobuffer;
00138   bool readbusy;            /* set when reading input returns EAGAIN */
00139   bool globoff;
00140   bool use_httpget;
00141   bool insecure_ok;         /* set TRUE to allow insecure SSL connects */
00142   bool proxy_insecure_ok;   /* set TRUE to allow insecure SSL connects
00143                                for proxy */
00144   bool verifystatus;
00145   bool create_dirs;
00146   bool ftp_create_dirs;
00147   bool ftp_skip_ip;
00148   bool proxynegotiate;
00149   bool proxyntlm;
00150   bool proxydigest;
00151   bool proxybasic;
00152   bool proxyanyauth;
00153   char *writeout;           /* %-styled format string to output */
00154   bool writeenv;            /* write results to environment, if available */
00155   struct curl_slist *quote;
00156   struct curl_slist *postquote;
00157   struct curl_slist *prequote;
00158   long ssl_version;
00159   long proxy_ssl_version;
00160   long ip_version;
00161   curl_TimeCond timecond;
00162   time_t condtime;
00163   struct curl_slist *headers;
00164   struct curl_slist *proxyheaders;
00165   struct curl_httppost *httppost;
00166   struct curl_httppost *last_post;
00167   struct curl_slist *telnet_options;
00168   struct curl_slist *resolve;
00169   struct curl_slist *connect_to;
00170   HttpReq httpreq;
00171 
00172   /* for bandwidth limiting features: */
00173   curl_off_t sendpersecond; /* send to peer */
00174   curl_off_t recvpersecond; /* receive from peer */
00175 
00176   bool ftp_ssl;
00177   bool ftp_ssl_reqd;
00178   bool ftp_ssl_control;
00179   bool ftp_ssl_ccc;
00180   int ftp_ssl_ccc_mode;
00181   char *preproxy;
00182   int socks5_gssapi_nec;    /* The NEC reference server does not protect the
00183                                encryption type exchange */
00184   char *proxy_service_name; /* set authentication service name for HTTP and
00185                                SOCKS5 proxies */
00186   char *service_name;       /* set authentication service name for DIGEST-MD5,
00187                                Kerberos 5 and SPNEGO */
00188 
00189   bool tcp_nodelay;
00190   bool tcp_fastopen;
00191   long req_retry;           /* number of retries */
00192   bool retry_connrefused;   /* set connection refused as a transient error */
00193   long retry_delay;         /* delay between retries (in seconds) */
00194   long retry_maxtime;       /* maximum time to keep retrying */
00195 
00196   char *ftp_account;        /* for ACCT */
00197   char *ftp_alternative_to_user;  /* send command if USER/PASS fails */
00198   int ftp_filemethod;
00199   long tftp_blksize;        /* TFTP BLKSIZE option */
00200   bool tftp_no_options;     /* do not send TFTP options requests */
00201   bool ignorecl;            /* --ignore-content-length */
00202   bool disable_sessionid;
00203 
00204   bool raw;
00205   bool post301;
00206   bool post302;
00207   bool post303;
00208   bool nokeepalive;         /* for keepalive needs */
00209   long alivetime;
00210   bool content_disposition; /* use Content-disposition filename */
00211 
00212   int default_node_flags;   /* default flags to search for each 'node', which
00213                                is basically each given URL to transfer */
00214 
00215   bool xattr;               /* store metadata in extended attributes */
00216   long gssapi_delegation;
00217   bool ssl_allow_beast;     /* allow this SSL vulnerability */
00218   bool proxy_ssl_allow_beast; /* allow this SSL vulnerability for proxy*/
00219 
00220   bool ssl_no_revoke;       /* disable SSL certificate revocation checks */
00221   /*bool proxy_ssl_no_revoke; */
00222 
00223   bool use_metalink;        /* process given URLs as metalink XML file */
00224   metalinkfile *metalinkfile_list; /* point to the first node */
00225   metalinkfile *metalinkfile_last; /* point to the last/current node */
00226 #ifdef CURLDEBUG
00227   bool test_event_based;
00228 #endif
00229   char *oauth_bearer;             /* OAuth 2.0 bearer token */
00230   bool nonpn;                     /* enable/disable TLS NPN extension */
00231   bool noalpn;                    /* enable/disable TLS ALPN extension */
00232   char *unix_socket_path;         /* path to Unix domain socket */
00233   bool falsestart;
00234   bool path_as_is;
00235   double expect100timeout;
00236   struct GlobalConfig *global;
00237   struct OperationConfig *prev;
00238   struct OperationConfig *next;   /* Always last in the struct */
00239 };
00240 
00241 struct GlobalConfig {
00242   CURL *easy;                     /* Once we have one, we keep it here */
00243   int showerror;                  /* -1 == unset, default => show errors
00244                                       0 => -s is used to NOT show errors
00245                                       1 => -S has been used to show errors */
00246   bool mute;                      /* don't show messages, --silent given */
00247   bool noprogress;                /* don't show progress bar --silent given */
00248   bool isatty;                    /* Updated internally if output is a tty */
00249   FILE *errors;                   /* Error stream, defaults to stderr */
00250   bool errors_fopened;            /* Whether error stream isn't stderr */
00251   char *trace_dump;               /* file to dump the network trace to */
00252   FILE *trace_stream;
00253   bool trace_fopened;
00254   trace tracetype;
00255   bool tracetime;                 /* include timestamp? */
00256   int progressmode;               /* CURL_PROGRESS_BAR / CURL_PROGRESS_STATS */
00257   char *libcurl;                  /* Output libcurl code to this file name */
00258   bool fail_early;                /* exit on first transfer error */
00259   struct OperationConfig *first;
00260   struct OperationConfig *current;
00261   struct OperationConfig *last;   /* Always last in the struct */
00262 };
00263 
00264 void config_init(struct OperationConfig *config);
00265 void config_free(struct OperationConfig *config);
00266 
00267 #endif /* HEADER_CURL_TOOL_CFGABLE_H */


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:06