xrootd
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
XrdCl::XRootDTransport Class Reference

XRootD transport handler. More...

#include <XrdClXRootDTransport.hh>

Inheritance diagram for XrdCl::XRootDTransport:
Inheritance graph
[legend]
Collaboration diagram for XrdCl::XRootDTransport:
Collaboration graph
[legend]

Public Member Functions

 XRootDTransport ()
 Constructor. More...
 
 ~XRootDTransport ()
 Destructor. More...
 
virtual Status GetMessage (Message *message, Socket *socket)
 
virtual void InitializeChannel (AnyObject &channelData)
 Initialize channel. More...
 
virtual void FinalizeChannel (AnyObject &channelData)
 Finalize channel. More...
 
virtual Status HandShake (HandShakeData *handShakeData, AnyObject &channelData)
 HandShake. More...
 
virtual bool IsStreamTTLElapsed (time_t time, AnyObject &channelData)
 Check if the stream should be disconnected. More...
 
virtual PathID Multiplex (Message *msg, AnyObject &channelData, PathID *hint=0)
 
virtual PathID MultiplexSubStream (Message *msg, AnyObject &channelData, PathID *hint=0)
 
virtual uint16_t StreamNumber (AnyObject &channelData)
 Return a number of streams that should be created. More...
 
virtual uint16_t SubStreamNumber (AnyObject &channelData)
 Return a number of substreams per stream that should be created. More...
 
virtual bool NeedControlConnection ()
 
virtual void Disconnect (AnyObject &channelData, uint16_t streamId, uint16_t subStreamId)
 The stream has been disconnected, do the cleanups. More...
 
virtual Status Query (uint16_t query, AnyObject &result, AnyObject &channelData)
 Query the channel. More...
 
virtual bool Highjack (Message *msg, AnyObject &channelData)
 Check whether the transport can highjack the message. More...
 
- Public Member Functions inherited from XrdCl::TransportHandler
virtual ~TransportHandler ()
 

Static Public Member Functions

static Status MarshallRequest (Message *msg)
 Marshal the outgoing message. More...
 
static Status UnMarshallRequest (Message *msg)
 
static Status UnMarshallBody (Message *msg, uint16_t reqType)
 Unmarshal the body of the incomming message. More...
 
static void UnMarshallHeader (Message *msg)
 Unmarshal the header incomming message. More...
 
static void LogErrorResponse (const Message &msg)
 Log server error response. More...
 
static void SetDescription (Message *msg)
 Get the description of a message. More...
 

Private Types

typedef XrdSecProtocol *(* XrdSecGetProt_t )(const char *, const sockaddr &, const XrdSecParameters &, XrdOucErrInfo *)
 

Private Member Functions

Status HandShakeMain (HandShakeData *handShakeData, AnyObject &channelData)
 
Status HandShakeParallel (HandShakeData *handShakeData, AnyObject &channelData)
 
Message * GenerateInitialHS (HandShakeData *hsData, XRootDChannelInfo *info)
 
Message * GenerateInitialHSProtocol (HandShakeData *hsData, XRootDChannelInfo *info)
 
Status ProcessServerHS (HandShakeData *hsData, XRootDChannelInfo *info)
 
Status ProcessProtocolResp (HandShakeData *hsData, XRootDChannelInfo *info)
 
Message * GenerateBind (HandShakeData *hsData, XRootDChannelInfo *info)
 
Status ProcessBindResp (HandShakeData *hsData, XRootDChannelInfo *info)
 
Message * GenerateLogIn (HandShakeData *hsData, XRootDChannelInfo *info)
 
Status ProcessLogInResp (HandShakeData *hsData, XRootDChannelInfo *info)
 
Status DoAuthentication (HandShakeData *hsData, XRootDChannelInfo *info)
 
Status GetCredentials (XrdSecCredentials *&credentials, HandShakeData *hsData, XRootDChannelInfo *info)
 
Status CleanUpAuthentication (XRootDChannelInfo *info)
 
XrdSecGetProt_t GetAuthHandler ()
 

Static Private Member Functions

static std::string ServerFlagsToStr (uint32_t flags)
 
static std::string FileHandleToStr (const unsigned char handle[4])
 

Private Attributes

void * pSecLibHandle
 
XrdSecGetProt_t pAuthHandler
 

Detailed Description

XRootD transport handler.

Member Typedef Documentation

typedef XrdSecProtocol*(* XrdCl::XRootDTransport::XrdSecGetProt_t)(const char *, const sockaddr &, const XrdSecParameters &, XrdOucErrInfo *)
private

Constructor & Destructor Documentation

XrdCl::XRootDTransport::XRootDTransport ( )

Constructor.

XrdCl::XRootDTransport::~XRootDTransport ( )

Destructor.

References pSecLibHandle.

Member Function Documentation

