• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/curl/curl-7.36.0/src/

Lines Matching defs:config

191                            struct OperationConfig *config)
202 CURL *curl = config->easy;
218 heads.config = config;
227 if(!config->url_list || !config->url_list->url) {
242 if(!config->cacert &&
243 !config->capath &&
244 !config->insecure_ok) {
248 config->cacert = strdup(env);
249 if(!config->cacert) {
259 config->capath = strdup(env);
260 if(!config->capath) {
270 config->cacert = strdup(env);
271 if(!config->cacert) {
285 res = FindWin32CACert(config, "curl-ca-bundle.crt");
292 if(config->postfields) {
293 if(config->use_httpget) {
295 httpgetfields = strdup(config->postfields);
296 Curl_safefree(config->postfields);
302 if(SetHTTPrequest(config,
303 (config->no_body?HTTPREQ_HEAD:HTTPREQ_GET),
304 &config->httpreq)) {
310 if(SetHTTPrequest(config, HTTPREQ_SIMPLEPOST, &config->httpreq)) {
318 if(config->headerfile) {
320 if(!curlx_strequal(config->headerfile, "-")) {
321 FILE *newfile = fopen(config->headerfile, "wb");
323 warnf(config, "Failed to open %s\n", config->headerfile);
328 heads.filename = config->headerfile;
346 for(urlnode = config->url_list; urlnode; urlnode = urlnode->next) {
365 mlfile_last = config->metalinkfile_list;
399 if(!config->globoff && infiles) {
449 if(!config->globoff) {
489 outs.config = config;
534 (metalink || !config->use_metalink)) {
546 if((!outfile || !*outfile) && !config->content_disposition) {
568 warnf(config, "bad output glob!\n");
576 if(config->create_dirs || metalink) {
587 && config->content_disposition) {
592 if(config->resume_from_current) {
599 config->resume_from = fileinfo.st_size;
602 config->resume_from = 0;
605 if(config->resume_from) {
609 FILE *file = fopen(outfile, config->resume_from?"ab":"wb",
613 FILE *file = fopen(outfile, config->resume_from?"ab":"wb");
622 outs.init = config->resume_from;
699 if(config->authtype & (1UL << bitcheck++)) {
712 if(config->proxyanyauth || (authbits>1)) {
713 warnf(config,
725 warnf(config,
730 if(uploadfile && config->resume_from_current)
731 config->resume_from = -1; /* -1 will then force get-it-yourself */
739 /* progress meter is per download, so restore config
794 if((!outfile || !strcmp(outfile, "-")) && !config->use_ascii) {
800 if(config->tcp_nodelay)
805 if(metalink || !config->use_metalink)
817 input.config = config;
834 if(config->recvpersecond)
837 my_setopt(curl, CURLOPT_BUFFERSIZE, (long)config->recvpersecond);
844 if(config->no_body) {
851 else if(!config->use_metalink)
852 my_setopt(curl, CURLOPT_HEADER, config->include_headers?1L:0L);
854 if(config->xoauth2_bearer)
855 my_setopt_str(curl, CURLOPT_XOAUTH2_BEARER, config->xoauth2_bearer);
861 my_setopt_str(curl, CURLOPT_PROXY, config->proxy);
862 my_setopt_str(curl, CURLOPT_PROXYUSERPWD, config->proxyuserpwd);
865 my_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, config->proxytunnel?1L:0L);
868 if(config->proxy)
869 my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->proxyver);
872 if(config->socksproxy) {
873 my_setopt_str(curl, CURLOPT_PROXY, config->socksproxy);
874 my_setopt_enum(curl, CURLOPT_PROXYTYPE, (long)config->socksver);
878 if(config->proxyanyauth)
881 else if(config->proxynegotiate)
884 else if(config->proxyntlm)
887 else if(config->proxydigest)
890 else if(config->proxybasic)
895 my_setopt(curl, CURLOPT_NOPROXY, config->noproxy);
899 my_setopt(curl, CURLOPT_FAILONERROR, config->failonerror?1L:0L);
901 my_setopt(curl, CURLOPT_DIRLISTONLY, config->dirlistonly?1L:0L);
902 my_setopt(curl, CURLOPT_APPEND, config->ftp_append?1L:0L);
904 if(config->netrc_opt)
906 else if(config->netrc || config->netrc_file)
911 if(config->netrc_file)
912 my_setopt(curl, CURLOPT_NETRC_FILE, config->netrc_file);
914 my_setopt(curl, CURLOPT_TRANSFERTEXT, config->use_ascii?1L:0L);
915 if(config->login_options)
916 my_setopt_str(curl, CURLOPT_LOGIN_OPTIONS, config->login_options);
917 my_setopt_str(curl, CURLOPT_USERPWD, config->userpwd);
918 my_setopt_str(curl, CURLOPT_RANGE, config->range);
920 my_setopt(curl, CURLOPT_TIMEOUT_MS, (long)(config->timeout * 1000));
927 config->followlocation?1L:0L);
929 config->unrestricted_auth?1L:0L);
931 switch(config->httpreq) {
934 config->postfields);
936 config->postfieldsize);
939 my_setopt_httppost(curl, CURLOPT_HTTPPOST, config->httppost);
945 my_setopt_str(curl, CURLOPT_REFERER, config->referer);
946 my_setopt(curl, CURLOPT_AUTOREFERER, config->autoreferer?1L:0L);
947 my_setopt_str(curl, CURLOPT_USERAGENT, config->useragent);
948 my_setopt_slist(curl, CURLOPT_HTTPHEADER, config->headers);
951 my_setopt(curl, CURLOPT_MAXREDIRS, config->maxredirs);
954 if(config->httpversion)
955 my_setopt_enum(curl, CURLOPT_HTTP_VERSION, config->httpversion);
958 if(config->authtype)
959 my_setopt_bitmask(curl, CURLOPT_HTTPAUTH, (long)config->authtype);
963 if(config->post301)
965 if(config->post302)
967 if(config->post303)
972 if(config->encoding)
976 if(config->tr_encoding)
981 my_setopt_str(curl, CURLOPT_FTPPORT, config->ftpport);
983 config->low_speed_limit);
984 my_setopt(curl, CURLOPT_LOW_SPEED_TIME, config->low_speed_time);
986 config->sendpersecond);
988 config->recvpersecond);
990 if(config->use_resume)
991 my_setopt(curl, CURLOPT_RESUME_FROM_LARGE, config->resume_from);
995 my_setopt_str(curl, CURLOPT_SSLCERT, config->cert);
996 my_setopt_str(curl, CURLOPT_SSLCERTTYPE, config->cert_type);
997 my_setopt_str(curl, CURLOPT_SSLKEY, config->key);
998 my_setopt_str(curl, CURLOPT_SSLKEYTYPE, config->key_type);
999 my_setopt_str(curl, CURLOPT_KEYPASSWD, config->key_passwd);
1005 my_setopt_str(curl, CURLOPT_SSH_PRIVATE_KEYFILE, config->key);
1007 my_setopt_str(curl, CURLOPT_SSH_PUBLIC_KEYFILE, config->pubkey);
1012 config->hostpubmd5);
1015 if(config->cacert)
1016 my_setopt_str(curl, CURLOPT_CAINFO, config->cacert);
1017 if(config->capath)
1018 my_setopt_str(curl, CURLOPT_CAPATH, config->capath);
1019 if(config->crlfile)
1020 my_setopt_str(curl, CURLOPT_CRLFILE, config->crlfile);
1023 if(config->insecure_ok) {
1035 if(!config->insecure_ok) {
1057 if(config->no_body || config->remote_time) {
1062 my_setopt(curl, CURLOPT_CRLF, config->crlf?1L:0L);
1063 my_setopt_slist(curl, CURLOPT_QUOTE, config->quote);
1064 my_setopt_slist(curl, CURLOPT_POSTQUOTE, config->postquote);
1065 my_setopt_slist(curl, CURLOPT_PREQUOTE, config->prequote);
1071 if(config->cookie)
1072 my_setopt_str(curl, CURLOPT_COOKIE, config->cookie);
1074 if(config->cookiefile)
1075 my_setopt_str(curl, CURLOPT_COOKIEFILE, config->cookiefile);
1078 if(config->cookiejar)
1079 my_setopt_str(curl, CURLOPT_COOKIEJAR, config->cookiejar);
1082 my_setopt(curl, CURLOPT_COOKIESESSION, config->cookiesession?1L:0L);
1086 my_setopt_enum(curl, CURLOPT_SSLVERSION, config->ssl_version);
1087 my_setopt_enum(curl, CURLOPT_TIMECONDITION, (long)config->timecond);
1088 my_setopt(curl, CURLOPT_TIMEVALUE, (long)config->condtime);
1089 my_setopt_str(curl, CURLOPT_CUSTOMREQUEST, config->customrequest);
1093 my_setopt_str(curl, CURLOPT_INTERFACE, config->iface);
1094 my_setopt_str(curl, CURLOPT_KRBLEVEL, config->krblevel);
1096 progressbarinit(&progressbar, config);
1106 if(config->dns_servers)
1107 my_setopt_str(curl, CURLOPT_DNS_SERVERS, config->dns_servers);
1110 if(config->dns_interface)
1111 my_setopt_str(curl, CURLOPT_DNS_INTERFACE, config->dns_interface);
1112 if(config->dns_ipv4_addr)
1113 my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP4, config->dns_ipv4_addr);
1114 if(config->dns_ipv6_addr)
1115 my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP6, config->dns_ipv6_addr);
1118 my_setopt_slist(curl, CURLOPT_TELNETOPTIONS, config->telnet_options);
1121 my_setopt_str(curl, CURLOPT_RANDOM_FILE, config->random_file);
1122 my_setopt_str(curl, CURLOPT_EGDSOCKET, config->egd_file);
1124 (long)(config->connecttimeout * 1000));
1126 if(config->cipher_list)
1127 my_setopt_str(curl, CURLOPT_SSL_CIPHER_LIST, config->cipher_list);
1130 if(config->disable_epsv)
1135 if(config->disable_eprt)
1141 my_setopt(curl, CURLOPT_DEBUGDATA, config);
1146 if(config->engine) {
1147 res = res_setopt_str(curl, CURLOPT_SSLENGINE, config->engine);
1155 config->ftp_create_dirs?1L:0L);
1158 if(config->max_filesize)
1160 config->max_filesize);
1162 if(4 == config->ip_version)
1164 else if(6 == config->ip_version)
1170 if(config->ftp_ssl_reqd)
1174 else if(config->ftp_ssl)
1178 else if(config->ftp_ssl_control)
1182 if(config->ftp_ssl_ccc)
1184 (long)config->ftp_ssl_ccc_mode);
1191 if(config->socks5_gssapi_service)
1193 config->socks5_gssapi_service);
1196 if(config->socks5_gssapi_nec)
1198 config->socks5_gssapi_nec);
1202 my_setopt_str(curl, CURLOPT_FTP_ACCOUNT, config->ftp_account);
1204 my_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, config->ignorecl?1L:0L);
1207 my_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, config->ftp_skip_ip?1L:0L);
1210 my_setopt(curl, CURLOPT_FTP_FILEMETHOD, (long)config->ftp_filemethod);
1213 if(config->localport) {
1214 my_setopt(curl, CURLOPT_LOCALPORT, (long)config->localport);
1216 (long)config->localportrange);
1221 config->ftp_alternative_to_user);
1224 if(config->disable_sessionid)
1229 if(config->raw) {
1235 if(!config->nokeepalive) {
1237 if(config->alivetime != 0) {
1239 warnf(config, "Keep-alive functionality somewhat crippled due to "
1242 my_setopt(curl, CURLOPT_TCP_KEEPIDLE, config->alivetime);
1243 my_setopt(curl, CURLOPT_TCP_KEEPINTVL, config->alivetime);
1250 if(config->tftp_blksize)
1251 my_setopt(curl, CURLOPT_TFTP_BLKSIZE, config->tftp_blksize);
1253 if(config->mail_from)
1254 my_setopt_str(curl, CURLOPT_MAIL_FROM, config->mail_from);
1256 if(config->mail_rcpt)
1257 my_setopt_slist(curl, CURLOPT_MAIL_RCPT, config->mail_rcpt);
1260 if(config->ftp_pret)
1263 if(config->proto_present)
1264 my_setopt_flags(curl, CURLOPT_PROTOCOLS, config->proto);
1265 if(config->proto_redir_present)
1266 my_setopt_flags(curl, CURLOPT_REDIR_PROTOCOLS, config->proto_redir);
1268 if(config->content_disposition
1282 if(config->resolve)
1284 my_setopt_slist(curl, CURLOPT_RESOLVE, config->resolve);
1288 if(config->tls_username)
1290 config->tls_username);
1291 if(config->tls_password)
1293 config->tls_password);
1294 if(config->tls_authtype)
1296 config->tls_authtype);
1300 if(config->gssapi_delegation)
1302 config->gssapi_delegation);
1305 if(config->ssl_allow_beast)
1308 if(config->mail_auth)
1309 my_setopt_str(curl, CURLOPT_MAIL_AUTH, config->mail_auth);
1312 if(config->sasl_ir)
1315 if(config->nonpn) {
1319 if(config->noalpn) {
1324 retry_sleep_default = (config->retry_delay) ?
1325 config->retry_delay*1000L : RETRY_SLEEP_DEFAULT; /* ms */
1327 retry_numretries = config->req_retry;
1340 if(!metalink && config->use_metalink) {
1349 fprintf(config->global->errors,
1353 fprintf(config->global->errors,
1359 if(config->test_event_based)
1372 (!config->retry_maxtime ||
1374 config->retry_maxtime*1000L)) ) {
1390 (config->failonerror &&
1438 warnf(config, "Transient problem: %s "
1445 if(!config->retry_delay) {
1531 if(config->writeout)
1532 ourWriteOut(curl, &outs, config->writeout);
1534 if(config->writeenv)
1578 if(!res && config->xattr && outs.fopened && outs.stream) {
1581 warnf(config, "Error setting extended attributes: %s\n",
1615 if(!res && config->remote_time && outs.s_isreg && outs.filename) {
1629 if(!metalink && config->use_metalink && res == CURLE_OK) {
1630 int rv = parse_metalink(config, &outs, this_url);
1632 fprintf(config->global->errors, "Metalink: parsing (%s) OK\n",
1635 fprintf(config->global->errors, "Metalink: parsing (%s) FAILED\n",
1742 /* Reset the global config variables */
1750 clean_getout(config);
1762 clean_metalink(config);
1767 CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
1778 parseconfig(NULL, config); /* ignore possible failure */
1781 if((argc < 2) && (!config->first->url_list)) {
1782 helpf(config->errors, NULL);
1789 ParameterError res = parse_args(config, argc, argv);
1804 tool_list_engines(config->easy);
1817 struct OperationConfig *operation = config->first;
1827 config->current = config->first;
1830 while(!result && config->current) {
1831 result = operate_do(config, config->current);
1833 config->current = config->current->next;
1841 dumpeasysrc(config);
1845 helpf(config->errors, "out of memory\n");