XRootD
Loading...
Searching...
No Matches
XrdXrootdProtocol Class Reference

#include <XrdXrootdProtocol.hh>

+ Inheritance diagram for XrdXrootdProtocol:
+ Collaboration diagram for XrdXrootdProtocol:

Classes

struct  GetDataCtl
 
union  GetDataCtl.__unnamed186__
 
union  GetDataCtl.__unnamed188__
 
struct  RC_Table
 
struct  RD_Table
 

Public Member Functions

 XrdXrootdProtocol ()
 
 ~XrdXrootdProtocol ()
 
void aioUpdate (int val)
 
void aioUpdReq (int val)
 
XrdSfsXioHandle Claim (const char *buff, int datasz, int minasz=0) override
 
int do_WriteSpan ()
 
void DoIt () override
 
int getData (gdCallBack *gdcbP, const char *dtype, char *buff, int blen)
 
int getData (gdCallBack *gdcbP, const char *dtype, struct iovec *iov, int iovn)
 
int getDump (const char *dtype, int dlen)
 
int getPathID ()
 
XrdProtocolMatch (XrdLink *lp) override
 
XrdXrootdProtocol operator= (const XrdXrootdProtocol &rhs)=delete
 
int Process (XrdLink *lp) override
 
int Process2 ()
 
int ProcSig ()
 
void Recycle (XrdLink *lp, int consec, const char *reason) override
 
int SendFile (int fildes) override
 
int SendFile (XrdOucSFVec *sfvec, int sfvnum) override
 
void SetFD (int fildes) override
 
int Stats (char *buff, int blen, int do_sync=0) override
 
void StreamNOP ()
 
XrdSfsXioHandle Swap (const char *buff, XrdSfsXioHandle h=0) override
 
XrdXrootdProtocolVerifyStream (int &rc, int pID, bool lok=true)
 
- Public Member Functions inherited from XrdProtocol
 XrdProtocol (const char *jname)
 
virtual ~XrdProtocol ()
 
- Public Member Functions inherited from XrdJob
 XrdJob (const char *desc="")
 
virtual ~XrdJob ()
 
- Public Member Functions inherited from XrdXrootd::gdCallBack
 gdCallBack ()
 
virtual ~gdCallBack ()
 
virtual void gdFail ()
 
- Public Member Functions inherited from XrdSfsDio
 XrdSfsDio ()
 Constructor and destructor.
 
virtual ~XrdSfsDio ()
 
- Public Member Functions inherited from XrdSfsXio
 XrdSfsXio (XrdSfsXioImpl &xioimpl)
 
virtual ~XrdSfsXio ()
 Constructor and destructor.
 

Static Public Member Functions

static char * Buffer (XrdSfsXioHandle h, int *bsz)
 
static int Configure (char *parms, XrdProtocol_Config *pi)
 
static void Reclaim (XrdSfsXioHandle h)
 
- Static Public Member Functions inherited from XrdSfsXio
static char * Buffer (XrdSfsXioHandle theHand, int *buffsz=0)
 
static void Reclaim (XrdSfsXioHandle theHand)
 

Static Public Attributes

static bool as_aioOK = true
 
static bool as_force = false
 
static int as_maxperlnk = 8
 
static int as_maxperreq = 8
 
static int as_maxpersrv = 4096
 
static int as_maxstalls = 4
 
static int as_miniosz = 98304
 
static int as_minsfsz = 8192
 
static bool as_nosf = false
 
static short as_okstutter = 1
 
static int as_seghalf = 32768
 
static int as_segsize = 65536
 
static bool as_syncw = false
 
static short as_timeout = 45
 
static const int maxStreams = 16
 

Protected Member Functions

void MonAuth ()
 
int SetSF (kXR_char *fhandle, bool seton=false)
 

Static Protected Member Functions

static unsigned int getSID ()
 

Protected Attributes

bool ableTLS
 
char * AppName
 
XrdBufferargp
 
XrdSecProtocolAuthProt
 
unsigned char CapVer
 
XrdSecEntityClient
 
int clientPV
 
int clientRN
 
int cumReadP
 
int cumReads
 
int cumReadV
 
int cumSegsV
 
int cumSegsW
 
int cumWrites
 
int cumWritV
 
char doTLS
 
XrdSysCondVar2endNote
 
XrdSecEntity Entity
 
XrdXrootdFileTableFTab
 
struct XrdXrootdProtocol::GetDataCtl gdCtl
 
int halfBSize
 
int hcNext
 
int hcNow
 
int hcPrev
 
XrdXrootd::IOParms IO
 
bool isActive
 
bool isDead
 
bool isLinkWT
 
bool isNOP
 
bool isTLS
 
XrdLinkLink
 
RAtomic_int linkAioReq
 
XrdXrootdMonitor::User Monitor
 
int myBlast
 
int myBlen
 
char * myBuff
 
unsigned int mySID
 
int myStalls
 
bool newPio
 
int numFiles
 
int numReadP
 
int numReads
 
int numReadV
 
int numSegsV
 
int numSegsW
 
int numWrites
 
int numWritV
 
short PathID
 
XrdXrootdPgwCtlpgwCtl
 
XrdXrootdPiopioFirst
 
XrdXrootdPiopioFree
 
XrdXrootdPiopioLast
 
bool pmDone
 
XrdNetPMark::HandlepmHandle
 
int PrepareCount
 
XrdSecProtectProtect
 
short rdType
 
XrdXrootdReqID ReqID
 
ClientRequest Request
 
char reserved [3]
 
XrdXrootdResponse Response
 
int(XrdXrootdProtocol::* Resume )()
 
int(XrdXrootdProtocol::* ResumePio )()
 
XrdSysSemaphorereTry
 
unsigned char rvSeq
 
char sigBuff [64]
 
bool sigHere
 
bool sigNeed
 
bool sigRead
 
SecurityRequest sigReq
 
ClientRequest sigReq2Ver
 
bool sigWarn
 
char Status
 
XrdXrootdProtocolStream [maxStreams]
 
XrdSysMutex streamMutex
 
long long totReadP
 
XrdSysMutex unbindMutex
 
XrdXrootdWVInfowvInfo
 
unsigned char wvSeq
 

Static Protected Attributes

static XrdNetSocketAdminSock = 0
 
static XrdBuffManagerBPool
 
static XrdSecServiceCIA = 0
 
static bool CL_Redir = false
 
static XrdSecProtectorDHS = 0
 
static XrdSfsFileSystemdigFS = 0
 
static XrdSysErroreDest = XrdXrootd::eLog
 
static uint64_t fsFeatures = 0
 
static int hailWait
 
static int hcMax = 28657
 
static bool isProxy = false
 
static char isRedir = 0
 
static char JobCKCGI =0
 
static XrdXrootdJobJobCKS = 0
 
static char * JobCKT = 0
 
static XrdOucTListJobCKTLST = 0
 
static char JobLCL = 0
 
static time_t keepT = 86400
 
static bool LimitError = true
 
static XrdXrootdFileLockLocker
 
static int maxBuffsz
 
static const int maxPio = 4
 
static int maxReadv_ior
 
static int maxTransz = 262144
 
static const char * myCName = 0
 
static int myCNlen = 0
 
static gid_t myGID = 0
 
static const char * myGName = "?"
 
static int myGNLen = 1
 
static const char * myInst = 0
 
static int myPID = static_cast<int>(getpid())
 
static int myRole = 0
 
static int myRolf = 0
 
static uid_t myUID = 0
 
static const char * myUName = "?"
 
static int myUNLen = 1
 
static char * Notify = 0
 
static bool OD_Bypass = false
 
static bool OD_Redir = false
 
static int OD_Stall = 33
 
static XrdSfsFileSystemosFS
 
static XrdNetPMarkPMark = 0
 
static int Port
 
static bool PrepareAlt = false
 
static int PrepareLimit = -1
 
static XrdOucReqIDPrepID = 0
 
static int readWait
 
static const char Req_TLSData = 0x01
 
static const char Req_TLSGPFile = 0x02
 
static const char Req_TLSLogin = 0x04
 
static const char Req_TLSSess = 0x08
 
static const char Req_TLSTPC = 0x10
 
static struct XrdXrootdProtocol::RD_Table Route [RD_Num]
 
static struct XrdXrootdProtocol::RC_Table RouteClient
 
static XrdXrootdXPath RPList
 
static XrdXrootdXPath RQList
 
static int RQLxist = 0
 
static XrdSchedulerSched
 
static XrdXrootdStatsSI
 
static RAtomic_int srvrAioOps = {0}
 
static char tlsCap = 0
 
static XrdTlsContexttlsCtx = 0
 
static char tlsNot = 0
 
static int tlsPort = 0
 
static const char * TraceID = "Protocol"
 
static int usxMaxNsz = kXR_faMaxNlen
 
static int usxMaxVsz = kXR_faMaxVlen
 
static char * usxParms = 0
 
static int Window
 
static XrdXrootdXPath XPList
 

Friends

class XrdXrootdAdmin
 

Additional Inherited Members

- Public Attributes inherited from XrdJob
const char * Comment
 
XrdJobNextJob
 

Detailed Description

Definition at line 154 of file XrdXrootdProtocol.hh.


Class Documentation

◆ XrdXrootdProtocol::GetDataCtl.__unnamed186__

union XrdXrootdProtocol::GetDataCtl.__unnamed186__

Definition at line 547 of file XrdXrootdProtocol.hh.

+ Collaboration diagram for XrdXrootdProtocol::GetDataCtl.__unnamed186__:
Class Members
int BuffLen
int DumpLen
int iovAdj

◆ XrdXrootdProtocol::GetDataCtl.__unnamed188__

union XrdXrootdProtocol::GetDataCtl.__unnamed188__

Definition at line 555 of file XrdXrootdProtocol.hh.

+ Collaboration diagram for XrdXrootdProtocol::GetDataCtl.__unnamed188__:
Class Members
char * Buffer
struct iovec * iovVec

◆ XrdXrootdProtocol::RC_Table

struct XrdXrootdProtocol::RC_Table

Definition at line 440 of file XrdXrootdProtocol.hh.

+ Collaboration diagram for XrdXrootdProtocol::RC_Table:
Class Members
char * Domain[4]
short DomCnt
bool lclDom
bool pvtIP

◆ XrdXrootdProtocol::RD_Table

struct XrdXrootdProtocol::RD_Table

Definition at line 436 of file XrdXrootdProtocol.hh.

+ Collaboration diagram for XrdXrootdProtocol::RD_Table:
Class Members
char * Host[2]
unsigned short Port[2]
short RDSz[2]

Constructor & Destructor Documentation

◆ XrdXrootdProtocol()

XrdXrootdProtocol::XrdXrootdProtocol ( )

Definition at line 257 of file XrdXrootdProtocol.cc.

258 : XrdProtocol("xroot protocol handler"),
259 XrdSfsXio(SfsXioImpl),
260 ProtLink(this), Entity(0), AppName(0)
261{
262 Reset();
263}
XrdProtocol(const char *jname)
XrdSfsXio(XrdSfsXioImpl &xioimpl)
Definition XrdSfsXio.cc:52

Referenced by Match().

+ Here is the caller graph for this function:

◆ ~XrdXrootdProtocol()

XrdXrootdProtocol::~XrdXrootdProtocol ( )
inline

Definition at line 212 of file XrdXrootdProtocol.hh.

212{Cleanup();}

Member Function Documentation

◆ aioUpdate()

void XrdXrootdProtocol::aioUpdate ( int val)
inline

Definition at line 160 of file XrdXrootdProtocol.hh.

160{srvrAioOps += val;}
static RAtomic_int srvrAioOps

References srvrAioOps.

Referenced by XrdXrootdAioBuff::Alloc(), XrdXrootdAioPgrw::Alloc(), XrdXrootdAioBuff::Recycle(), and XrdXrootdAioPgrw::Recycle().

+ Here is the caller graph for this function:

◆ aioUpdReq()

void XrdXrootdProtocol::aioUpdReq ( int val)
inline

Definition at line 162 of file XrdXrootdProtocol.hh.

162{linkAioReq += val;}

References linkAioReq.

Referenced by XrdXrootdNormAio::Read(), XrdXrootdPgrwAio::Read(), XrdXrootdNormAio::Recycle(), XrdXrootdPgrwAio::Recycle(), XrdXrootdNormAio::Write(), and XrdXrootdPgrwAio::Write().

+ Here is the caller graph for this function:

◆ Buffer()

char * XrdXrootdProtocol::Buffer ( XrdSfsXioHandle h,
int * bsz )
static

Definition at line 889 of file XrdXrootdProtocol.cc.

890{
891 XrdBuffer *xbP = (XrdBuffer *)h;
892
893 if (h)
894 {if (bsz) *bsz = xbP->bsize;
895 return xbP->buff;
896 }
897 if (bsz) *bsz = 0;
898 return 0;
899}
char * buff
Definition XrdBuffer.hh:45

References XrdBuffer::bsize, and XrdBuffer::buff.