Status XrdCl::XRootDTransport::CleanUpAuthentication ( XRootDChannelInfo *  info)
private
void XrdCl::XRootDTransport::Disconnect ( AnyObject &  channelData,
uint16_t  streamId,
uint16_t  subStreamId 
)
virtual
Status XrdCl::XRootDTransport::DoAuthentication ( HandShakeData *  hsData,
XRootDChannelInfo *  info 
)
private
std::string XrdCl::XRootDTransport::FileHandleToStr ( const unsigned char  handle[4])
staticprivate

Referenced by SetDescription().

void XrdCl::XRootDTransport::FinalizeChannel ( AnyObject &  channelData)
virtual

Finalize channel.

Implements XrdCl::TransportHandler.

Message * XrdCl::XRootDTransport::GenerateBind ( HandShakeData *  hsData,
XRootDChannelInfo *  info 
)
private
Message * XrdCl::XRootDTransport::GenerateInitialHS ( HandShakeData *  hsData,
XRootDChannelInfo *  info 
)
private
Message * XrdCl::XRootDTransport::GenerateInitialHSProtocol ( HandShakeData *  hsData,
XRootDChannelInfo *  info 
)
private
Message * XrdCl::XRootDTransport::GenerateLogIn ( HandShakeData *  hsData,
XRootDChannelInfo *  info 
)
private
XRootDTransport::XrdSecGetProt_t XrdCl::XRootDTransport::GetAuthHandler ( )
private
Status XrdCl::XRootDTransport::GetCredentials ( XrdSecCredentials *&  credentials,
HandShakeData *  hsData,
XRootDChannelInfo *  info 
)
private
Status XrdCl::XRootDTransport::GetMessage ( Message *  message,
Socket *  socket 
)
virtual

Read a message from the socket, the socket is non blocking, so if there is not enough data the function should retutn errRetry in which case it will be called again when more data arrives with the data previousely read stored in the message buffer

Parameters
messagethe message
socketthe socket
Returns
stOK if the message has been processed properly, stError & errRetry when the method needs to be called again to finish reading the message stError on faiure

Implements XrdCl::TransportHandler.

References XrdCl::Buffer::AdvanceCursor(), XrdCl::Buffer::Allocate(), XrdCl::Log::Dump(), XrdCl::errSocketError, XrdCl::Buffer::GetBuffer(), XrdCl::Buffer::GetBufferAtCursor(), XrdCl::Buffer::GetCursor(), XrdCl::Socket::GetFD(), XrdCl::DefaultEnv::GetLog(), XrdCl::Socket::GetName(), XrdCl::Buffer::GetSize(), ServerResponse::hdr, read(), XrdCl::Buffer::ReAllocate(), XrdCl::stError, XrdCl::stOK, ServerResponseHeader::streamid, XrdCl::suRetry, UnMarshallHeader(), and XrdCl::XRootDTransportMsg.

Status XrdCl::XRootDTransport::HandShake ( HandShakeData *  handShakeData,
AnyObject &  channelData 
)
virtual
Status XrdCl::XRootDTransport::HandShakeMain ( HandShakeData *  handShakeData,
AnyObject &  channelData 
)
private
Status XrdCl::XRootDTransport::HandShakeParallel ( HandShakeData *  handShakeData,
AnyObject &  channelData 
)
private
bool XrdCl::XRootDTransport::Highjack ( Message *  msg,
AnyObject &  channelData 
)
virtual
void XrdCl::XRootDTransport::InitializeChannel ( AnyObject &  channelData)
virtual
bool XrdCl::XRootDTransport::IsStreamTTLElapsed ( time_t  time,
AnyObject &  channelData 
)
virtual

Check if the stream should be disconnected.

Implements XrdCl::TransportHandler.

void XrdCl::XRootDTransport::LogErrorResponse ( const Message &  msg)
static
Status XrdCl::XRootDTransport::MarshallRequest ( Message *  msg)
static
PathID XrdCl::XRootDTransport::Multiplex ( Message *  msg,
AnyObject &  channelData,
PathID *  hint = 0 
)
virtual

Return the ID for the up stream this message should be sent by and the down stream which the answer should be expected at. Modify the message itself if necessary. If hint is non-zero then the message should be modified such that the answer will be returned via the hinted stream.

Implements XrdCl::TransportHandler.

PathID XrdCl::XRootDTransport::MultiplexSubStream ( Message *  msg,
AnyObject &  channelData,
PathID *  hint = 0 
)
virtual
virtual bool XrdCl::XRootDTransport::NeedControlConnection ( )
inlinevirtual

Return the information whether a control connection needs to be valid before establishing other connections

