Loading...
Searching...
No Matches
XrdClMessageUtils.cc
Go to the documentation of this file.
//------------------------------------------------------------------------------
// Copyright (c) 2011-2014 by European Organization for Nuclear Research (CERN)
// Author: Lukasz Janyst <ljanyst@cern.ch>
//------------------------------------------------------------------------------
// This file is part of the XRootD software suite.
//
// XRootD is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// XRootD is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
//
// In applying this licence, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//------------------------------------------------------------------------------
#include "XrdCl/XrdClMessageUtils.hh"
#include "XrdCl/XrdClLog.hh"
#include "XrdCl/XrdClDefaultEnv.hh"
#include "XrdCl/XrdClConstants.hh"
#include "XrdCl/XrdClAnyObject.hh"
#include "XrdCl/XrdClSIDManager.hh"
#include "XrdCl/XrdClPostMaster.hh"
#include "XrdCl/XrdClXRootDTransport.hh"
#include "XrdCl/XrdClXRootDMsgHandler.hh"
#include "XrdClRedirectorRegistry.hh"
#include "XProtocol/XProtocol.hh"
namespace XrdCl
{
//----------------------------------------------------------------------------
// Send a message
//----------------------------------------------------------------------------
XRootDStatus MessageUtils::SendMessage( const URL &url,
Message *msg,
ResponseHandler *handler,
MessageSendParams &sendParams,
LocalFileHandler *lFileHandler )
{
//--------------------------------------------------------------------------
// Get the stuff needed to send the message
//--------------------------------------------------------------------------
Log *log = DefaultEnv::GetLog();
PostMaster *postMaster = DefaultEnv::GetPostMaster();
XRootDStatus st;
if( !postMaster )
return XRootDStatus( stError, errUninitialized );
log->Dump( XRootDMsg, "[%s] Sending message %s",
url.GetHostId().c_str(), msg->GetObfuscatedDescription().c_str() );
//--------------------------------------------------------------------------
// Get an instance of SID manager object
//--------------------------------------------------------------------------
std::shared_ptr<SIDManager> sidMgr( SIDMgrPool::Instance().GetSIDMgr( url ) );
ClientRequestHdr *req = (ClientRequestHdr*)msg->GetBuffer();
//--------------------------------------------------------------------------
// Allocate the SID and marshall the message
//--------------------------------------------------------------------------
st = sidMgr->AllocateSID( req->streamid );
if( !st.IsOK() )
{
log->Error( XRootDMsg, "[%s] Unable to allocate stream id",
url.GetHostId().c_str() );
return st;
}
//--------------------------------------------------------------------------
// Make sure that in case of checkpoint xeq request the embedded request
// SID is matching
//--------------------------------------------------------------------------
if( req->requestid == kXR_chkpoint )
{
ClientRequest *r = (ClientRequest*)req;
if( r->chkpoint.opcode == kXR_ckpXeq )
{
ClientRequest *xeq = (ClientRequest*) msg->GetBuffer( sizeof( ClientChkPointRequest ) );
xeq->header.streamid[0] = req->streamid[0];
xeq->header.streamid[1] = req->streamid[1];
}
}
XRootDTransport::MarshallRequest( msg );
//--------------------------------------------------------------------------
// Create and set up the message handler
//--------------------------------------------------------------------------
XRootDMsgHandler *msgHandler;
msgHandler = new XRootDMsgHandler( msg, handler, &url, sidMgr, lFileHandler );
msgHandler->SetExpiration( sendParams.expires );
msgHandler->SetRedirectAsAnswer( !sendParams.followRedirects );
msgHandler->SetOksofarAsAnswer( sendParams.chunkedResponse );
msgHandler->SetChunkList( sendParams.chunkList );
msgHandler->SetKernelBuffer( sendParams.kbuff );
msgHandler->SetRedirectCounter( sendParams.redirectLimit );
msgHandler->SetStateful( sendParams.stateful );
msgHandler->SetCrc32cDigests( std::move( sendParams.crc32cDigests ) );
if( sendParams.loadBalancer.url.IsValid() )
msgHandler->SetLoadBalancer( sendParams.loadBalancer );
HostList *list = 0;
if( sendParams.hostList )
{
list = sendParams.hostList;
sendParams.hostList = nullptr;
}
else
list = new HostList();
list->push_back( url );
msgHandler->SetHostList( list );
//--------------------------------------------------------------------------
// Send the message
//--------------------------------------------------------------------------
st = postMaster->Send( url, msg, msgHandler, sendParams.stateful,
sendParams.expires );
if( !st.IsOK() )
{
XRootDTransport::UnMarshallRequest( msg );
log->Error( XRootDMsg, "[%s] Unable to send the message %s: %s",
url.GetHostId().c_str(), msg->GetObfuscatedDescription().c_str(),
st.ToString().c_str() );
// we need to reassign req as its current value might have been
// invalidated in the meanwhile due to a realloc
req = (ClientRequestHdr*)msg->GetBuffer();
// Release the SID as the request was never send
sidMgr->ReleaseSID( req->streamid );
delete msgHandler;
return st;
}
return XRootDStatus();
}
//----------------------------------------------------------------------------
// Redirect a message
//----------------------------------------------------------------------------
Status MessageUtils::RedirectMessage( const URL &url,
Message *msg,
ResponseHandler *handler,
MessageSendParams &sendParams,
LocalFileHandler *lFileHandler )
{
//--------------------------------------------------------------------------
// Register a new virtual redirector
//--------------------------------------------------------------------------
RedirectorRegistry& registry = RedirectorRegistry::Instance();
Status st = registry.Register( url );
if( !st.IsOK() )
return st;
//--------------------------------------------------------------------------
// Get the stuff needed to send the message
//--------------------------------------------------------------------------
Log *log = DefaultEnv::GetLog();
PostMaster *postMaster = DefaultEnv::GetPostMaster();
if( !postMaster )
return Status( stError, errUninitialized );
log->Dump( XRootDMsg, "[%s] Redirecting message %s",
url.GetHostId().c_str(), msg->GetObfuscatedDescription().c_str() );
XRootDTransport::MarshallRequest( msg );
//--------------------------------------------------------------------------
// Create and set up the message handler
//--------------------------------------------------------------------------
XRootDMsgHandler *msgHandler;
msgHandler = new XRootDMsgHandler( msg, handler, &url, std::shared_ptr<SIDManager>(), lFileHandler );
msgHandler->SetExpiration( sendParams.expires );
msgHandler->SetRedirectAsAnswer( !sendParams.followRedirects );
msgHandler->SetOksofarAsAnswer( sendParams.chunkedResponse );
msgHandler->SetChunkList( sendParams.chunkList );
msgHandler->SetRedirectCounter( sendParams.redirectLimit );
msgHandler->SetFollowMetalink( true );
HostInfo info( url, true );
info.flags = kXR_isManager | kXR_attrMeta | kXR_attrVirtRdr;
sendParams.loadBalancer = info;
msgHandler->SetLoadBalancer( info );
HostList *list = 0;
list = new HostList();
list->push_back( info );
msgHandler->SetHostList( list );
//--------------------------------------------------------------------------
// Redirect the message
//--------------------------------------------------------------------------
st = postMaster->Redirect( url, msg, msgHandler );
if( !st.IsOK() )
{
XRootDTransport::UnMarshallRequest( msg );
log->Error( XRootDMsg, "[%s] Unable to send the message %s: %s",
url.GetHostId().c_str(), msg->GetObfuscatedDescription().c_str(),
st.ToString().c_str() );
delete msgHandler;
delete list;
return st;
}
return Status();
}
//----------------------------------------------------------------------------
// Process sending params
//----------------------------------------------------------------------------
void MessageUtils::ProcessSendParams( MessageSendParams &sendParams )
{
//--------------------------------------------------------------------------
// Timeout
//--------------------------------------------------------------------------
Env *env = DefaultEnv::GetEnv();
if( sendParams.timeout == 0 )
{
int requestTimeout = DefaultRequestTimeout;
env->GetInt( "RequestTimeout", requestTimeout );
sendParams.timeout = requestTimeout;
}
if( sendParams.expires == 0 )
sendParams.expires = ::time(0)+sendParams.timeout;
//--------------------------------------------------------------------------
// Redirect limit
//--------------------------------------------------------------------------
if( sendParams.redirectLimit == 0 )
{
int redirectLimit = DefaultRedirectLimit;
env->GetInt( "RedirectLimit", redirectLimit );
sendParams.redirectLimit = redirectLimit;
}
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
void MessageUtils::RewriteCGIAndPath( Message *msg,
const URL::ParamsMap &newCgi,
bool replace,
const std::string &newPath )
{
ClientRequest *req = (ClientRequest *)msg->GetBuffer();
switch( req->header.requestid )
{
case kXR_chmod:
case kXR_mkdir:
case kXR_mv:
case kXR_open:
case kXR_rm:
case kXR_rmdir:
case kXR_stat:
case kXR_truncate:
{
//----------------------------------------------------------------------
// Get the pointer to the appropriate path
//----------------------------------------------------------------------
char *path = msg->GetBuffer( 24 );
size_t length = req->header.dlen;
if( req->header.requestid == kXR_mv )
{
for( int i = 0; i < req->header.dlen; ++i, ++path, --length )
if( *path == ' ' )
break;
++path;
--length;
}
//----------------------------------------------------------------------
// Create a fake URL from an existing CGI
//----------------------------------------------------------------------
char *pathWithNull = new char[length+1];
memcpy( pathWithNull, path, length );
pathWithNull[length] = 0;
std::ostringstream o;
o << "fake://fake:111/" << pathWithNull;
delete [] pathWithNull;
URL currentPath( o.str() );
URL::ParamsMap currentCgi = currentPath.GetParams();
MergeCGI( currentCgi, newCgi, replace );
currentPath.SetParams( currentCgi );
if( !newPath.empty() )
currentPath.SetPath( newPath );
std::string newPathWitParams = currentPath.GetPathWithFilteredParams();
//----------------------------------------------------------------------
// Write the path with the new cgi appended to the message
//----------------------------------------------------------------------
uint32_t newDlen = req->header.dlen - length + newPathWitParams.size();
msg->ReAllocate( 24+newDlen );
req = (ClientRequest *)msg->GetBuffer();
path = msg->GetBuffer( 24 );
if( req->header.requestid == kXR_mv )
{
for( int i = 0; i < req->header.dlen; ++i, ++path )
if( *path == ' ' )
break;
++path;
}
memcpy( path, newPathWitParams.c_str(), newPathWitParams.size() );
req->header.dlen = newDlen;
break;
}
case kXR_locate:
{
Env *env = DefaultEnv::GetEnv();
int preserveLocateTried = DefaultPreserveLocateTried;
env->GetInt( "PreserveLocateTried", preserveLocateTried );
if( !preserveLocateTried ) break;
//----------------------------------------------------------------------
// In case of locate we only want to preserve tried/triedrc CGI info
//----------------------------------------------------------------------
URL::ParamsMap triedCgi;
URL::ParamsMap::const_iterator itr = newCgi.find( "triedrc" );
if( itr != newCgi.end() )
triedCgi[itr->first] = itr->second;
itr = newCgi.find( "tried" );
if( itr != newCgi.end() )
triedCgi[itr->first] = itr->second;
//----------------------------------------------------------------------
// Is there anything to do?
//----------------------------------------------------------------------
if( triedCgi.empty() ) break;
//----------------------------------------------------------------------
// Get the pointer to the appropriate path
//----------------------------------------------------------------------
char *path = msg->GetBuffer( 24 );
size_t length = req->header.dlen;
//----------------------------------------------------------------------
// Create a fake URL from an existing CGI
//----------------------------------------------------------------------
std::string strpath( path, length );
std::ostringstream o;
o << "fake://fake:111/" << strpath;
URL currentPath( o.str() );
URL::ParamsMap currentCgi = currentPath.GetParams();
MergeCGI( currentCgi, triedCgi, replace );
currentPath.SetParams( currentCgi );
std::string pathWitParams = currentPath.GetPathWithFilteredParams();
//----------------------------------------------------------------------
// Write the path with the new cgi appended to the message
//----------------------------------------------------------------------
uint32_t newDlen = pathWitParams.size();
msg->ReAllocate( 24+newDlen );
req = (ClientRequest *)msg->GetBuffer();
path = msg->GetBuffer( 24 );
memcpy( path, pathWitParams.c_str(), pathWitParams.size() );
req->header.dlen = newDlen;
break;
}
}
XRootDTransport::SetDescription( msg );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void MessageUtils::MergeCGI( URL::ParamsMap &cgi1,
const URL::ParamsMap &cgi2,
bool replace )
{
URL::ParamsMap::const_iterator it;
for( it = cgi2.begin(); it != cgi2.end(); ++it )
{
if( replace || cgi1.find( it->first ) == cgi1.end() )
cgi1[it->first] = it->second;
else
{
std::string &v = cgi1[it->first];
if( v.empty() )
v = it->second;
else
{
v += ',';
v += it->second;
}
}
}
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Status MessageUtils::CreateXAttrVec( const std::vector<xattr_t> &attrs,
std::vector<char> &avec )
{
if( attrs.empty() )
return Status();
if( attrs.size() > xfaLimits::kXR_faMaxVars )
return Status( stError, errInvalidArgs );
//----------------------------------------------------------------------
// Calculate the name and value vector lengths
//----------------------------------------------------------------------
// 2 bytes for rc + 1 byte for null character at the end
static const int name_overhead = 3;
// 4 bytes for value length
static const int value_overhead = 4;
size_t nlen = 0, vlen = 0;
for( auto itr = attrs.begin(); itr != attrs.end(); ++itr )
{
nlen += std::get<xattr_name>( *itr ).size() + name_overhead;
vlen += std::get<xattr_value>( *itr ).size() + value_overhead;
}
if( nlen > xfaLimits::kXR_faMaxNlen )
return Status( stError, errInvalidArgs );
if( vlen > xfaLimits::kXR_faMaxVlen )
return Status( stError, errInvalidArgs );
//----------------------------------------------------------------------
// Create name and value vectors
//----------------------------------------------------------------------
avec.resize( nlen + vlen, 0 );
char *nvec = avec.data(), *vvec = avec.data() + nlen;
for( auto itr = attrs.begin(); itr != attrs.end(); ++itr )
{
const std::string &name = std::get<xattr_name>( *itr );
nvec = ClientFattrRequest::NVecInsert( name.c_str(), nvec );
const std::string &value = std::get<xattr_value>( *itr );
vvec = ClientFattrRequest::VVecInsert( value.c_str(), vvec );
}
return Status();
}
//------------------------------------------------------------------------
// Create xattr name vector vector
//------------------------------------------------------------------------
Status MessageUtils::CreateXAttrVec( const std::vector<std::string> &attrs,
std::vector<char> &nvec )
{
if( attrs.empty() )
return Status();
if( attrs.size() > xfaLimits::kXR_faMaxVars )
return Status( stError, errInvalidArgs );
//----------------------------------------------------------------------
// Calculate the name and value vector lengths
//----------------------------------------------------------------------
// 2 bytes for rc + 1 byte for null character at the end
static const int name_overhead = 3;
size_t nlen = 0;
for( auto itr = attrs.begin(); itr != attrs.end(); ++itr )
nlen += itr->size() + name_overhead;
if( nlen > xfaLimits::kXR_faMaxNlen )
return Status( stError, errInvalidArgs );
//----------------------------------------------------------------------
// Create name vector
//----------------------------------------------------------------------
nvec.resize( nlen, 0 );
char *nptr = nvec.data();
for( auto itr = attrs.begin(); itr != attrs.end(); ++itr )
nptr = ClientFattrRequest::NVecInsert( itr->c_str(), nptr );
return Status();
}
}
XProtocol.hh
kXR_isManager
#define kXR_isManager
Definition XProtocol.hh:1156
kXR_attrMeta
#define kXR_attrMeta
Definition XProtocol.hh:1159
ClientRequestHdr::streamid
kXR_char streamid[2]
Definition XProtocol.hh:156
kXR_ckpXeq
static const int kXR_ckpXeq
Definition XProtocol.hh:216
ClientChkPointRequest::opcode
kXR_char opcode
Definition XProtocol.hh:206
ClientRequest::header
struct ClientRequestHdr header
Definition XProtocol.hh:846
ClientRequestHdr::requestid
kXR_unt16 requestid
Definition XProtocol.hh:157
kXR_open
@ kXR_open
Definition XProtocol.hh:122
kXR_mkdir
@ kXR_mkdir
Definition XProtocol.hh:120
kXR_chmod
@ kXR_chmod
Definition XProtocol.hh:114
kXR_rm
@ kXR_rm
Definition XProtocol.hh:126
kXR_rmdir
@ kXR_rmdir
Definition XProtocol.hh:127
kXR_truncate
@ kXR_truncate
Definition XProtocol.hh:140
kXR_mv
@ kXR_mv
Definition XProtocol.hh:121
kXR_stat
@ kXR_stat
Definition XProtocol.hh:129
kXR_chkpoint
@ kXR_chkpoint
Definition XProtocol.hh:124
kXR_locate
@ kXR_locate
Definition XProtocol.hh:139
kXR_attrVirtRdr
#define kXR_attrVirtRdr
Definition XProtocol.hh:1162
kXR_faMaxVars
@ kXR_faMaxVars
Definition XProtocol.hh:280
kXR_faMaxVlen
@ kXR_faMaxVlen
Definition XProtocol.hh:282
kXR_faMaxNlen
@ kXR_faMaxNlen
Definition XProtocol.hh:281
ClientRequest::chkpoint
struct ClientChkPointRequest chkpoint
Definition XProtocol.hh:849
ClientRequestHdr::dlen
kXR_int32 dlen
Definition XProtocol.hh:159
ClientRequest
Definition XProtocol.hh:845
ClientChkPointRequest
Definition XProtocol.hh:201
ClientRequestHdr
Definition XProtocol.hh:155
XrdClAnyObject.hh
XrdClConstants.hh
XrdClDefaultEnv.hh
XrdClLog.hh
XrdClMessageUtils.hh
XrdClPostMaster.hh
XrdClRedirectorRegistry.hh
XrdClSIDManager.hh
XrdClXRootDMsgHandler.hh
XrdClXRootDTransport.hh
XrdCl::Buffer::ReAllocate
void ReAllocate(uint32_t size)
Reallocate the buffer to a new location of a given size.
Definition XrdClBuffer.hh:88
XrdCl::Buffer::GetBuffer
const char * GetBuffer(uint32_t offset=0) const
Get the message buffer.
Definition XrdClBuffer.hh:72
XrdCl::DefaultEnv::GetLog
static Log * GetLog()
Get default log.
Definition XrdClDefaultEnv.cc:493
XrdCl::DefaultEnv::GetPostMaster
static PostMaster * GetPostMaster()
Get default post master.
Definition XrdClDefaultEnv.cc:453
XrdCl::DefaultEnv::GetEnv
static Env * GetEnv()
Get default client environment.
Definition XrdClDefaultEnv.cc:445
XrdCl::Env
Definition XrdClEnv.hh:38
XrdCl::Env::GetInt
bool GetInt(const std::string &key, int &value)
Definition XrdClEnv.cc:89
XrdCl::LocalFileHandler
Definition XrdClLocalFileHandler.hh:33
XrdCl::Log
Handle diagnostics.
Definition XrdClLog.hh:101
XrdCl::Log::Error
void Error(uint64_t topic, const char *format,...)
Report an error.
Definition XrdClLog.cc:231
XrdCl::Log::Dump
void Dump(uint64_t topic, const char *format,...)
Print a dump message.
Definition XrdClLog.cc:299
XrdCl::MessageUtils::MergeCGI
static void MergeCGI(URL::ParamsMap &cgi1, const URL::ParamsMap &cgi2, bool replace)
Merge cgi2 into cgi1.
Definition XrdClMessageUtils.cc:378
XrdCl::MessageUtils::CreateXAttrVec
static Status CreateXAttrVec(const std::vector< xattr_t > &attrs, std::vector< char > &avec)
Create xattr vector.
Definition XrdClMessageUtils.cc:404
XrdCl::MessageUtils::ProcessSendParams
static void ProcessSendParams(MessageSendParams &sendParams)
Process sending params.
Definition XrdClMessageUtils.cc:220
XrdCl::MessageUtils::RewriteCGIAndPath
static void RewriteCGIAndPath(Message *msg, const URL::ParamsMap &newCgi, bool replace, const std::string &newPath)
Append cgi to the one already present in the message.
Definition XrdClMessageUtils.cc:250
XrdCl::MessageUtils::RedirectMessage
static Status RedirectMessage(const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams, LocalFileHandler *lFileHandler)
Redirect message.
Definition XrdClMessageUtils.cc:150
XrdCl::MessageUtils::SendMessage
static XRootDStatus SendMessage(const URL &url, Message *msg, ResponseHandler *handler, MessageSendParams &sendParams, LocalFileHandler *lFileHandler)
Send message.
Definition XrdClMessageUtils.cc:43
XrdCl::Message
The message representation used throughout the system.
Definition XrdClMessage.hh:32
XrdCl::Message::GetObfuscatedDescription
const std::string & GetObfuscatedDescription() const
Get the description of the message with authz parameter obfuscated.
Definition XrdClMessage.hh:106
XrdCl::PostMaster
A hub for dispatching and receiving messages.
Definition XrdClPostMaster.hh:48
XrdCl::PostMaster::Send
XRootDStatus Send(const URL &url, Message *msg, MsgHandler *handler, bool stateful, time_t expires)
Definition XrdClPostMaster.cc:223
XrdCl::PostMaster::Redirect
Status Redirect(const URL &url, Message *msg, MsgHandler *handler)
Definition XrdClPostMaster.cc:238
XrdCl::RedirectorRegistry
Singleton access to URL to virtual redirector mapping.
Definition XrdClRedirectorRegistry.hh:119
XrdCl::RedirectorRegistry::Instance
static RedirectorRegistry & Instance()
Returns reference to the single instance.
Definition XrdClRedirectorRegistry.cc:29
XrdCl::RedirectorRegistry::Register
XRootDStatus Register(const URL &url)
Creates a new virtual redirector and registers it (async).
Definition XrdClRedirectorRegistry.cc:103
XrdCl::ResponseHandler
Handle an async response.
Definition XrdClXRootDResponses.hh:1127
XrdCl::SIDMgrPool::Instance
static SIDMgrPool & Instance()
Definition XrdClSIDManager.hh:139
XrdCl::URL
URL representation.
Definition XrdClURL.hh:31
XrdCl::URL::GetHostId
std::string GetHostId() const
Get the host part of the URL (user:password@host:port).
Definition XrdClURL.hh:99
XrdCl::URL::ParamsMap
std::map< std::string, std::string > ParamsMap
Definition XrdClURL.hh:33
XrdCl::URL::SetParams
void SetParams(const std::string &params)
Set params.
Definition XrdClURL.cc:402
XrdCl::URL::GetPathWithFilteredParams
std::string GetPathWithFilteredParams() const
Get the path with params, filteres out 'xrdcl.'.
Definition XrdClURL.cc:331
XrdCl::URL::SetPath
void SetPath(const std::string &path)
Set the path.
Definition XrdClURL.hh:225
XrdCl::URL::GetParams
const ParamsMap & GetParams() const
Get the URL params.
Definition XrdClURL.hh:244
XrdCl::URL::IsValid
bool IsValid() const
Is the url valid.
Definition XrdClURL.cc:452
XrdCl::XRootDMsgHandler
Handle/Process/Forward XRootD messages.
Definition XrdClXRootDMsgHandler.hh:120
XrdCl::XRootDMsgHandler::SetRedirectCounter
void SetRedirectCounter(uint16_t redirectCounter)
Set the redirect counter.
Definition XrdClXRootDMsgHandler.hh:417
XrdCl::XRootDMsgHandler::SetFollowMetalink
void SetFollowMetalink(bool followMetalink)
Definition XrdClXRootDMsgHandler.hh:422
XrdCl::XRootDMsgHandler::SetChunkList
void SetChunkList(ChunkList *chunkList)
Set the chunk list.
Definition XrdClXRootDMsgHandler.hh:390
XrdCl::XRootDMsgHandler::SetHostList
void SetHostList(HostList *hostList)
Set host list.
Definition XrdClXRootDMsgHandler.hh:382
XrdCl::XRootDMsgHandler::SetCrc32cDigests
void SetCrc32cDigests(std::vector< uint32_t > &&crc32cDigests)
Definition XrdClXRootDMsgHandler.hh:401
XrdCl::XRootDMsgHandler::SetLoadBalancer
void SetLoadBalancer(const HostInfo &loadBalancer)
Set the load balancer.
Definition XrdClXRootDMsgHandler.hh:371
XrdCl::XRootDMsgHandler::SetStateful
void SetStateful(bool stateful)
Definition XrdClXRootDMsgHandler.hh:427
XrdCl::XRootDMsgHandler::SetOksofarAsAnswer
void SetOksofarAsAnswer(bool oksofarAsAnswer)
Definition XrdClXRootDMsgHandler.hh:355
XrdCl::XRootDMsgHandler::SetKernelBuffer
void SetKernelBuffer(XrdSys::KernelBuffer *kbuff)
Set the kernel buffer.
Definition XrdClXRootDMsgHandler.hh:409
XrdCl::XRootDMsgHandler::SetExpiration
void SetExpiration(time_t expiration)
Set a timestamp after which we give up.
Definition XrdClXRootDMsgHandler.hh:329
XrdCl::XRootDMsgHandler::SetRedirectAsAnswer
void SetRedirectAsAnswer(bool redirectAsAnswer)
Definition XrdClXRootDMsgHandler.hh:346
XrdCl::XRootDStatus
Request status.
Definition XrdClXRootDResponses.hh:219
XrdCl::XRootDTransport::SetDescription
static void SetDescription(Message *msg)
Get the description of a message.
Definition XrdClXRootDTransport.hh:245
XrdCl::XRootDTransport::UnMarshallRequest
static XRootDStatus UnMarshallRequest(Message *msg)
Definition XrdClXRootDTransport.cc:1259
XrdCl::XRootDTransport::MarshallRequest
static XRootDStatus MarshallRequest(Message *msg)
Marshal the outgoing message.
Definition XrdClXRootDTransport.hh:175
XrdCl
Definition XrdClAction.hh:34
XrdCl::DefaultPreserveLocateTried
const int DefaultPreserveLocateTried
Definition XrdClConstants.hh:87
XrdCl::DefaultRedirectLimit
const int DefaultRedirectLimit
Definition XrdClConstants.hh:59
XrdCl::errUninitialized
const uint16_t errUninitialized
Definition XrdClStatus.hh:60
XrdCl::stError
const uint16_t stError
An error occurred that could potentially be retried.
Definition XrdClStatus.hh:32
XrdCl::XRootDMsg
const uint64_t XRootDMsg
Definition XrdClConstants.hh:39
XrdCl::HostList
std::vector< HostInfo > HostList
Definition XrdClXRootDResponses.hh:1121
XrdCl::errInvalidArgs
const uint16_t errInvalidArgs
Definition XrdClStatus.hh:58
XrdCl::DefaultRequestTimeout
const int DefaultRequestTimeout
Definition XrdClConstants.hh:54
XrdCl::value
Response NullRef< Response >::value
Definition XrdClOperationHandlers.hh:128
ClientFattrRequest::VVecInsert
static char * VVecInsert(const char *value, char *buffer)
Definition XProtocol.cc:188
ClientFattrRequest::NVecInsert
static char * NVecInsert(const char *name, char *buffer)
Definition XProtocol.cc:172
XrdCl::HostInfo
Definition XrdClXRootDResponses.hh:1110
XrdCl::HostInfo::url
URL url
URL of the host.
Definition XrdClXRootDResponses.hh:1118
XrdCl::HostInfo::flags
uint32_t flags
Host type.
Definition XrdClXRootDResponses.hh:1115
XrdCl::MessageSendParams
Definition XrdClMessageUtils.hh:132
XrdCl::MessageSendParams::hostList
HostList * hostList
Definition XrdClMessageUtils.hh:142
XrdCl::MessageSendParams::stateful
bool stateful
Definition XrdClMessageUtils.hh:141
XrdCl::MessageSendParams::crc32cDigests
std::vector< uint32_t > crc32cDigests
Definition XrdClMessageUtils.hh:146
XrdCl::MessageSendParams::kbuff
XrdSys::KernelBuffer * kbuff
Definition XrdClMessageUtils.hh:145
XrdCl::MessageSendParams::timeout
uint16_t timeout
Definition XrdClMessageUtils.hh:136
XrdCl::MessageSendParams::loadBalancer
HostInfo loadBalancer
Definition XrdClMessageUtils.hh:138
XrdCl::MessageSendParams::chunkList
ChunkList * chunkList
Definition XrdClMessageUtils.hh:143
XrdCl::MessageSendParams::expires
time_t expires
Definition XrdClMessageUtils.hh:137
XrdCl::MessageSendParams::redirectLimit
uint16_t redirectLimit
Definition XrdClMessageUtils.hh:144
XrdCl::MessageSendParams::chunkedResponse
bool chunkedResponse
Definition XrdClMessageUtils.hh:140
XrdCl::MessageSendParams::followRedirects
bool followRedirects
Definition XrdClMessageUtils.hh:139
XrdCl::Status
Procedure execution status.
Definition XrdClStatus.hh:115
XrdCl::Status::IsOK
bool IsOK() const
We're fine.
Definition XrdClStatus.hh:124
XrdCl::Status::ToString
std::string ToString() const
Create a string representation.
Definition XrdClStatus.cc:97