◆ Claim()

XrdSfsXioHandle XrdXrootdProtocol::Claim ( const char * curBuff,
int datasz,
int minasz = 0 )
overridevirtual

Claim ownership of the current buffer if it is memory effecient to do so.

Parameters
curBuff- The address of the current buffer. It must match the the buffer that was most recently passed to the caller.
datasz- Number of useful bytes in the buffer (i.e. write size).
minasz- Minimum buffer size that would be allocated to copy data.
Returns
!0 The buffer handle of the current buffer is returned along with ownership rights.
=0 Too much memory would be wasted by transferring ownership (errno == 0) or an error ocurred (errno != 0). When an error see Swap() below for possible types of errors.

Implements XrdSfsXio.

Definition at line 905 of file XrdXrootdProtocol.cc.

907{
908
909// Qualify swap choice
910//
911 if (minasz >= argp->bsize || datasz >= argp->bsize/2) return Swap(buff);
912 errno = 0;
913 return 0;
914}
XrdSfsXioHandle Swap(const char *buff, XrdSfsXioHandle h=0) override

References argp, XrdBuffer::bsize, and Swap().

+ Here is the call graph for this function:

◆ Configure()

int XrdXrootdProtocol::Configure ( char * parms,
XrdProtocol_Config * pi )
static

Definition at line 166 of file XrdXrootdConfig.cc.

167{
168/*
169 Function: Establish configuration at load time.
170
171 Input: None.
172
173 Output: 0 upon success or !0 otherwise.
174*/
175
177 (XrdSfsFileSystem *nativeFS,
179 const char *configFn,
180 const char *theParms);
181
182 XrdOucEnv xrootdEnv;
183 XrdXrootdXPath *xp;
184 char *adminp, *rdf, *bP, *tmp, buff[1024];
185 int i, n;
186
187// Copy out the special info we want to use at top level
188//
189 eDest.logger(pi->eDest->logger());
190 XrdXrootdTrace.SetLogger(pi->eDest->logger());
191 SI = new XrdXrootdStats(pi->Stats);
193 Sched = pi->Sched; XrdXrootd::Sched = pi->Sched;
194 BPool = pi->BPool; XrdXrootd::BPool = pi->BPool;
195 hailWait = pi->hailWait;
196 readWait = pi->readWait;
197 Port = pi->Port;
198 myInst = pi->myInst;
199 Window = pi->WSize;
200 tlsPort = pi->tlsPort;
201 tlsCtx = pi->tlsCtx;
202 XrdXrootdCF = pi->totalCF;
203
204// Record globally accessible values
205//
207 XrdXrootdPort = pi->Port;
208
209// Set the callback object static areas now!
210//
212
213// Pick up exported paths from the command line
214//
215 for (i = 1; i < pi->argc; i++) xexpdo(pi->argv[i]);
216
217// Pre-initialize some i/o values. Note that we now set maximum readv element
218// transfer size to the buffer size (before it was a reasonable 256K).
219//
220 n = (pi->theEnv ? pi->theEnv->GetInt("MaxBuffSize") : 0);
221 maxTransz = maxBuffsz = (n ? n : BPool->MaxSize());
223
224// Export the readv_ior_max and readv_iov_max values
225//
226 {char buff[256];
227 snprintf(buff, sizeof(buff), "%d,%d", maxReadv_ior, XrdProto::maxRvecsz);
228 XrdOucEnv::Export("XRD_READV_LIMITS", buff);
229 }
230
231 memset(Route, 0, sizeof(Route));
232
233// Now process and configuration parameters
234//
235 rdf = (parms && *parms ? parms : pi->ConfigFN);
236 if (rdf && Config(rdf)) return 0;
238
239// Initialize the packet marking framework if configured. We do that here as
240// nothing else following this code can fail but we can so be consistent.
241//
242 bool bad = false;
244 if (PMark)
245 {if (pi->theEnv) pi->theEnv->PutPtr("XrdNetPMark*", PMark);
246 xrootdEnv.PutPtr("XrdNetPMark*", PMark);
247 }
248 else if (bad) return 0;
249
250// Check if we are exporting a generic object name
251//
253 {eDest.Say("Config exporting ", XPList.Path(n)); n += 2;}
254 else n = 0;
255
256// Check if we are exporting anything
257//
258 if (!(xp = XPList.Next()) && !n)
259 {XPList.Insert("/tmp"); n = 8;
260 eDest.Say("Config warning: only '/tmp' will be exported.");
261 } else {
262 while(xp) {eDest.Say("Config exporting ", xp->Path(i));
263 n += i+2; xp = xp->Next();
264 }
265 }
266
267// Export the exports
268//
269 bP = tmp = (char *)malloc(n);
271 {strcpy(bP, XPList.Path(i)); bP += i, *bP++ = ' ';}
272 xp = XPList.Next();
273 while(xp) {strcpy(bP, xp->Path(i)); bP += i; *bP++ = ' '; xp = xp->Next();}
274 *(bP-1) = '\0';
275 XrdOucEnv::Export("XRDEXPORTS", tmp); free(tmp);
276
277// Initialize the security system if this is wanted
278//
279 if (!ConfigSecurity(xrootdEnv, pi->ConfigFN)) return 0;
280
281// Set up the network for self-identification and display it
282//
283 pi->NetTCP->netIF.Port(Port);
284 pi->NetTCP->netIF.Display("Config ");
285
286// Establish our specific environment that will be passed along
287//
288 xrootdEnv.PutPtr("XrdInet*", (void *)(pi->NetTCP));
289 xrootdEnv.PutPtr("XrdNetIF*", (void *)(&(pi->NetTCP->netIF)));
290 xrootdEnv.PutPtr("XrdScheduler*", Sched);
291
292// Copy over the xrd environment which contains plugin argv's
293//
294 if (pi->theEnv) xrootdEnv.PutPtr("xrdEnv*", pi->theEnv);
295
296// Initialize monitoring (it won't do anything if it wasn't enabled). This
297// needs to be done before we load any plugins as plugins may need monitoring.
298//
299 if (!ConfigMon(pi, xrootdEnv)) return 0;
300
301// Get the filesystem to be used and its features.
302//
303 if (!ConfigFS(xrootdEnv, pi->ConfigFN)) return 0;
306 if (pi->theEnv) pi->theEnv->PutPtr("XrdSfsFileSystem*", osFS);
307
308// Check if the file system includes a custom prepare handler as this will
309// affect how we handle prepare requests.
310//
311 if (fsFeatures & XrdSfs::hasPRP2 || xrootdEnv.Get("XRD_PrepHandler"))
312 PrepareAlt = true;
313
314// Check if the diglib should be loaded. We only support the builtin one. In
315// the future we will have to change this code to be like the above.
316//
317 if (digParm)
318 {TRACE(DEBUG, "Loading dig filesystem builtin");
319 digFS = XrdDigGetFS(osFS, eDest.logger(), pi->ConfigFN, digParm);
320 if (!digFS) eDest.Emsg("Config","Unable to load digFS; "
321 "remote debugging disabled!");
322 }
323
324// Check if we are going to be processing checksums locally
325//
326 if (JobCKT) {
327 XrdOucString csList(1024);
328 XrdOucErrInfo myError("Config");
330 int csNum = 0;
331 do {
332 if(JobLCL) {
333 // Check natively supported checksum
334 if (osFS->chksum(XrdSfsFileSystem::csSize, tP->text, 0, myError)) {
335 eDest.Emsg("Config", tP->text, "checksum is not natively supported.");
336 return 0;
337 }
338 }
339 tP->ival[1] = myError.getErrInfo();
340 if (csNum) csList += ',';
341 csList.append(csNum);
342 csList.append(':');
343 csList.append(tP->text);
344 csNum++;
345 tP = tP->next;
346 } while (tP);
347 if (csNum) XrdOucEnv::Export("XRD_CSLIST", csList.c_str());
348 }
349
350// Initialiaze for AIO. If we are not in debug mode and aio is enabled then we
351// turn off async I/O if tghe filesystem requests it or if this is a caching
352// proxy and we were asked not to use aio in such a cacse.
353//
354 if (!(asyncFlags & asDebug) && as_aioOK)
355 {if (fsFeatures & XrdSfs::hasNAIO) as_aioOK = false;
356 else if (asyncFlags & asNoCache && fsFeatures & XrdSfs::hasCACH)
357 as_aioOK = false;
358 if (!as_aioOK) eDest.Say("Config asynchronous I/O has been disabled!");
359 }
360
361// Compute the maximum stutter allowed during async I/O (one per 64k)
362//
363 if (as_segsize > 65536) as_okstutter = as_segsize/65536;
364
365// Establish final sendfile processing mode. This may be turned off by the
366// link or by the SFS plugin usually because it's a proxy.
367//
368 const char *why = 0;
369 if (!as_nosf)
370 {if (fsFeatures & XrdSfs::hasNOSF) why = "file system plugin.";
371 else if (!XrdLink::sfOK) why = "OS kernel.";
372 if (why)
373 {as_nosf = true;
374 eDest.Say("Config sendfile has been disabled by ", why);
375 }
376 }
377
378// Create the file lock manager and initialize file handling
379//
382
383// Schedule protocol object cleanup (also advise the transit protocol)
384//
385 ProtStack.Set(pi->Sched, &XrdXrootdTrace, TRACE_MEM);
386 n = (pi->ConnMax/3 ? pi->ConnMax/3 : 30);
387 ProtStack.Set(n, 60*60);
388 XrdXrootdTransit::Init(pi->Sched, n, 60*60);
389
390// Initialize the request ID generation object
391//
392 PrepID = new XrdOucReqID(pi->urAddr, (int)Port);
393
394// Initialize for prepare processing
395//
397 sprintf(buff, "%%s://%s:%d/&L=%%d&U=%%s", pi->myName, pi->Port);
398 Notify = strdup(buff);
399
400// Set the redirect flag if we are a pure redirector
401//
402 int tlsFlags = myRole & kXR_tlsAny;
404 if ((rdf = getenv("XRDREDIRECT"))
405 && (!strcmp(rdf, "R") || !strcmp(rdf, "M")))
406 {isRedir = *rdf;
408 if (!strcmp(rdf, "M")) myRole |=kXR_attrMeta;
409 }
411 myRole |= tlsFlags;
412
413// Turn off client redirects if we are neither a redirector nor a proxy server
414//
415 if (CL_Redir && !isRedir && !isProxy)
416 {CL_Redir = false;
417 eDest.Say("Config warning: 'redirect client' ignored; "
418 "not a redirector nor a proxy server");
419 }
420
421// Check if we are redirecting anything
422//
423 if ((xp = RPList.Next()))
424 {int k;
425 char buff[2048], puff[1024];
426 do {k = xp->Opts();
427 if (Route[k].Host[0] == Route[k].Host[1]
428 && Route[k].Port[0] == Route[k].Port[1]) *puff = 0;
429 else sprintf(puff, "%%%s:%d", Route[k].Host[1], Route[k].Port[1]);
430 sprintf(buff," to %s:%d%s",Route[k].Host[0],Route[k].Port[0],puff);
431 eDest.Say("Config redirect static ", xp->Path(), buff);
432 xp = xp->Next();
433 } while(xp);
434 }
435
436 if ((xp = RQList.Next()))
437 {int k;
438 const char *cgi1, *cgi2;
439 char buff[2048], puff[1024], xCgi[RD_Num] = {0};
440 if (isRedir) {cgi1 = "+"; cgi2 = getenv("XRDCMSCLUSTERID");}
441 else {cgi1 = ""; cgi2 = pi->myName;}
442 myCNlen = snprintf(buff, sizeof(buff), "%s%s", cgi1, cgi2);
443 myCName = strdup(buff);
444 do {k = xp->Opts();
445 if (Route[k].Host[0] == Route[k].Host[1]
446 && Route[k].Port[0] == Route[k].Port[1]) *puff = 0;
447 else sprintf(puff, "%%%s:%d", Route[k].Host[1], Route[k].Port[1]);
448 sprintf(buff," to %s:%d%s",Route[k].Host[0],Route[k].Port[0],puff);
449 eDest.Say("Config redirect enoent ", xp->Path(), buff);
450 if (!xCgi[k] && cgi2)
451 {bool isdup = Route[k].Host[0] == Route[k].Host[1]
452 && Route[k].Port[0] == Route[k].Port[1];
453 for (i = 0; i < 2; i++)
454 {n = snprintf(buff,sizeof(buff), "%s?tried=%s%s",
455 Route[k].Host[i], cgi1, cgi2);
456 free(Route[k].Host[i]); Route[k].Host[i] = strdup(buff);
457 Route[k].RDSz[i] = n;
458 if (isdup) {Route[k].Host[1] = Route[k].Host[0];
459 Route[k].RDSz[1] = n; break;
460 }
461 }
462 }
463 xCgi[k] = 1;
464 xp = xp->Next();
465 } while(xp);
466 }
467
468// Add all jobs that we can run to the admin object
469//
470 if (JobCKS) XrdXrootdAdmin::addJob("chksum", JobCKS);
471
472// Establish the path to be used for admin functions. We will loose this
473// storage upon an error but we don't care because we'll just exit.
474//
475 adminp = XrdOucUtils::genPath(pi->AdmPath, 0, ".xrootd");
476
477// Setup the admin path (used in all roles).
478//
479 if (!(AdminSock = XrdNetSocket::Create(&eDest, adminp, "admin", pi->AdmMode))
480 || !XrdXrootdAdmin::Init(&eDest, AdminSock)) return 0;
481
482// Indicate whether or not we support extended attributes
483//
484 {XrdOucEnv myEnv;
485 XrdOucErrInfo eInfo("", &myEnv);
486 char buff[128];
487 if (osFS->FAttr(0, eInfo, 0) == SFS_OK)
488 {usxMaxNsz = myEnv.GetInt("usxMaxNsz");
489 if (usxMaxNsz < 0) usxMaxNsz = 0;
490 usxMaxVsz = myEnv.GetInt("usxMaxVsz");
491 if (usxMaxVsz < 0) usxMaxVsz = 0;
492 snprintf(buff, sizeof(buff), "%d %d", usxMaxNsz, usxMaxVsz);
493 usxParms = strdup(buff);
494 } else {
495 usxMaxNsz = 0;
496 usxMaxVsz = 0;
497 usxParms = strdup("0 0");
498 }
499 }
500
501// Finally, check if we really need to be in bypass mode if it is set
502//
503 if (OD_Bypass)
504 {const char *penv = getenv("XRDXROOTD_PROXY");
505 if (!penv || *penv != '=')
506 {OD_Bypass = false;
507 eDest.Say("Config warning: 'fsoverload bypass' ignored; "
508 "not a forwarding proxy.");
509 }
510 }
511
512// Add any additional features
513//
519
520// Finally note whether or not we have TLS enabled
521//
522 if (tlsCtx) myRole |= kXR_haveTLS;
523
524// Return success
525//
526 free(adminp);
527 return 1;
528}
#define kXR_isManager
#define kXR_suppgrw
#define kXR_attrMeta
#define kXR_haveTLS
#define kXR_anongpf
#define kXR_tlsAny
#define kXR_isServer
#define kXR_attrProxy
#define kXR_LBalServer
#define kXR_supposc
#define kXR_DataServer
#define kXR_supgpf
#define DEBUG(x)
static XrdSysLogger Logger
XrdSfsFileSystem * XrdDigGetFS(XrdSfsFileSystem *native_fs, XrdSysLogger *lp, const char *cFN, const char *parms)
Definition XrdDigFS.cc:105
XrdOucTrace * XrdXrootdTrace
#define SFS_OK
#define TRACE_MEM
Definition XrdTrace.hh:38
#define TRACE(act, x)
Definition XrdTrace.hh:63
#define TRACE_ALL
Definition XrdTrace.hh:35
const char * XrdXrootdInstance
XrdXrootdPrepare * XrdXrootdPrepQ
XrdOucString * XrdXrootdCF
int XrdXrootdPort
#define XROOTDXP_NOSLASH
static XrdNetIF netIF
Definition XrdInet.hh:68
void Display(const char *pfx="=====> ")
Definition XrdNetIF.cc:142
int Port()
Definition XrdNetIF.hh:276
static XrdNetPMark * Config(XrdSysError *eLog, XrdScheduler *sched, XrdSysTrace *trc, bool &fatal)
static XrdNetSocket * Create(XrdSysError *Say, const char *path, const char *fn, mode_t mode, int isudp=0)
void Set(int inQMax, time_t agemax=1800)
Definition XrdObject.icc:90
long GetInt(const char *varname)
Definition XrdOucEnv.cc:235
char * Get(const char *varname)
Definition XrdOucEnv.hh:69
static int Export(const char *Var, const char *Val)
Definition XrdOucEnv.cc:170
void PutPtr(const char *varname, void *value)
Definition XrdOucEnv.cc:298
XrdOucTList * next
static char * genPath(const char *path, const char *inst, const char *psfx=0)
const char * myName
XrdBuffManager * BPool
XrdScheduler * Sched
XrdTlsContext * tlsCtx
const char * AdmPath
XrdSysError * eDest
XrdOucString * totalCF
XrdOucEnv * theEnv
const char * myInst
virtual int chksum(csFunc Func, const char *csName, const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)
virtual int FAttr(XrdSfsFACtl *faReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
void Say(const char *text1, const char *text2=0, const char *txt3=0, const char *text4=0, const char *text5=0, const char *txt6=0)
XrdSysLogger * logger(XrdSysLogger *lp=0)
static int Init(XrdSysError *erp, XrdNetSocket *asock)
static void addJob(const char *jname, XrdXrootdJob *jp)
static void setVals(XrdSysError *erp, XrdXrootdStats *SIp, XrdScheduler *schp, int port)
static void Init(XrdXrootdFileLock *lp, XrdSysError *erP, bool sfok)
static XrdXrootdStats * SI
static const char * myInst
static XrdSfsFileSystem * digFS
static XrdNetPMark * PMark
static XrdXrootdXPath RPList
static XrdNetSocket * AdminSock
static XrdXrootdJob * JobCKS
static XrdSysError & eDest
static const char * myCName
static XrdXrootdFileLock * Locker
static XrdTlsContext * tlsCtx
static XrdXrootdXPath XPList
static XrdScheduler * Sched
static XrdOucTList * JobCKTLST
static XrdXrootdXPath RQList
static XrdBuffManager * BPool
static uint64_t fsFeatures
static XrdOucReqID * PrepID
static struct XrdXrootdProtocol::RD_Table Route[RD_Num]
static XrdSfsFileSystem * osFS
static void Init(XrdScheduler *schedP, int qMax, int qTTL)
Perform one-time initialization.
XrdXrootdXPath * Next()
void Insert(const char *pd, int popt=0, int flags=XROOTDXP_OK)
static const int maxRvecsz
Definition XProtocol.hh:686
static const uint64_t hasPGRW
Feature: pgRead and pgWrite.
static const uint64_t hasPRP2
Feature: Prepare Handler Version 2 (different calling conventions)
static const uint64_t hasGPFA
Feature: gpFile anonymous.
static const uint64_t hasCACH
Feature: Implements a data cache.
static const uint64_t hasNOSF
Feature: Supports no sendfile.
static const uint64_t hasPOSC
Feature: Persist On Successful Close.
static const uint64_t hasGPF
Feature: gpFile.
static const uint64_t hasNAIO
Feature: Supports no async I/O.
static const uint64_t hasPRXY
Feature: Proxy Server.
XrdXrootdStats * SI
XrdScheduler * Sched
XrdBuffManager * BPool

References XrdXrootdAdmin::addJob(), AdminSock, XrdProtocol_Config::AdmMode, XrdProtocol_Config::AdmPath, XrdOucString::append(), XrdProtocol_Config::argc, XrdProtocol_Config::argv, as_aioOK, as_nosf, as_okstutter, as_segsize, XrdProtocol_Config::BPool, XrdXrootd::BPool, BPool, XrdOucString::c_str(), XrdSfsFileSystem::chksum(), CL_Redir, XrdNetPMarkCfg::Config(), XrdProtocol_Config::ConfigFN, XrdProtocol_Config::ConnMax, XrdNetSocket::Create(), XrdSfsFileSystem::csSize, DEBUG, XrdProtocol_Config::DebugON, digFS, XrdNetIF::Display(), XrdProtocol_Config::eDest, eDest, XrdSysError::Emsg(), XrdOucEnv::Export(), XrdSfsFileSystem::FAttr(), XrdSfsFileSystem::Features(), fsFeatures, XrdOucUtils::genPath(), XrdOucEnv::Get(), XrdOucErrInfo::getErrInfo(), XrdOucEnv::GetInt(), XrdProtocol_Config::hailWait, hailWait, XrdSfs::hasCACH, XrdSfs::hasGPF, XrdSfs::hasGPFA, XrdSfs::hasNAIO, XrdSfs::hasNOSF, XrdSfs::hasPGRW, XrdSfs::hasPOSC, XrdSfs::hasPRP2, XrdSfs::hasPRXY, XrdXrootdProtocol::RD_Table::Host, XrdXrootdTransit::Init(), XrdXrootdAdmin::Init(), XrdXrootdFile::Init(), XrdXrootdXPath::Insert(), isProxy, isRedir, JobCKS, JobCKT, JobCKTLST, JobLCL, kXR_anongpf, kXR_attrMeta, kXR_attrProxy, kXR_DataServer, kXR_haveTLS, kXR_isManager, kXR_isServer, kXR_LBalServer, kXR_supgpf, kXR_suppgrw, kXR_supposc, kXR_tlsAny, Locker, Logger, XrdSysError::logger(), maxBuffsz, maxReadv_ior, XrdProto::maxRvecsz, XrdBuffManager::MaxSize(), maxTransz, myCName, myCNlen, XrdProtocol_Config::myInst, myInst, XrdProtocol_Config::myName, myRole, myRolf, XrdInet::netIF, XrdProtocol_Config::NetTCP, XrdOucTList::next, XrdXrootdXPath::Next(), Notify, OD_Bypass, XrdXrootdXPath::Opts(), osFS, XrdXrootdXPath::Path(), PMark, XrdProtocol_Config::Port, XrdNetIF::Port(), Port, XrdXrootdProtocol::RD_Table::Port, PrepareAlt, PrepID, XrdOucEnv::PutPtr(), XrdXrootdProtocol::RD_Table::RDSz, XrdProtocol_Config::readWait, readWait, Route, RPList, RQList, XrdSysError::Say(), XrdProtocol_Config::Sched, XrdXrootd::Sched, Sched, XrdObjectQ< T >::Set(), XrdXrootdCallBack::setVals(), XrdLink::sfOK, SFS_OK, XrdXrootd::SI, SI, XrdProtocol_Config::Stats, XrdOucTList::text, XrdProtocol_Config::theEnv, XrdProtocol_Config::tlsCtx, tlsCtx, XrdProtocol_Config::tlsPort, tlsPort, XrdProtocol_Config::totalCF, TRACE, TRACE_ALL, TRACE_MEM, usxMaxNsz, usxMaxVsz, usxParms, XrdOucTrace::What, Window, XrdProtocol_Config::WSize, XPList, XrdDigGetFS(), XrdXrootdCF, XrdXrootdInstance, XrdXrootdPort, XrdXrootdPrepQ, XrdXrootdTrace, and XROOTDXP_NOSLASH.

Referenced by XrdgetProtocol().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ do_WriteSpan()

int XrdXrootdProtocol::do_WriteSpan ( )

Definition at line 3349 of file XrdXrootdXeq.cc.

3350{
3351 int rc;
3353 numWrites++;
3354
3355// Unmarshall the data
3356//
3358 n2hll(Request.write.offset, IO.Offset);
3359
3360// Find the file object. We will only drain socket data on the control path.
3361// .
3362 if (!FTab || !(IO.File = FTab->Get(fh.handle)))
3363 {IO.IOLen -= myBlast;
3364 IO.File = 0;
3365 return do_WriteNone(Request.write.pathid);
3366 }
3367
3368// If we are monitoring, insert a write entry
3369//
3370 if (Monitor.InOut())
3373
3374// Trace this entry
3375//
3376 TRACEP(FSIO, "fh=" <<fh.handle <<" write " <<IO.IOLen <<'@' <<IO.Offset);
3377
3378// Write data that was already read
3379//
3380 if ((rc = IO.File->XrdSfsp->write(IO.Offset, myBuff, myBlast)) < 0)
3381 {IO.IOLen = IO.IOLen-myBlast; IO.EInfo[0] = rc; IO.EInfo[1] = 0;
3382 return do_WriteNone();
3383 }
3384 IO.Offset += myBlast; IO.IOLen -= myBlast;
3385
3386// See if we need to finish this request in the normal way
3387//
3388 if (IO.IOLen > 0) return do_WriteAll();
3389 return Response.Send();
3390}
kXR_char fhandle[4]
Definition XProtocol.hh:805
struct ClientRequestHdr header
Definition XProtocol.hh:844
struct ClientWriteRequest write
Definition XProtocol.hh:874
#define TRACEP(act, x)
virtual XrdSfsXferSize write(XrdSfsFileOffset offset, const char *buffer, XrdSfsXferSize size)=0
XrdXrootdFile * Get(int fnum)
XrdSfsFile * XrdSfsp
XrdXrootdFileStats Stats
XrdXrootdMonitor * Agent
void Add_wr(kXR_unt32 dictid, kXR_int32 wlen, kXR_int64 offset)
XrdXrootd::IOParms IO
XrdXrootdFileTable * FTab
XrdXrootdMonitor::User Monitor
XrdXrootdResponse Response

References XrdXrootdMonitor::Add_wr(), XrdXrootdMonitor::User::Agent, ClientRequestHdr::dlen, ClientWriteRequest::dlen, ClientWriteRequest::fhandle, XrdXrootd::IOParms::File, XrdXrootdFileStats::FileID, FTab, XrdXrootdFileTable::Get(), XrdXrootdFHandle::handle, ClientRequest::header, XrdXrootdMonitor::User::InOut(), IO, XrdXrootd::IOParms::IOLen, Monitor, myBlast, myBuff, numWrites, ClientWriteRequest::offset, ClientWriteRequest::pathid, Request, Response, XrdXrootdResponse::Send(), XrdXrootdFile::Stats, TRACEP, ClientRequest::write, XrdSfsFile::write(), and XrdXrootdFile::XrdSfsp.

+ Here is the call graph for this function:

◆ DoIt()

void XrdXrootdProtocol::DoIt ( )
inlineoverridevirtual

Implements XrdJob.

Definition at line 170 of file XrdXrootdProtocol.hh.

170{(*this.*Resume)();}
int(XrdXrootdProtocol::* Resume)()

References Resume.

◆ getData() [1/2]

int XrdXrootdProtocol::getData ( gdCallBack * gdcbP,
const char * dtype,
char * buff,
int blen )

Referenced by Process(), and ProcSig().

+ Here is the caller graph for this function:

◆ getData() [2/2]

int XrdXrootdProtocol::getData ( gdCallBack * gdcbP,
const char * dtype,
struct iovec * iov,
int iovn )

◆ getDump()

int XrdXrootdProtocol::getDump ( const char * dtype,
int dlen )

Definition at line 1389 of file XrdXrootdProtocol.cc.

1390{
1391 bool inCB = (gdCtl.Status == GetDataCtl::inCallBk);
1392
1393// Setup the control information to direct the vector read
1394//
1395 memset((char *)&gdCtl, 0, sizeof(gdCtl));
1396 gdCtl.DumpLen = dlen; // Bytes left to drain
1397 gdCtl.ioDType = dtype; // Name of the data being read for tracing
1399
1400// Effect the read. We prevent recursive calls if this was called while
1401// we were in a callback, which is possible due to I/O continuations.
1402//
1403 return (inCB ? 1 : getDumpCont());
1404}
struct XrdXrootdProtocol::GetDataCtl gdCtl

References gdCtl, XrdXrootdProtocol::GetDataCtl::inCallBk, XrdXrootdProtocol::GetDataCtl::inDump, XrdXrootdProtocol::GetDataCtl::ioDType, and XrdXrootdProtocol::GetDataCtl::Status.

Referenced by XrdXrootdAioTask::gdDone().

+ Here is the caller graph for this function:

◆ getPathID()

int XrdXrootdProtocol::getPathID ( )
inline

Definition at line 182 of file XrdXrootdProtocol.hh.

182{return PathID;}

References PathID.

Referenced by XrdXrootdAioFob::Reset(), XrdXrootdAioFob::Schedule(), and XrdXrootdAioFob::Schedule().

+ Here is the caller graph for this function:

◆ getSID()

unsigned int XrdXrootdProtocol::getSID ( )
staticprotected

Definition at line 269 of file XrdXrootdProtocol.cc.

270{
271 static XrdSysMutex SidMutex;
272 static unsigned int Sid = 1;
273 unsigned int theSid;
274
275// Generate unqiue number for this server instance
276//
277 AtomicBeg(SidMutex);
278 theSid = AtomicInc(Sid);
279 AtomicEnd(SidMutex);
280 return theSid;
281}
#define AtomicInc(x)
#define AtomicBeg(Mtx)
#define AtomicEnd(Mtx)

References AtomicBeg, AtomicEnd, and AtomicInc.

◆ Match()

XrdProtocol * XrdXrootdProtocol::Match ( XrdLink * lp)
overridevirtual

Implements XrdProtocol.

Definition at line 289 of file XrdXrootdProtocol.cc.

290{
291static const int hsSZ = sizeof(ClientInitHandShake);
292 char hsbuff[hsSZ];
293 struct ClientInitHandShake *hsData = (ClientInitHandShake *)hsbuff;
294
295static struct hs_response
296 {kXR_unt16 streamid;
297 kXR_unt16 status;
298 kXR_unt32 rlen; // Specified as kXR_int32 in doc!
299 kXR_unt32 pval; // Specified as kXR_int32 in doc!
300 kXR_unt32 styp; // Specified as kXR_int32 in doc!
301 } hsresp={0, 0, htonl(8), htonl(kXR_PROTOCOLVERSION),
302 (isRedir ? htonl((unsigned int)kXR_LBalServer)
303 : htonl((unsigned int)kXR_DataServer))};
305int dlen, rc;
306
307// Peek at the first 20 bytes of data
308//
309 if ((dlen = lp->Peek(hsbuff, hsSZ, hailWait)) < hsSZ)
310 {if (dlen <= 0) lp->setEtext("handshake not received");
311 return (XrdProtocol *)0;
312 }
313
314// Trace the data
315//
316// TRACEI(REQ, "received: " <<Trace->bin2hex(hsbuff,dlen));
317
318// Verify that this is our protocol
319//
320 hsData->fourth = ntohl(hsData->fourth);
321 hsData->fifth = ntohl(hsData->fifth);
322 if (hsData->first || hsData->second || hsData->third
323 || hsData->fourth != 4 || hsData->fifth != ROOTD_PQ) return 0;
324
325// Send the handshake response. We used optimize the subsequent protocol
326// request sent with handshake but the protocol request is now overloaded.
327//
328 rc = lp->Send((char *)&hsresp, sizeof(hsresp));
329
330// Verify that our handshake response was actually sent
331//
332 if (!rc)
333 {lp->setEtext("handshake failed");
334 return (XrdProtocol *)0;
335 }
336
337// We can now read all 20 bytes and discard them (no need to wait for it)
338//
339 if (lp->Recv(hsbuff, hsSZ) != hsSZ)
340 {lp->setEtext("reread failed");
341 return (XrdProtocol *)0;
342 }
343
344// Get a protocol object off the stack (if none, allocate a new one)
345//
346 if (!(xp = ProtStack.Pop())) xp = new XrdXrootdProtocol();
347
348// Bind the protocol to the link and return the protocol
349//
350 SI->Bump(SI->Count);
351 xp->Link = lp;
352 xp->Response.Set(lp);
353 strcpy(xp->Entity.prot, "host");
354 xp->Entity.host = (char *)lp->Host();
355 xp->Entity.addrInfo = lp->AddrInfo();
356 return (XrdProtocol *)xp;
357}
#define kXR_PROTOCOLVERSION
Definition XProtocol.hh:70
unsigned int kXR_unt32
Definition XPtypes.hh:90
unsigned short kXR_unt16
Definition XPtypes.hh:67
#define ROOTD_PQ
T * Pop()
Definition XrdObject.hh:93
void Bump(int &val)
XrdNetAddrInfo * addrInfo
Entity's connection details.
char prot[XrdSecPROTOIDSIZE]
Auth protocol used (e.g. krb5)
char * host
Entity's host name dnr dependent.
void Set(XrdLink *lp)

References XrdXrootdProtocol(), XrdLink::AddrInfo(), XrdSecEntity::addrInfo, XrdOucStats::Bump(), XrdXrootdStats::Count, Entity, ClientInitHandShake::fifth, ClientInitHandShake::first, ClientInitHandShake::fourth, hailWait, XrdLink::Host(), XrdSecEntity::host, isRedir, kXR_DataServer, kXR_LBalServer, kXR_PROTOCOLVERSION, Link, XrdLink::Peek(), XrdObjectQ< T >::Pop(), XrdSecEntity::prot, XrdLink::Recv(), Response, ROOTD_PQ, ClientInitHandShake::second, XrdLink::Send(), XrdXrootdResponse::Set(), XrdLink::setEtext(), SI, and ClientInitHandShake::third.

+ Here is the call graph for this function:

◆ MonAuth()

void XrdXrootdProtocol::MonAuth ( )
protected

Definition at line 4086 of file XrdXrootdXeq.cc.

4087{
4088 char Buff[4096];
4089 const char *bP = Buff;
4090
4091 if (Client == &Entity) bP = Entity.moninfo;
4092 else {snprintf(Buff,sizeof(Buff),
4093 "&p=%s&n=%s&h=%s&o=%s&r=%s&g=%s&m=%s%s&I=%c",
4094 Client->prot,
4095 (Client->name ? Client->name : ""),
4096 (Client->host ? Client->host : ""),
4097 (Client->vorg ? Client->vorg : ""),
4098 (Client->role ? Client->role : ""),
4099 (Client->grps ? Client->grps : ""),
4100 (Client->moninfo ? Client->moninfo : ""),
4101 (Entity.moninfo ? Entity.moninfo : ""),
4102 (clientPV & XrdOucEI::uIPv4 ? '4' : '6')
4103 );
4104 Client->secMon = &Monitor;
4105 }
4106
4107 Monitor.Report(bP);
4108 if (Entity.moninfo) {free(Entity.moninfo); Entity.moninfo = 0;}
4109}
XrdSecMonitor * secMon
If !0 security monitoring enabled.
char * name
Entity's name.
char * moninfo
Information for monitoring.
void Report(const char *Info)

References Client, clientPV, Entity, XrdSecEntity::grps, XrdSecEntity::host, XrdSecEntity::moninfo, Monitor, XrdSecEntity::name, XrdSecEntity::prot, XrdXrootdMonitor::User::Report(), XrdSecEntity::role, XrdSecEntity::secMon, XrdOucEI::uIPv4, and XrdSecEntity::vorg.

+ Here is the call graph for this function:

◆ operator=()

XrdXrootdProtocol XrdXrootdProtocol::operator= ( const XrdXrootdProtocol & rhs)
delete

◆ Process()

int XrdXrootdProtocol::Process ( XrdLink * lp)
overridevirtual

Implements XrdProtocol.

Reimplemented in XrdXrootdTransit.

Definition at line 366 of file XrdXrootdProtocol.cc.

367{
368 int rc;
369 kXR_unt16 reqID;
370
371// Check if we are servicing a slow link
372//
373 if (Resume)
374 {if (myBlen && (rc = getData("data", myBuff, myBlen)) != 0) return rc;
375 else if ((rc = (*this.*Resume)()) != 0) return rc;
376 else {Resume = 0; return 0;}
377 }
378
379// Read the next request header
380//
381 if ((rc=getData("request",(char *)&Request,sizeof(Request))) != 0) return rc;
382
383// Check if we need to copy the request prior to unmarshalling it
384//
385 reqID = ntohs(Request.header.requestid);
386 if (reqID != kXR_sigver && NEED2SECURE(Protect)(Request))
387 {memcpy(&sigReq2Ver, &Request, sizeof(ClientRequest));
388 sigNeed = true;
389 }
390
391// Deserialize the data
392//
393 Request.header.requestid = reqID;
396 TRACEP(REQ, "req=" <<XProtocol::reqName(reqID)
397 <<" dlen=" <<Request.header.dlen);
398
399// Every request has an associated data length. It better be >= 0 or we won't
400// be able to know how much data to read.
401//
402 if (Request.header.dlen < 0)
403 {Response.Send(kXR_ArgInvalid, "Invalid request data length");
404 return Link->setEtext("protocol data length error");
405 }
406
407// Process sigver requests now as they appear ahead of a request
408//
409 if (reqID == kXR_sigver) return ProcSig();
410
411// Read any argument data at this point, except when the request is a write.
412// The argument may have to be segmented and we're not prepared to do that here.
413//
414 if (reqID != kXR_write && reqID != kXR_pgwrite && Request.header.dlen)
415 {if (!argp || Request.header.dlen+1 > argp->bsize)
416 {if (argp) BPool->Release(argp);
417 if (!(argp = BPool->Obtain(Request.header.dlen+1)))
418 {Response.Send(kXR_ArgTooLong, "Request argument is too long");
419 return 0;
420 }
421 hcNow = hcPrev; halfBSize = argp->bsize >> 1;
422 }
423 argp->buff[Request.header.dlen] = '\0';
424 if ((rc = getData("arg", argp->buff, Request.header.dlen)))
425 {Resume = &XrdXrootdProtocol::Process2; return rc;}
426 }
427
428// Continue with request processing at the resume point
429//
430 return Process2();
431}
@ kXR_ArgInvalid
Definition XProtocol.hh:988
@ kXR_ArgTooLong
Definition XProtocol.hh:990
kXR_char streamid[2]
Definition XProtocol.hh:156
kXR_unt16 requestid
Definition XProtocol.hh:157
@ kXR_sigver
Definition XProtocol.hh:141
@ kXR_write
Definition XProtocol.hh:131
@ kXR_pgwrite
Definition XProtocol.hh:138
#define NEED2SECURE(protP)
This class implements the XRootD protocol security protection.
static const char * reqName(kXR_unt16 reqCode)
Definition XProtocol.cc:151
void Release(XrdBuffer *bp)
Definition XrdBuffer.cc:221
XrdBuffer * Obtain(int bsz)
Definition XrdBuffer.cc:140
XrdSecProtect * Protect
int getData(gdCallBack *gdcbP, const char *dtype, char *buff, int blen)

References argp, BPool, XrdBuffer::bsize, XrdBuffer::buff, ClientRequestHdr::dlen, getData(), halfBSize, hcNow, hcPrev, ClientRequest::header, kXR_ArgInvalid, kXR_ArgTooLong, kXR_pgwrite, kXR_sigver, kXR_write, Link, myBlen, myBuff, NEED2SECURE, XrdBuffManager::Obtain(), Process2(), ProcSig(), Protect, XrdBuffManager::Release(), XProtocol::reqName(), Request, ClientRequestHdr::requestid, Response, Resume, XrdXrootdResponse::Send(), XrdXrootdResponse::Set(), XrdLink::setEtext(), sigNeed, sigReq2Ver, ClientRequestHdr::streamid, and TRACEP.

Referenced by XrdXrootdTransit::Process().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Process2()

int XrdXrootdProtocol::Process2 ( )

Definition at line 437 of file XrdXrootdProtocol.cc.

438{
439// If we are verifying requests, see if this request needs to be verified
440//
441 if (sigNeed)
442 {const char *eText = "Request not signed";
443 if (!sigHere || (eText = Protect->Verify(sigReq,sigReq2Ver,argp->buff)))
444 {Response.Send(kXR_SigVerErr, eText);
446 <<" verification failed; " <<eText);
447 SI->Bump(SI->badSCnt);
448 return Link->setEtext(eText);
449 } else {
450 SI->Bump(SI->aokSCnt);
451 sigNeed = sigHere = false;
452 }
453 } else {
454 if (sigHere)
456 <<" unneeded signature discarded.");
457 if (sigWarn)
458 {eDest.Emsg("Protocol","Client is needlessly signing requests.");
459 sigWarn = false;
460 }
461 SI->Bump(SI->ignSCnt);
462 sigHere = false;
463 }
464 }
465
466// If the user is not yet logged in, restrict what the user can do
467//
468 if (!Status)
469 switch(Request.header.requestid)
470 {case kXR_login: return do_Login();
471 case kXR_protocol: return do_Protocol();
472 case kXR_bind: return do_Bind();
474 "Invalid request; user not logged in");
475 return Link->setEtext("request without login");
476 }
477
478// Help the compiler, select the the high activity requests (the ones with
479// file handles) in a separate switch statement. A special case exists for
480// sync() which return with a callback, so handle it here. Note that stat(fh)
481// normally never does a callback but historically we allowed it to do so.
482// We maintain that capability even when it's likely never used.
483//
484 switch(Request.header.requestid) // First, the ones with file handles
485 {case kXR_read: return do_Read();
486 case kXR_readv: return do_ReadV();
487 case kXR_write: return do_Write();
488 case kXR_writev: return do_WriteV();
489 case kXR_pgread: return do_PgRead();
490 case kXR_pgwrite: return do_PgWrite();
492 return do_Sync();
494 return do_Close();
495 case kXR_stat: if (!Request.header.dlen)
497 return do_Stat();
498 }
499 break;
501 if (!Request.header.dlen) return do_Truncate();
502 break;
503 case kXR_query: if (!Request.header.dlen) return do_Qfh();
504 break;
505 case kXR_chkpoint: return do_ChkPnt();
506 default: break;
507 }
508
509// Now select the requests that do not need authentication
510//
511 switch(Request.header.requestid)
512 {case kXR_protocol: return do_Protocol(); // dlen ignored
513 case kXR_ping: return do_Ping(); // dlen ignored
514 default: break;
515 }
516
517// Force authentication at this point, if need be
518//
519 if (Status & XRD_NEED_AUTH)
520 {int rc;
521 if (Request.header.requestid == kXR_auth) rc = do_Auth();
523 "Invalid request; user not authenticated");
524 rc = -1;
525 }
527 return rc;
528 }
529
530// Construct request ID as the following functions are async eligible
531//
533
534// Process items that don't need arguments but may have them
535//
536 switch(Request.header.requestid)
537 {case kXR_endsess: return do_Endsess();
538 default: break;
539 }
540
541// All remaining requests require an argument. Make sure we have one
542//
543 if (!argp || !Request.header.dlen)
544 {Response.Send(kXR_ArgMissing, "Required argument not present");
545 return 0;
546 }
547
548// All of the subsequent requests can be redirected and are subject to
549// prefunctory redirection which we check here.
550//
551 if (CL_Redir && !Link->hasBridge())
552 {bool doRdr = false;
553 if (Link->AddrInfo()->isPrivate()) rdType = 1;
554 if (RouteClient.pvtIP && rdType) doRdr = true;
556 doRdr = true;
557 else if (RouteClient.DomCnt)
558 {XrdOucString hName = Link->Host();
559 for (int i = 0; i < RouteClient.DomCnt; i++)
560 {if (hName.endswith(RouteClient.Domain[i]))
561 {doRdr = true; break;}
562 }
563 }
564 if (doRdr)
566 Route[RD_client].Host[rdType]);
567 return -1;
568 }
569 }
570
571// Process items that keep own statistics
572//
573 switch(Request.header.requestid)
574 {case kXR_open: return do_Open();
575 case kXR_gpfile: return do_gpFile();
576 default: break;
577 }
578
579// Update misc stats count
580//
581 SI->Bump(SI->miscCnt);
582
583// Now process whatever we have
584//
585 switch(Request.header.requestid)
586 {case kXR_chmod: return do_Chmod();
587 case kXR_dirlist: return do_Dirlist();
588 case kXR_fattr: return do_FAttr();
589 case kXR_locate: return do_Locate();
590 case kXR_mkdir: return do_Mkdir();
591 case kXR_mv: return do_Mv();
592 case kXR_query: return do_Query();
593 case kXR_prepare: return do_Prepare();
594 case kXR_rm: return do_Rm();
595 case kXR_rmdir: return do_Rmdir();
596 case kXR_set: return do_Set();
597 case kXR_stat: return do_Stat();
598 case kXR_statx: return do_Statx();
599 case kXR_truncate: return do_Truncate();
600 default: break;
601 }
602
603// Whatever we have, it's not valid
604//
605 Response.Send(kXR_InvalidRequest, "Invalid request code");
606 return 0;
607}
@ kXR_InvalidRequest
Definition XProtocol.hh:994
@ kXR_ArgMissing
Definition XProtocol.hh:989
@ kXR_SigVerErr
@ kXR_redirect
Definition XProtocol.hh:902
@ kXR_read
Definition XProtocol.hh:125
@ kXR_open
Definition XProtocol.hh:122
@ kXR_writev
Definition XProtocol.hh:143
@ kXR_readv
Definition XProtocol.hh:137
@ kXR_mkdir
Definition XProtocol.hh:120
@ kXR_sync
Definition XProtocol.hh:128
@ kXR_chmod
Definition XProtocol.hh:114
@ kXR_bind
Definition XProtocol.hh:136
@ kXR_dirlist
Definition XProtocol.hh:116
@ kXR_fattr
Definition XProtocol.hh:132
@ kXR_rm
Definition XProtocol.hh:126
@ kXR_query
Definition XProtocol.hh:113
@ kXR_gpfile
Definition XProtocol.hh:117
@ kXR_login
Definition XProtocol.hh:119
@ kXR_auth
Definition XProtocol.hh:112
@ kXR_endsess
Definition XProtocol.hh:135
@ kXR_set
Definition XProtocol.hh:130
@ kXR_rmdir
Definition XProtocol.hh:127
@ kXR_statx
Definition XProtocol.hh:134
@ kXR_truncate
Definition XProtocol.hh:140
@ kXR_protocol
Definition XProtocol.hh:118
@ kXR_mv
Definition XProtocol.hh:121
@ kXR_ping
Definition XProtocol.hh:123
@ kXR_stat
Definition XProtocol.hh:129
@ kXR_pgread
Definition XProtocol.hh:142
@ kXR_chkpoint
Definition XProtocol.hh:124
@ kXR_locate
Definition XProtocol.hh:139
@ kXR_close
Definition XProtocol.hh:115
@ kXR_prepare
Definition XProtocol.hh:133
#define XRD_NEED_AUTH
static bool InDomain(XrdNetAddrInfo *epaddr)
Definition XrdNetIF.cc:606
bool endswith(char c)
virtual const char * Verify(SecurityRequest &secreq, ClientRequest &thereq, const char *thedata)
static void ClearErrorQueue()
Clear the SSL error queue for the calling thread.
Definition XrdTls.cc:265
SecurityRequest sigReq
static struct XrdXrootdProtocol::RC_Table RouteClient
void setID(unsigned long long id)

References XrdLink::AddrInfo(), XrdXrootdStats::aokSCnt, argp, XrdXrootdStats::badSCnt, XrdBuffer::buff, XrdOucStats::Bump(), CL_Redir, XrdTls::ClearErrorQueue(), ClientRequestHdr::dlen, XrdXrootdProtocol::RC_Table::Domain, XrdXrootdProtocol::RC_Table::DomCnt, eDest, XrdSysError::Emsg(), XrdOucString::endswith(), XrdLink::hasBridge(), ClientRequest::header, XrdLink::Host(), XrdXrootdStats::ignSCnt, XrdNetIF::InDomain(), XrdNetAddrInfo::isPrivate(), kXR_ArgMissing, kXR_auth, kXR_bind, kXR_chkpoint, kXR_chmod, kXR_close, kXR_dirlist, kXR_endsess, kXR_fattr, kXR_gpfile, kXR_InvalidRequest, kXR_locate, kXR_login, kXR_mkdir, kXR_mv, kXR_open, kXR_pgread, kXR_pgwrite, kXR_ping, kXR_prepare, kXR_protocol, kXR_query, kXR_read, kXR_readv, kXR_redirect, kXR_rm, kXR_rmdir, kXR_set, kXR_SigVerErr, kXR_stat, kXR_statx, kXR_sync, kXR_truncate, kXR_write, kXR_writev, XrdXrootdProtocol::RC_Table::lclDom, Link, XrdXrootdStats::miscCnt, Port, Protect, XrdXrootdProtocol::RC_Table::pvtIP, rdType, ReqID, XProtocol::reqName(), Request, ClientRequestHdr::requestid, Response, Route, RouteClient, XrdXrootdResponse::Send(), XrdLink::setEtext(), XrdXrootdReqID::setID(), SI, sigHere, sigNeed, sigReq, sigReq2Ver, sigWarn, Status, ClientRequestHdr::streamid, tlsCtx, TRACEP, XrdSecProtect::Verify(), and XRD_NEED_AUTH.

Referenced by XrdXrootdTransit::Process(), Process(), XrdXrootdTransit::Redrive(), and XrdXrootdTransit::Run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcSig()

int XrdXrootdProtocol::ProcSig ( )

Definition at line 613 of file XrdXrootdProtocol.cc.

614{
615 int rc;
616
617// Check if we completed reading the signature and if so, we are done
618//
619 if (sigRead)
620 {sigRead = false;
621 sigHere = true;
622 return 0;
623 }
624
625// Verify that the hash is not longer that what we support and is present
626//
627 if (Request.header.dlen <= 0
628 || Request.header.dlen > (int)sizeof(sigBuff))
629 {Response.Send(kXR_ArgInvalid, "Invalid signature data length");
630 return Link->setEtext("signature data length error");
631 }
632
633// Save relevant information for the next round
634//
635 memcpy(&sigReq, &Request, sizeof(ClientSigverRequest));
637
638// Now read in the signature
639//
640 sigRead = true;
641 if ((rc = getData("arg", sigBuff, Request.header.dlen)))
642 {Resume = &XrdXrootdProtocol::ProcSig; return rc;}
643 sigRead = false;
644
645// All done
646//
647 sigHere = true;
648 return 0;
649}
struct ClientRequestHdr header
Definition XProtocol.hh:879

References ClientRequestHdr::dlen, getData(), ClientRequest::header, SecurityRequest::header, kXR_ArgInvalid, Link, ProcSig(), Request, Response, Resume, XrdXrootdResponse::Send(), XrdLink::setEtext(), sigBuff, sigHere, sigRead, and sigReq.

Referenced by Process(), and ProcSig().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Reclaim()

void XrdXrootdProtocol::Reclaim ( XrdSfsXioHandle h)
static

Definition at line 920 of file XrdXrootdProtocol.cc.

921{
922
923 if (h) BPool->Release((XrdBuffer *)h);
924}

References BPool, and XrdBuffManager::Release().

+ Here is the call graph for this function:

◆ Recycle()

void XrdXrootdProtocol::Recycle ( XrdLink * lp,
int consec,
const char * reason )
overridevirtual

Implements XrdProtocol.

Reimplemented in XrdXrootdTransit.

Definition at line 658 of file XrdXrootdProtocol.cc.

659{
660 char *sfxp, ctbuff[24], buff[128], Flags = (reason ? XROOTD_MON_FORCED : 0);
661 const char *What;
662 XrdSysMutexHelper recycleHelper(unbindMutex);
663
664// Check for disconnect or unbind
665//
666 if (Status == XRD_BOUNDPATH) {What = "unbind"; Flags |= XROOTD_MON_BOUNDP;}
667 else What = "disc";
668
669// Document the disconnect or undind
670//
671 if (lp)
672 {XrdSysTimer::s2hms(csec, ctbuff, sizeof(ctbuff));
673 if (reason && strcmp(reason, "hangup"))
674 {snprintf(buff, sizeof(buff), "%s (%s)", ctbuff, reason);
675 sfxp = buff;
676 } else sfxp = ctbuff;
677
678 eDest.Log(SYS_LOG_02, "Xeq", lp->ID, (char *)What, sfxp);
679 }
680
681// Handle any waiting read on this link. This is a tricky proposition because
682// we don't know if the thread is waiting to run or not. However, we will
683// indicate that gdFail was already called and should the thread run, it will
684// promptly exit should it ever run again. That way, we handle the cleanup.
685//
689
690// If this is a bound stream then we cannot release the resources until
691// all activity ceases on this stream (i.e., lp == 0). This is only relevant for
692// writes that read from the link. if we are still tagged as active and not
693// waiting for link activity then ask to be signalled once activity stops.
694// Otherwise, redrive the parallel I/O so that it cleans up.
695//
696 if (lp && Status == XRD_BOUNDPATH)
697 {streamMutex.Lock();
698 isDead = isNOP = true;
699 if (isActive)
700 {if (isLinkWT)
702 do_OffloadIO();
703 } else {
704 while(isActive)
705 {XrdSysCondVar2 aioDone(streamMutex);
706 endNote = &aioDone;
707 aioDone.Wait();
708 endNote = 0;
709 }
711 }
712 } else streamMutex.UnLock();
713 if (lp) return; // Async close
714 }
715
716// Release all appendages
717//
718 Cleanup();
719
720// If we are monitoring logins then we are also monitoring disconnects. We do
721// this after cleanup so that close records can be generated before we cut a
722// disconnect record. This then requires we clear the monitor object here.
723// We and the destrcutor are the only ones who call cleanup and a deletion
724// will call the monitor clear method. So, we won't leak memeory.
725//
726 if (Monitor.Logins()) Monitor.Agent->Disc(Monitor.Did, csec, Flags);
728 Monitor.Clear();
729
730// Set fields to starting point (debugging mostly)
731//
732 Reset();
733
734// Push ourselves on the stack
735//
736 if (Response.isOurs()) ProtStack.Push(&ProtLink);
737}
const int SYS_LOG_02
const kXR_char XROOTD_MON_BOUNDP
const kXR_char XROOTD_MON_FORCED
#define XRD_BOUNDPATH
void Push(XrdObject< T > *Node)
Definition XrdObject.hh:101
void Log(int mask, const char *esfx, const char *text1, const char *text2=0, const char *text3=0)
static char * s2hms(int sec, char *buff, int blen)
T fetch_or(T v) noexcept
static void Disc(unsigned int usrID)
void Disc(kXR_unt32 dictid, int csec, char Flags=0)
XrdSysCondVar2 * endNote
XrdXrootd::gdCallBack * CallBack

References XrdXrootdProtocol::GetDataCtl::Active, XrdXrootdMonitor::User::Agent, XrdXrootdProtocol::GetDataCtl::CallBack, XrdXrootdMonitor::User::Clear(), XrdXrootdMonitor::User::Did, XrdXrootdMonitor::Disc(), XrdXrootdMonFile::Disc(), eDest, endNote, XrdSys::RAtomic< T >::fetch_or(), XrdXrootdMonitor::User::Fstat(), gdCtl, XrdXrootd::gdCallBack::gdFail(), XrdLink::ID, XrdXrootdProtocol::GetDataCtl::inData, XrdXrootdProtocol::GetDataCtl::inDataIov, isActive, isDead, isLinkWT, isNOP, XrdXrootdResponse::isOurs(), XrdXrootdProtocol::GetDataCtl::linkWait, XrdSysMutex::Lock(), XrdSysError::Log(), XrdXrootdMonitor::User::Logins(), Monitor, XrdObjectQ< T >::Push(), Response, XrdSysTimer::s2hms(), Status, XrdXrootdProtocol::GetDataCtl::Status, streamMutex, SYS_LOG_02, XrdXrootdProtocol::GetDataCtl::Terminate, unbindMutex, XrdSysMutex::UnLock(), XrdSysCondVar2::Wait(), XRD_BOUNDPATH, XROOTD_MON_BOUNDP, and XROOTD_MON_FORCED.

Referenced by XrdXrootdTransit::Disc(), and XrdXrootdTransit::Recycle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendFile() [1/2]

int XrdXrootdProtocol::SendFile ( int fildes)
overridevirtual

Send data to a client using the sendfile() system interface.

Parameters
fildes- The file descriptor to use to effect a sendfile() for all of the requested data. The original offset and length are used relative to this file descriptor.
Returns
>0 - data has been sent in a previous call. This is indicative of a logic error in SendData() as only one call is allowed.
=0 - data has been sent.
<0 - A fatal transmission error occurred. SendData() should return SFS_ERROR to force the connection to be closed.

Implements XrdSfsDio.

Definition at line 3625 of file XrdXrootdXeq.cc.

3626{
3627
3628// Make sure we have some data to send
3629//
3630 if (!IO.IOLen) return 1;
3631
3632// Send off the data
3633//
3634 IO.IOLen = Response.Send(fildes, IO.Offset, IO.IOLen);
3635 return IO.IOLen;
3636}

References IO, XrdXrootd::IOParms::IOLen, Response, and XrdXrootdResponse::Send().

+ Here is the call graph for this function:

◆ SendFile() [2/2]

int XrdXrootdProtocol::SendFile ( XrdOucSFVec * sfvec,
int sfvnum )
overridevirtual

Send data to a client using the sendfile() system interface.

Parameters
sfvec- One or more XrdOucSFVec elements describing what should be transferred. The first element of the vector must be available for use by the interface for proper framing. That is, start filling in elements at sfvec[1] and sfvnum should be the count of elements filled in plus 1.
sfvnum- total number of elements in sfvec and includes the first unused element. There is a maximum number of elements that the vector may have; defined inside XrdOucSFVec.
Returns
>0 - either data has been sent in a previous call or the total amount of data in sfvec is greater than the original request. This is indicative of a SendData() logic error.
=0 - data has been sent.
<0 - A fatal transmission error occurred. SendData() should return SFS_ERROR to force the connection to be closed.

Implements XrdSfsDio.

Definition at line 3640 of file XrdXrootdXeq.cc.

3641{
3642 int i, xframt = 0;
3643
3644// Make sure we have some data to send
3645//
3646 if (!IO.IOLen) return 1;
3647
3648// Verify the length, it can't be greater than what the client wants
3649//
3650 for (i = 1; i < sfvnum; i++) xframt += sfvec[i].sendsz;
3651 if (xframt > IO.IOLen) return 1;
3652
3653// Send off the data
3654//
3655 if (xframt) IO.IOLen = Response.Send(sfvec, sfvnum, xframt);
3656 else {IO.IOLen = 0; Response.Send();}
3657 return IO.IOLen;
3658}

References IO, XrdXrootd::IOParms::IOLen, Response, and XrdXrootdResponse::Send().

+ Here is the call graph for this function:

◆ SetFD()

void XrdXrootdProtocol::SetFD ( int fildes)
overridevirtual

Change the file descriptor setting and, consequently, interface processing.

Parameters
fildes- The file descriptor to use in the future, as follows: < 0 - Disable sendfile and always use read(). >= 0 - Enable sendfile and always use sendfile() w/o invoking this interface (i.e. fast path).

Implements XrdSfsDio.

Definition at line 3664 of file XrdXrootdXeq.cc.

3665{
3666 if (fildes < 0) IO.File->sfEnabled = 0;
3667 else IO.File->fdNum = fildes;
3668}

References XrdXrootd::IOParms::File, IO, and XrdXrootdFile::sfEnabled.

◆ SetSF()

int XrdXrootdProtocol::SetSF ( kXR_char * fhandle,
bool seton = false )
protected

Definition at line 4154 of file XrdXrootdXeq.cc.

4155{
4156 XrdXrootdFHandle fh(fhandle);
4157 XrdXrootdFile *theFile;
4158
4159 if (!FTab || !(theFile = FTab->Get(fh.handle))) return -EBADF;
4160
4161// Turn it off or on if so wanted
4162//
4163 if (!seton) theFile->sfEnabled = 0;
4164 else if (theFile->fdNum >= 0) theFile->sfEnabled = 1;
4165
4166// All done
4167//
4168 return 0;
4169}

References FTab, XrdXrootdFileTable::Get(), XrdXrootdFHandle::handle, and XrdXrootdFile::sfEnabled.

Referenced by XrdXrootdTransit::setSF().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Stats()

int XrdXrootdProtocol::Stats ( char * buff,
int blen,
int do_sync = 0 )
overridevirtual

Implements XrdProtocol.

Definition at line 851 of file XrdXrootdProtocol.cc.

852{
853// Synchronize statistics if need be
854//
855 if (do_sync)
856 {SI->statsMutex.Lock();
857 SI->readCnt += numReads;
858 cumReads += numReads; numReads = 0;
859 SI->prerCnt += numReadP;
860 cumReadP += numReadP; numReadP = 0;
861
862 SI->rvecCnt += numReadV;
863 cumReadV += numReadV; numReadV = 0;
864 SI->rsegCnt += numSegsV;
865 cumSegsV += numSegsV; numSegsV = 0;
866
867 SI->wvecCnt += numWritV;
868 cumWritV += numWritV; numWritV = 0;
869 SI->wsegCnt += numSegsW;
870 cumSegsW += numSegsW, numSegsW = 0;
871
875 }
876
877// Now return the statistics
878//
879 return SI->Stats(buff, blen, do_sync);
880}
XrdSysMutex statsMutex
int Stats(char *buff, int blen, int do_sync=0)

References cumReadP, cumReads, cumReadV, cumSegsV, cumSegsW, cumWrites, cumWritV, XrdSysMutex::Lock(), numReadP, numReads, numReadV, numSegsV, numSegsW, numWrites, numWritV, XrdXrootdStats::prerCnt, XrdXrootdStats::readCnt, XrdXrootdStats::rsegCnt, XrdXrootdStats::rvecCnt, SI, XrdXrootdStats::Stats(), XrdOucStats::statsMutex, XrdSysMutex::UnLock(), XrdXrootdStats::writeCnt, XrdXrootdStats::wsegCnt, and XrdXrootdStats::wvecCnt.

+ Here is the call graph for this function:

◆ StreamNOP()

void XrdXrootdProtocol::StreamNOP ( )

Definition at line 930 of file XrdXrootdProtocol.cc.

931{
932
933// Mark this stream as not operation if it is not the control strea,
934//
935 if (PathID)
936 {streamMutex.Lock();
937 isNOP = true;
939 }
940}

References isNOP, XrdSysMutex::Lock(), PathID, streamMutex, and XrdSysMutex::UnLock().

+ Here is the call graph for this function:

◆ Swap()

XrdSfsXioHandle XrdXrootdProtocol::Swap ( const char * curBuff,
XrdSfsXioHandle oldHand = 0 )
overridevirtual

Swap the current I/O buffer

Parameters
curBuff- The address of the current buffer. It must match the the buffer that was most recently passed to the caller.
oldHand- The handle associated with a buffer returned by a previous call to Swap(). A value of zero indicates that the caller is taking control of the buffer but has no replacement buffer.
Returns
!0 The buffer handle of the current buffer is returned along with ownership rights. If oldHand was not nil, the caller's ownership of the associated buffer is reclaimed.
=0 An error occurred and nothing has changed; errno holds the reason for the error. Typically, EINVAL - curBuff doe not match current buffer. ENOBUFS - not enough memory to give up buffer. ENOTSUP - unsupported context for call.

Implements XrdSfsXio.

Definition at line 946 of file XrdXrootdProtocol.cc.

947{
948 XrdBuffer *oldBP = argp;
949
950// Verify the context and linkage and if OK, swap buffers
951//
952 if (Request.header.requestid != kXR_write) errno = ENOTSUP;
953 else if (buff != argp->buff) errno = EINVAL;
954 else {if (h)
955 {argp = (XrdBuffer *)h;
956 return oldBP;
957 } else {
959 if (argp) return oldBP;
960 argp = oldBP;
961 errno = ENOBUFS;
962 }
963 }
964 return 0;
965}

References argp, BPool, XrdBuffer::bsize, XrdBuffer::buff, ClientRequest::header, kXR_write, XrdBuffManager::Obtain(), Request, and ClientRequestHdr::requestid.

Referenced by Claim().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VerifyStream()

XrdXrootdProtocol * XrdXrootdProtocol::VerifyStream ( int & rc,
int pID,
bool lok = true )

Definition at line 971 of file XrdXrootdProtocol.cc.

972{
974
975// Verify that the path actually exists
976//
977 if (pID >= maxStreams || !(pp = Stream[pID]))
978 {rc = Response.Send(kXR_ArgInvalid, "invalid path ID");
979 return 0;
980 }
981
982// Verify that this path is still functional
983//
984 pp->streamMutex.Lock();
985 if (pp->isNOP)
986 {pp->streamMutex.UnLock();
987 rc = Response.Send(kXR_ArgInvalid, "path ID is not operational");
988 return 0;
989 }
990
991// All done!
992//
993 if (!lok) pp->streamMutex.UnLock();
994 return pp;
995}
XrdXrootdProtocol * Stream[maxStreams]
static const int maxStreams

References isNOP, kXR_ArgInvalid, XrdSysMutex::Lock(), maxStreams, Response, XrdXrootdResponse::Send(), Stream, streamMutex, and XrdSysMutex::UnLock().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ XrdXrootdAdmin

friend class XrdXrootdAdmin
friend

Definition at line 157 of file XrdXrootdProtocol.hh.

Member Data Documentation

◆ ableTLS

bool XrdXrootdProtocol::ableTLS
protected

Definition at line 609 of file XrdXrootdProtocol.hh.

◆ AdminSock

XrdNetSocket * XrdXrootdProtocol::AdminSock = 0
staticprotected

Definition at line 413 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ AppName

char* XrdXrootdProtocol::AppName
protected

Definition at line 519 of file XrdXrootdProtocol.hh.

◆ argp

XrdBuffer* XrdXrootdProtocol::argp
protected

Definition at line 501 of file XrdXrootdProtocol.hh.

Referenced by Claim(), Process(), Process2(), XrdXrootdTransit::Run(), and Swap().

◆ as_aioOK

bool XrdXrootdProtocol::as_aioOK = true
static

Definition at line 229 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ as_force

bool XrdXrootdProtocol::as_force = false
static

Definition at line 228 of file XrdXrootdProtocol.hh.

◆ as_maxperlnk

int XrdXrootdProtocol::as_maxperlnk = 8
static

Definition at line 218 of file XrdXrootdProtocol.hh.

◆ as_maxperreq

int XrdXrootdProtocol::as_maxperreq = 8
static

Definition at line 219 of file XrdXrootdProtocol.hh.

◆ as_maxpersrv

int XrdXrootdProtocol::as_maxpersrv = 4096
static

Definition at line 220 of file XrdXrootdProtocol.hh.

◆ as_maxstalls

int XrdXrootdProtocol::as_maxstalls = 4
static

Definition at line 225 of file XrdXrootdProtocol.hh.

◆ as_miniosz

int XrdXrootdProtocol::as_miniosz = 98304
static

Definition at line 221 of file XrdXrootdProtocol.hh.

◆ as_minsfsz

int XrdXrootdProtocol::as_minsfsz = 8192
static

Definition at line 222 of file XrdXrootdProtocol.hh.

◆ as_nosf

bool XrdXrootdProtocol::as_nosf = false
static

Definition at line 230 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ as_okstutter

short XrdXrootdProtocol::as_okstutter = 1
static

Definition at line 226 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ as_seghalf

int XrdXrootdProtocol::as_seghalf = 32768
static

Definition at line 223 of file XrdXrootdProtocol.hh.

◆ as_segsize

int XrdXrootdProtocol::as_segsize = 65536
static

Definition at line 224 of file XrdXrootdProtocol.hh.

Referenced by XrdXrootdAioBuff::Alloc(), and Configure().

◆ as_syncw

bool XrdXrootdProtocol::as_syncw = false
static

Definition at line 231 of file XrdXrootdProtocol.hh.

◆ as_timeout

short XrdXrootdProtocol::as_timeout = 45
static

Definition at line 227 of file XrdXrootdProtocol.hh.

◆ AuthProt

XrdSecProtocol* XrdXrootdProtocol::AuthProt
protected

Definition at line 516 of file XrdXrootdProtocol.hh.

◆ BPool

XrdBuffManager * XrdXrootdProtocol::BPool
staticprotected

Definition at line 393 of file XrdXrootdProtocol.hh.

Referenced by Configure(), Process(), Reclaim(), and Swap().

◆ CapVer

unsigned char XrdXrootdProtocol::CapVer
protected

Definition at line 511 of file XrdXrootdProtocol.hh.

◆ CIA

XrdSecService * XrdXrootdProtocol::CIA = 0
staticprotected

Definition at line 388 of file XrdXrootdProtocol.hh.

◆ CL_Redir

bool XrdXrootdProtocol::CL_Redir = false
staticprotected

Definition at line 449 of file XrdXrootdProtocol.hh.

Referenced by Configure(), and Process2().

◆ Client

XrdSecEntity* XrdXrootdProtocol::Client
protected

Definition at line 515 of file XrdXrootdProtocol.hh.

Referenced by MonAuth().

◆ clientPV

int XrdXrootdProtocol::clientPV
protected

Definition at line 505 of file XrdXrootdProtocol.hh.

Referenced by MonAuth().

◆ clientRN

int XrdXrootdProtocol::clientRN
protected

Definition at line 506 of file XrdXrootdProtocol.hh.

◆ cumReadP

int XrdXrootdProtocol::cumReadP
protected

Definition at line 489 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ cumReads

int XrdXrootdProtocol::cumReads
protected

Definition at line 488 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ cumReadV

int XrdXrootdProtocol::cumReadV
protected

Definition at line 490 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ cumSegsV

int XrdXrootdProtocol::cumSegsV
protected

Definition at line 491 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ cumSegsW

int XrdXrootdProtocol::cumSegsW
protected

Definition at line 493 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ cumWrites

int XrdXrootdProtocol::cumWrites
protected

Definition at line 494 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ cumWritV

int XrdXrootdProtocol::cumWritV
protected

Definition at line 492 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ DHS

XrdSecProtector * XrdXrootdProtocol::DHS = 0
staticprotected

Definition at line 389 of file XrdXrootdProtocol.hh.

◆ digFS

XrdSfsFileSystem * XrdXrootdProtocol::digFS = 0
staticprotected

Definition at line 387 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ doTLS

char XrdXrootdProtocol::doTLS
protected

Definition at line 608 of file XrdXrootdProtocol.hh.

◆ eDest

XrdSysError & XrdXrootdProtocol::eDest = XrdXrootd::eLog
staticprotected

Definition at line 394 of file XrdXrootdProtocol.hh.

Referenced by Configure(), Process2(), and Recycle().

◆ endNote

XrdSysCondVar2* XrdXrootdProtocol::endNote
protected

Definition at line 590 of file XrdXrootdProtocol.hh.

Referenced by Recycle().

◆ Entity

XrdSecEntity XrdXrootdProtocol::Entity
protected

Definition at line 517 of file XrdXrootdProtocol.hh.

Referenced by Match(), and MonAuth().

◆ fsFeatures

uint64_t XrdXrootdProtocol::fsFeatures = 0
staticprotected

Definition at line 432 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ FTab

XrdXrootdFileTable* XrdXrootdProtocol::FTab
protected

Definition at line 502 of file XrdXrootdProtocol.hh.

Referenced by do_WriteSpan(), and SetSF().

◆ gdCtl

struct XrdXrootdProtocol::GetDataCtl XrdXrootdProtocol::gdCtl
protected

Referenced by getDump(), and Recycle().

◆ hailWait

int XrdXrootdProtocol::hailWait
staticprotected

Definition at line 417 of file XrdXrootdProtocol.hh.

Referenced by Configure(), and Match().

◆ halfBSize

int XrdXrootdProtocol::halfBSize
protected

Definition at line 583 of file XrdXrootdProtocol.hh.

Referenced by Process().

◆ hcMax

int XrdXrootdProtocol::hcMax = 28657
staticprotected

Definition at line 579 of file XrdXrootdProtocol.hh.

◆ hcNext

int XrdXrootdProtocol::hcNext
protected

Definition at line 581 of file XrdXrootdProtocol.hh.

◆ hcNow

int XrdXrootdProtocol::hcNow
protected

Definition at line 582 of file XrdXrootdProtocol.hh.

Referenced by Process().

◆ hcPrev

int XrdXrootdProtocol::hcPrev
protected

Definition at line 580 of file XrdXrootdProtocol.hh.

Referenced by Process().

◆ IO

XrdXrootd::IOParms XrdXrootdProtocol::IO
protected

Definition at line 575 of file XrdXrootdProtocol.hh.

Referenced by do_WriteSpan(), SendFile(), SendFile(), and SetFD().

◆ isActive

bool XrdXrootdProtocol::isActive
protected

Definition at line 593 of file XrdXrootdProtocol.hh.

Referenced by Recycle().

◆ isDead

bool XrdXrootdProtocol::isDead
protected

Definition at line 596 of file XrdXrootdProtocol.hh.

Referenced by Recycle().

◆ isLinkWT

bool XrdXrootdProtocol::isLinkWT
protected

Definition at line 594 of file XrdXrootdProtocol.hh.

Referenced by Recycle().

◆ isNOP

bool XrdXrootdProtocol::isNOP
protected

Definition at line 595 of file XrdXrootdProtocol.hh.

Referenced by Recycle(), StreamNOP(), and VerifyStream().

◆ isProxy

bool XrdXrootdProtocol::isProxy = false
staticprotected

Definition at line 451 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ isRedir

char XrdXrootdProtocol::isRedir = 0
staticprotected

Definition at line 425 of file XrdXrootdProtocol.hh.

Referenced by Configure(), and Match().

◆ isTLS

bool XrdXrootdProtocol::isTLS
protected

Definition at line 610 of file XrdXrootdProtocol.hh.

◆ JobCKCGI

char XrdXrootdProtocol::JobCKCGI =0
staticprotected

Definition at line 427 of file XrdXrootdProtocol.hh.

◆ JobCKS

XrdXrootdJob * XrdXrootdProtocol::JobCKS = 0
staticprotected

Definition at line 428 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ JobCKT

char * XrdXrootdProtocol::JobCKT = 0
staticprotected

Definition at line 429 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ JobCKTLST

XrdOucTList * XrdXrootdProtocol::JobCKTLST = 0
staticprotected

Definition at line 430 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ JobLCL

char XrdXrootdProtocol::JobLCL = 0
staticprotected

Definition at line 426 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ keepT

time_t XrdXrootdProtocol::keepT = 86400
staticprotected

Definition at line 409 of file XrdXrootdProtocol.hh.

◆ LimitError

bool XrdXrootdProtocol::LimitError = true
staticprotected

Definition at line 615 of file XrdXrootdProtocol.hh.

◆ Link

◆ linkAioReq

RAtomic_int XrdXrootdProtocol::linkAioReq
protected

Definition at line 533 of file XrdXrootdProtocol.hh.

Referenced by aioUpdReq().

◆ Locker

XrdXrootdFileLock * XrdXrootdProtocol::Locker
staticprotected

Definition at line 391 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ maxBuffsz

int XrdXrootdProtocol::maxBuffsz
staticprotected

Definition at line 472 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ maxPio

const int XrdXrootdProtocol::maxPio = 4
staticprotected

Definition at line 598 of file XrdXrootdProtocol.hh.

◆ maxReadv_ior

int XrdXrootdProtocol::maxReadv_ior
staticprotected
Initial value:

Definition at line 474 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ maxStreams

const int XrdXrootdProtocol::maxStreams = 16
static

Definition at line 214 of file XrdXrootdProtocol.hh.

Referenced by VerifyStream().

◆ maxTransz

int XrdXrootdProtocol::maxTransz = 262144
staticprotected

Definition at line 473 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ Monitor

XrdXrootdMonitor::User XrdXrootdProtocol::Monitor
protected

Definition at line 503 of file XrdXrootdProtocol.hh.

Referenced by do_WriteSpan(), MonAuth(), and Recycle().

◆ myBlast

int XrdXrootdProtocol::myBlast
protected

Definition at line 541 of file XrdXrootdProtocol.hh.

Referenced by do_WriteSpan().

◆ myBlen

int XrdXrootdProtocol::myBlen
protected

Definition at line 540 of file XrdXrootdProtocol.hh.

Referenced by Process(), and XrdXrootdTransit::Run().

◆ myBuff

char* XrdXrootdProtocol::myBuff
protected

Definition at line 539 of file XrdXrootdProtocol.hh.

Referenced by do_WriteSpan(), Process(), and XrdXrootdTransit::Run().

◆ myCName

const char * XrdXrootdProtocol::myCName = 0
staticprotected

Definition at line 423 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ myCNlen

int XrdXrootdProtocol::myCNlen = 0
staticprotected

Definition at line 424 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ myGID

gid_t XrdXrootdProtocol::myGID = 0
staticprotected

Definition at line 403 of file XrdXrootdProtocol.hh.

◆ myGName