Status XrdCl::XRootDTransport::ProcessBindResp ( HandShakeData *  hsData,
XRootDChannelInfo *  info 
)
private
Status XrdCl::XRootDTransport::ProcessLogInResp ( HandShakeData *  hsData,
XRootDChannelInfo *  info 
)
private
Status XrdCl::XRootDTransport::ProcessProtocolResp ( HandShakeData *  hsData,
XRootDChannelInfo *  info 
)
private
Status XrdCl::XRootDTransport::ProcessServerHS ( HandShakeData *  hsData,
XRootDChannelInfo *  info 
)
private
Status XrdCl::XRootDTransport::Query ( uint16_t  query,
AnyObject &  result,
AnyObject &  channelData 
)
virtual
std::string XrdCl::XRootDTransport::ServerFlagsToStr ( uint32_t  flags)
staticprivate
void XrdCl::XRootDTransport::SetDescription ( Message *  msg)
static

Get the description of a message.

References ClientProtocolRequest::clientpv, ClientMvRequest::dlen, ClientQueryRequest::dlen, ClientStatRequest::dlen, ClientTruncateRequest::dlen, ClientWriteRequest::dlen, ClientRequestHdr::dlen, ClientCloseRequest::fhandle, ClientReadRequest::fhandle, ClientStatRequest::fhandle, ClientSyncRequest::fhandle, ClientTruncateRequest::fhandle, ClientWriteRequest::fhandle, readahead_list::fhandle, FileHandleToStr(), XrdCl::Buffer::GetBuffer(), ClientQueryRequest::infotype, kXR_chmod, kXR_close, kXR_coloc, kXR_delete, kXR_dirlist, kXR_force, kXR_fresh, kXR_locate, kXR_mkdir, kXR_mkdirpath, kXR_mkpath, kXR_mv, kXR_new, kXR_nowait, kXR_open, kXR_open_apnd, kXR_open_read, kXR_open_updt, kXR_ping, kXR_posc, kXR_prepare, kXR_protocol, kXR_Qckscan, kXR_Qcksum, kXR_Qconfig, kXR_Qopaque, kXR_Qopaquf, kXR_QPrep, kXR_Qspace, kXR_QStats, kXR_query, kXR_Qvisa, kXR_Qxattr, kXR_read, kXR_readv, kXR_refresh, kXR_replica, kXR_rm, kXR_rmdir, kXR_seqio, kXR_set, kXR_stage, kXR_stat, kXR_sync, kXR_truncate, kXR_vfs, kXR_wmode, kXR_write, ClientChmodRequest::mode, ClientMkdirRequest::mode, ClientOpenRequest::mode, ClientReadRequest::offset, ClientTruncateRequest::offset, ClientWriteRequest::offset, ClientLocateRequest::options, ClientMkdirRequest::options, ClientOpenRequest::options, ClientPrepareRequest::options, ClientStatRequest::options, ClientPrepareRequest::prty, ClientRequestHdr::requestid, ClientReadRequest::rlen, readahead_list::rlen, and XrdCl::Message::SetDescription().

Referenced by XrdCl::MessageUtils::AppendCGI(), XrdCl::FileSystem::ChMod(), XrdCl::FileStateHandler::Close(), XrdCl::FileSystem::DirList(), XrdCl::FileSystem::Locate(), XrdCl::FileSystem::MkDir(), XrdCl::FileSystem::Mv(), XrdCl::FileStateHandler::Open(), XrdCl::FileSystem::Ping(), XrdCl::FileSystem::Prepare(), XrdCl::FileSystem::Protocol(), XrdCl::FileSystem::Query(), XrdCl::FileStateHandler::Read(), XrdCl::FileStateHandler::ReOpenFileAtServer(), XrdCl::FileStateHandler::ReWriteFileHandle(), XrdCl::XRootDMsgHandler::RewriteRequestWait(), XrdCl::FileSystem::Rm(), XrdCl::FileSystem::RmDir(), XrdCl::FileSystem::SendInfo(), XrdCl::FileStateHandler::Stat(), XrdCl::FileSystem::Stat(), XrdCl::FileSystem::StatVFS(), XrdCl::XRootDMsgHandler::SwitchOnRefreshFlag(), XrdCl::FileStateHandler::Sync(), XrdCl::FileStateHandler::Truncate(), XrdCl::FileSystem::Truncate(), XrdCl::FileStateHandler::VectorRead(), and XrdCl::FileStateHandler::Write().

uint16_t XrdCl::XRootDTransport::StreamNumber ( AnyObject &  channelData)
virtual

Return a number of streams that should be created.

Implements XrdCl::TransportHandler.

uint16_t XrdCl::XRootDTransport::SubStreamNumber ( AnyObject &  channelData)
virtual
Status XrdCl::XRootDTransport::UnMarshallBody ( Message *  msg,
uint16_t  reqType 
)
static
void XrdCl::XRootDTransport::UnMarshallHeader ( Message *  msg)
static
Status XrdCl::XRootDTransport::UnMarshallRequest ( Message *  msg)
static

Member Data Documentation

XrdSecGetProt_t XrdCl::XRootDTransport::pAuthHandler
private

Referenced by GetAuthHandler().

void* XrdCl::XRootDTransport::pSecLibHandle
private

Referenced by GetAuthHandler(), and ~XRootDTransport().


The documentation for this class was generated from the following files: