version 1.115, 2016/12/28 17:48:04 |
version 1.116, 2017/01/03 17:00:04 |
|
|
#include "cmds.h" |
#include "cmds.h" |
#include "ftp_var.h" |
#include "ftp_var.h" |
|
|
|
int connect_timeout; |
|
|
#ifndef NOSSL |
#ifndef NOSSL |
char * const ssl_verify_opts[] = { |
char * const ssl_verify_opts[] = { |
#define SSL_CAFILE 0 |
#define SSL_CAFILE 0 |
|
|
httpuseragent = NULL; |
httpuseragent = NULL; |
|
|
while ((ch = getopt(argc, argv, |
while ((ch = getopt(argc, argv, |
"46AaCc:dD:Eegik:Mmno:pP:r:S:s:tU:vV")) != -1) { |
"46AaCc:dD:Eegik:Mmno:pP:r:S:s:tU:vVw:")) != -1) { |
switch (ch) { |
switch (ch) { |
case '4': |
case '4': |
family = PF_INET; |
family = PF_INET; |
|
|
verbose = 0; |
verbose = 0; |
break; |
break; |
|
|
|
case 'w': |
|
connect_timeout = strtonum(optarg, 0, 200, &errstr); |
|
if (errstr) |
|
errx(1, "-w: %s", errstr); |
|
break; |
default: |
default: |
usage(); |
usage(); |
} |
} |
|
|
" ftp://[user:password@]host[:port]/file[/] ...\n" |
" ftp://[user:password@]host[:port]/file[/] ...\n" |
" ftp [-C] [-c cookie] [-o output] [-S ssl_options] " |
" ftp [-C] [-c cookie] [-o output] [-S ssl_options] " |
"[-s srcaddr]\n" |
"[-s srcaddr]\n" |
" [-U useragent] " |
" [-U useragent] [-w seconds] " |
"http[s]://[user:password@]host[:port]/file ...\n" |
"http[s]://[user:password@]host[:port]/file ...\n" |
" ftp [-C] [-o output] [-s srcaddr] file:file ...\n" |
" ftp [-C] [-o output] [-s srcaddr] file:file ...\n" |
" ftp [-C] [-o output] [-s srcaddr] host:/file[/] ...\n" |
" ftp [-C] [-o output] [-s srcaddr] host:/file[/] ...\n" |
#else /* !SMALL */ |
#else /* !SMALL */ |
"ftp [-o output] ftp://[user:password@]host[:port]/file[/] ...\n" |
"ftp [-o output] " |
|
"ftp://[user:password@]host[:port]/file[/] ...\n" |
#ifndef NOSSL |
#ifndef NOSSL |
" ftp [-o output] [-S ssl_options] " |
" ftp [-o output] [-S ssl_options] [-w seconds] " |
"http[s]://[user:password@]host[:port]/file ...\n" |
"http[s]://[user:password@]host[:port]/file ...\n" |
#else |
#else |
" ftp [-o output] http://host[:port]/file ...\n" |
" ftp [-o output] [-w seconds] http://host[:port]/file ...\n" |
#endif /* NOSSL */ |
#endif /* NOSSL */ |
" ftp [-o output] file:file ...\n" |
" ftp [-o output] file:file ...\n" |
" ftp [-o output] host:/file[/] ...\n" |
" ftp [-o output] host:/file[/] ...\n" |