const char * XrdXrootdProtocol::myGName = "?"
staticprotected

Definition at line 407 of file XrdXrootdProtocol.hh.

◆ myGNLen

int XrdXrootdProtocol::myGNLen = 1
staticprotected

Definition at line 405 of file XrdXrootdProtocol.hh.

◆ myInst

const char * XrdXrootdProtocol::myInst = 0
staticprotected

Definition at line 396 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ myPID

int XrdXrootdProtocol::myPID = static_cast<int>(getpid())
staticprotected

Definition at line 399 of file XrdXrootdProtocol.hh.

◆ myRole

int XrdXrootdProtocol::myRole = 0
staticprotected

Definition at line 400 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ myRolf

int XrdXrootdProtocol::myRolf = 0
staticprotected

Definition at line 401 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ mySID

unsigned int XrdXrootdProtocol::mySID
protected

Definition at line 592 of file XrdXrootdProtocol.hh.

◆ myStalls

int XrdXrootdProtocol::myStalls
protected

Definition at line 495 of file XrdXrootdProtocol.hh.

◆ myUID

uid_t XrdXrootdProtocol::myUID = 0
staticprotected

Definition at line 404 of file XrdXrootdProtocol.hh.

◆ myUName

const char * XrdXrootdProtocol::myUName = "?"
staticprotected

Definition at line 408 of file XrdXrootdProtocol.hh.

◆ myUNLen

int XrdXrootdProtocol::myUNLen = 1
staticprotected

Definition at line 406 of file XrdXrootdProtocol.hh.

◆ newPio

bool XrdXrootdProtocol::newPio
protected

Definition at line 604 of file XrdXrootdProtocol.hh.

◆ Notify

char * XrdXrootdProtocol::Notify = 0
staticprotected

Definition at line 422 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ numFiles

int XrdXrootdProtocol::numFiles
protected

Definition at line 486 of file XrdXrootdProtocol.hh.

◆ numReadP

int XrdXrootdProtocol::numReadP
protected

Definition at line 480 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ numReads

int XrdXrootdProtocol::numReads
protected

Definition at line 479 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ numReadV

int XrdXrootdProtocol::numReadV
protected

Definition at line 481 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ numSegsV

int XrdXrootdProtocol::numSegsV
protected

Definition at line 482 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ numSegsW

int XrdXrootdProtocol::numSegsW
protected

Definition at line 484 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ numWrites

int XrdXrootdProtocol::numWrites
protected

Definition at line 485 of file XrdXrootdProtocol.hh.

Referenced by do_WriteSpan(), and Stats().

◆ numWritV

int XrdXrootdProtocol::numWritV
protected

Definition at line 483 of file XrdXrootdProtocol.hh.

Referenced by Stats().

◆ OD_Bypass

bool XrdXrootdProtocol::OD_Bypass = false
staticprotected

Definition at line 446 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ OD_Redir

bool XrdXrootdProtocol::OD_Redir = false
staticprotected

Definition at line 447 of file XrdXrootdProtocol.hh.

◆ OD_Stall

int XrdXrootdProtocol::OD_Stall = 33
staticprotected

Definition at line 445 of file XrdXrootdProtocol.hh.

◆ osFS

XrdSfsFileSystem * XrdXrootdProtocol::osFS
staticprotected

Definition at line 386 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ PathID

short XrdXrootdProtocol::PathID
protected

Definition at line 603 of file XrdXrootdProtocol.hh.

Referenced by getPathID(), and StreamNOP().

◆ pgwCtl

XrdXrootdPgwCtl* XrdXrootdProtocol::pgwCtl
protected

Definition at line 538 of file XrdXrootdProtocol.hh.

◆ pioFirst

XrdXrootdPio* XrdXrootdProtocol::pioFirst
protected

Definition at line 599 of file XrdXrootdProtocol.hh.

◆ pioFree

XrdXrootdPio* XrdXrootdProtocol::pioFree
protected

Definition at line 601 of file XrdXrootdProtocol.hh.

◆ pioLast

XrdXrootdPio* XrdXrootdProtocol::pioLast
protected

Definition at line 600 of file XrdXrootdProtocol.hh.

◆ PMark

XrdNetPMark * XrdXrootdProtocol::PMark = 0
staticprotected

Definition at line 395 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ pmDone

bool XrdXrootdProtocol::pmDone
protected

Definition at line 507 of file XrdXrootdProtocol.hh.

◆ pmHandle

XrdNetPMark::Handle* XrdXrootdProtocol::pmHandle
protected

Definition at line 504 of file XrdXrootdProtocol.hh.

◆ Port

int XrdXrootdProtocol::Port
staticprotected

Definition at line 419 of file XrdXrootdProtocol.hh.

Referenced by Configure(), and Process2().

◆ PrepareAlt

bool XrdXrootdProtocol::PrepareAlt = false
staticprotected

Definition at line 614 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ PrepareCount

int XrdXrootdProtocol::PrepareCount
protected

Definition at line 617 of file XrdXrootdProtocol.hh.

◆ PrepareLimit

int XrdXrootdProtocol::PrepareLimit = -1
staticprotected

Definition at line 618 of file XrdXrootdProtocol.hh.

◆ PrepID

XrdOucReqID * XrdXrootdProtocol::PrepID = 0
staticprotected

Definition at line 431 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ Protect

XrdSecProtect* XrdXrootdProtocol::Protect
protected

Definition at line 518 of file XrdXrootdProtocol.hh.

Referenced by Process(), and Process2().

◆ rdType

short XrdXrootdProtocol::rdType
protected

Definition at line 509 of file XrdXrootdProtocol.hh.

Referenced by Process2().

◆ readWait

int XrdXrootdProtocol::readWait
staticprotected

Definition at line 418 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ Req_TLSData

const char XrdXrootdProtocol::Req_TLSData = 0x01
staticprotected

Definition at line 461 of file XrdXrootdProtocol.hh.

◆ Req_TLSGPFile

const char XrdXrootdProtocol::Req_TLSGPFile = 0x02
staticprotected

Definition at line 462 of file XrdXrootdProtocol.hh.

◆ Req_TLSLogin

const char XrdXrootdProtocol::Req_TLSLogin = 0x04
staticprotected

Definition at line 463 of file XrdXrootdProtocol.hh.

◆ Req_TLSSess

const char XrdXrootdProtocol::Req_TLSSess = 0x08
staticprotected

Definition at line 464 of file XrdXrootdProtocol.hh.

◆ Req_TLSTPC

const char XrdXrootdProtocol::Req_TLSTPC = 0x10
staticprotected

Definition at line 465 of file XrdXrootdProtocol.hh.

◆ ReqID

XrdXrootdReqID XrdXrootdProtocol::ReqID
protected

Definition at line 622 of file XrdXrootdProtocol.hh.

Referenced by Process2().

◆ Request

◆ reserved

char XrdXrootdProtocol::reserved[3]
protected

Definition at line 508 of file XrdXrootdProtocol.hh.

◆ Response

XrdXrootdResponse XrdXrootdProtocol::Response
protected

◆ Resume

int(XrdXrootdProtocol::* XrdXrootdProtocol::Resume) ()
protected

◆ ResumePio

int(XrdXrootdProtocol::* XrdXrootdProtocol::ResumePio) ()
protected

Definition at line 573 of file XrdXrootdProtocol.hh.

◆ reTry

XrdSysSemaphore* XrdXrootdProtocol::reTry
protected

Definition at line 589 of file XrdXrootdProtocol.hh.

◆ Route

struct XrdXrootdProtocol::RD_Table XrdXrootdProtocol::Route[RD_Num]
staticprotected

Referenced by Configure(), and Process2().

◆ RouteClient

struct XrdXrootdProtocol::RC_Table XrdXrootdProtocol::RouteClient
staticprotected

Referenced by Process2().

◆ RPList

XrdXrootdXPath XrdXrootdProtocol::RPList
staticprotected

Definition at line 383 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ RQList

XrdXrootdXPath XrdXrootdProtocol::RQList
staticprotected

Definition at line 384 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ RQLxist

int XrdXrootdProtocol::RQLxist = 0
staticprotected

Definition at line 398 of file XrdXrootdProtocol.hh.

◆ rvSeq

unsigned char XrdXrootdProtocol::rvSeq
protected

Definition at line 605 of file XrdXrootdProtocol.hh.

◆ Sched

XrdScheduler * XrdXrootdProtocol::Sched
staticprotected

Definition at line 392 of file XrdXrootdProtocol.hh.

Referenced by Configure(), and XrdXrootdTransit::Recycle().

◆ SI

XrdXrootdStats * XrdXrootdProtocol::SI
staticprotected

Definition at line 478 of file XrdXrootdProtocol.hh.

Referenced by Configure(), Match(), Process2(), and Stats().

◆ sigBuff

char XrdXrootdProtocol::sigBuff[64]
protected

Definition at line 525 of file XrdXrootdProtocol.hh.

Referenced by ProcSig().

◆ sigHere

bool XrdXrootdProtocol::sigHere
protected

Definition at line 527 of file XrdXrootdProtocol.hh.

Referenced by Process2(), and ProcSig().

◆ sigNeed

bool XrdXrootdProtocol::sigNeed
protected

Definition at line 526 of file XrdXrootdProtocol.hh.

Referenced by Process(), and Process2().

◆ sigRead

bool XrdXrootdProtocol::sigRead
protected

Definition at line 528 of file XrdXrootdProtocol.hh.

Referenced by ProcSig().

◆ sigReq

SecurityRequest XrdXrootdProtocol::sigReq
protected

Definition at line 524 of file XrdXrootdProtocol.hh.

Referenced by Process2(), and ProcSig().

◆ sigReq2Ver

ClientRequest XrdXrootdProtocol::sigReq2Ver
protected

Definition at line 523 of file XrdXrootdProtocol.hh.

Referenced by Process(), and Process2().

◆ sigWarn

bool XrdXrootdProtocol::sigWarn
protected

Definition at line 529 of file XrdXrootdProtocol.hh.

Referenced by Process2().

◆ srvrAioOps

RAtomic_int XrdXrootdProtocol::srvrAioOps = {0}
staticprotected

Definition at line 174 of file XrdXrootdProtocol.hh.

Referenced by aioUpdate().

◆ Status

char XrdXrootdProtocol::Status
protected

Definition at line 510 of file XrdXrootdProtocol.hh.

Referenced by Process2(), and Recycle().

◆ Stream

XrdXrootdProtocol* XrdXrootdProtocol::Stream[maxStreams]
protected

Definition at line 591 of file XrdXrootdProtocol.hh.

Referenced by VerifyStream().

◆ streamMutex

XrdSysMutex XrdXrootdProtocol::streamMutex
protected

Definition at line 588 of file XrdXrootdProtocol.hh.

Referenced by Recycle(), StreamNOP(), and VerifyStream().

◆ tlsCap

char XrdXrootdProtocol::tlsCap = 0
staticprotected

Definition at line 467 of file XrdXrootdProtocol.hh.

◆ tlsCtx

XrdTlsContext * XrdXrootdProtocol::tlsCtx = 0
staticprotected

Definition at line 390 of file XrdXrootdProtocol.hh.

Referenced by Configure(), and Process2().

◆ tlsNot

char XrdXrootdProtocol::tlsNot = 0
staticprotected

Definition at line 468 of file XrdXrootdProtocol.hh.

◆ tlsPort

int XrdXrootdProtocol::tlsPort = 0
staticprotected

Definition at line 421 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ totReadP

long long XrdXrootdProtocol::totReadP
protected

Definition at line 496 of file XrdXrootdProtocol.hh.

◆ TraceID

const char * XrdXrootdProtocol::TraceID = "Protocol"
staticprotected

Definition at line 397 of file XrdXrootdProtocol.hh.

◆ unbindMutex

XrdSysMutex XrdXrootdProtocol::unbindMutex
protected

Definition at line 587 of file XrdXrootdProtocol.hh.

Referenced by Recycle().

◆ usxMaxNsz

int XrdXrootdProtocol::usxMaxNsz = kXR_faMaxNlen
staticprotected

Definition at line 455 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ usxMaxVsz

int XrdXrootdProtocol::usxMaxVsz = kXR_faMaxVlen
staticprotected

Definition at line 456 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ usxParms

char * XrdXrootdProtocol::usxParms = 0
staticprotected

Definition at line 457 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ Window

int XrdXrootdProtocol::Window
staticprotected

Definition at line 420 of file XrdXrootdProtocol.hh.

Referenced by Configure().

◆ wvInfo

XrdXrootdWVInfo* XrdXrootdProtocol::wvInfo
protected

Definition at line 572 of file XrdXrootdProtocol.hh.

◆ wvSeq

unsigned char XrdXrootdProtocol::wvSeq
protected

Definition at line 606 of file XrdXrootdProtocol.hh.

◆ XPList

XrdXrootdXPath XrdXrootdProtocol::XPList
staticprotected

Definition at line 385 of file XrdXrootdProtocol.hh.

Referenced by Configure().


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