Skip to content

Commit

Permalink
[xrdcp] Add new --tlsmetalink option.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 authored and simonmichal committed Oct 16, 2019
1 parent 04f5f9e commit f9083d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/XrdApps/XrdCpConfig.cc
Expand Up @@ -105,6 +105,7 @@ struct option XrdCpConfig::opVec[] = // For getopt_long()
{OPT_TYPE "sources", 1, 0, XrdCpConfig::OpSources},
{OPT_TYPE "streams", 1, 0, XrdCpConfig::OpStreams},
{OPT_TYPE "tlsdata", 0, 0, XrdCpConfig::OpTlsData},
{OPT_TYPE "tlsmetalink", 0, 0, XrdCpConfig::OpTlsMLF},
{OPT_TYPE "tpc", 1, 0, XrdCpConfig::OpTpc},
{OPT_TYPE "verbose", 0, 0, XrdCpConfig::OpVerbose},
{OPT_TYPE "version", 0, 0, XrdCpConfig::OpVersion},
Expand Down Expand Up @@ -271,6 +272,8 @@ do{while(optind < Argc && Legacy(optind)) {}
break;
case OpTlsData: OpSpec |= DoTlsData;
break;
case OpTlsMLF: OpSpec |= DoTlsMLF;
break;
case OpTpc: OpSpec |= DoTpc;
if (!strcmp("delegate", optarg))
{OpSpec|= DoTpcDlgt;
Expand Down Expand Up @@ -889,17 +892,18 @@ void XrdCpConfig::Usage(int rc)
" [--force] [--help] [--infiles <fn>] [--license] [--nopbar]\n"
" [--notlsok] [--path] [--parallel <n>] [--posc] [--proxy <host>:<port>]\n"
" [--recursive] [--retry <n>] [--server] [--silent] [--sources <n>]\n"
" [--streams <n>] [--tlsdata] [--tpc [delegate] {first|only}] [--verbose]\n"
" [--version] [--xrate <rate>] [--zip <file>] [--allow-http]";
" [--streams <n>] [--tlsdata] [--tlsmetalink]\n"
" [--tpc [delegate] {first|only}] [--verbose] [--version]\n"
" [--xrate <rate>] [--zip <file>] [--allow-http]\n";

static const char *Syntax2= "\n"
"<src>: [[x]root://<host>[:<port>]/]<path> | -";
"<src>: [[x]root[s]://<host>[:<port>]/]<path> | -";

static const char *Syntay2= "\n"
"<src>: [[x]root://<host>[:<port>]/]<path>";
"<src>: [[x]root[s]://<host>[:<port>]/]<path>";

static const char *Syntax3= "\n"
"<dest>: [[x]root://<host>[:<port>]/]<path> | -";
"<dest>: [[x]root[s]://<host>[:<port>]/]<path> | -";

static const char *Detail = "\n"
"-C | --cksum <args> verifies the checksum at the destination as provided\n"
Expand Down Expand Up @@ -928,6 +932,7 @@ void XrdCpConfig::Usage(int rc)
"-y | --sources <n> uses up to the number of sources specified in parallel\n"
"-S | --streams <n> copies using the specified number of TCP connections\n"
"-E | --tlsdata entrcypt data as well for xroots protocol\n"
" --tlsmetalink convert [x]root to [x]roots protocol in metalinks\n"
"-T | --tpc uses third party copy mode between the src and dest.\n"
" Both the src and dest must allow tpc mode. Argument\n"
" 'first' tries tpc and if it fails, does a normal copy;\n"
Expand Down
3 changes: 3 additions & 0 deletions src/XrdApps/XrdCpConfig.hh
Expand Up @@ -171,6 +171,9 @@ static const int DoTlsData = 0x0000000002000000LL; // -E | --tlsdata
static const int OpNoTlsOK = 0x05;
static const int DoNoTlsOK = 0x0000000004000000LL; // --notlsok

static const int OpTlsMLF = 0x06;
static const int DoTlsMLF = 0x0000000008000000LL; // --tlsmetalink

// Flag to allow the use of HTTP (and HTTPS) as source and destination
// protocols. If specified, the XrdClHttp client plugin must be available
// for the transfer operations to succeed.
Expand Down

0 comments on commit f9083d1

Please sign in to comment.