XRootD
Loading...
Searching...
No Matches
XrdXrootdTransit.cc File Reference
#include <cstring>
#include <unistd.h>
#include <sys/uio.h>
#include "XProtocol/XProtocol.hh"
#include "XrdSec/XrdSecEntity.hh"
#include "Xrd/XrdBuffer.hh"
#include "Xrd/XrdLink.hh"
#include "XrdOuc/XrdOucErrInfo.hh"
#include "XrdOuc/XrdOucUtils.hh"
#include "XrdSfs/XrdSfsInterface.hh"
#include "XrdSys/XrdSysAtomics.hh"
#include "XrdXrootd/XrdXrootdStats.hh"
#include "XrdXrootd/XrdXrootdTrace.hh"
#include "XrdXrootd/XrdXrootdTransit.hh"
#include "XrdXrootd/XrdXrootdTransPend.hh"
#include "XrdXrootd/XrdXrootdTransSend.hh"
+ Include dependency graph for XrdXrootdTransit.cc:

Go to the source code of this file.

Macros

#define KXR_INDEX(x)   x-kXR_auth
 
#define TRACELINK   Link
 
#define XRD_GETNUM(x)    ntohl(*(static_cast<unsigned int *>(static_cast<void *>(x))))
 

Variables

XrdSysTrace XrdXrootdTrace
 

Macro Definition Documentation

◆ KXR_INDEX

#define KXR_INDEX (   x)    x-kXR_auth

Definition at line 499 of file XrdXrootdTransit.cc.

◆ TRACELINK

#define TRACELINK   Link

Definition at line 58 of file XrdXrootdTransit.cc.

◆ XRD_GETNUM

#define XRD_GETNUM (   x)     ntohl(*(static_cast<unsigned int *>(static_cast<void *>(x))))

Definition at line 60 of file XrdXrootdTransit.cc.

82{
84
85// Simply return a new transit object masquerading as a bridge
86//
87 if (!(xp = TranStack.Pop())) xp = new XrdXrootdTransit();
88 xp->Init(rsltP, linkP, seceP, nameP, protP);
89 return xp;
90}
91
92/******************************************************************************/
93/* A t t n */
94/******************************************************************************/
95
96int XrdXrootdTransit::Attn(XrdLink *lP, short *theSID, int rcode,
97 const struct iovec *ioV, int ioN, int ioL)
98{
100
101// Find the request
102//
103 if (!(tP = XrdXrootdTransPend::Remove(lP, *theSID)))
104 {TRACE(REQ, "Unable to find request for " <<lP->ID <<" sid=" <<*theSID);
105 return 0;
106 }
107
108// Resume the request as we have been waiting for the response.
109//
110 return tP->bridge->AttnCont(tP, rcode, ioV, ioN, ioL);
111}
112
113/******************************************************************************/
114/* A t t n C o n t */
115/******************************************************************************/
116
117int XrdXrootdTransit::AttnCont(XrdXrootdTransPend *tP, int rcode,
118 const struct iovec *ioV, int ioN, int ioL)
119{
120 int rc;
121
122// Refresh the request structure
123//
124 memcpy(&Request, &(tP->Pend.Request), sizeof(Request));
125 delete tP;
126 runWait = 0;
127
128// Reissue the request if it's a wait 0 response.
129//
130 if (rcode==kXR_wait
131 && (!ioN || XRD_GETNUM(ioV[0].iov_base) == 0))
132 {Sched->Schedule((XrdJob *)&waitJob);
133 return 0;
134 }
135
136// Send off the deferred response
137//
138 rc = Send(rcode, ioV, ioN, ioL);
139
140// Handle end based on current state
141//
142 if (rc >= 0 && !runWait)
143 {if (runDone)
144 {AtomicBeg(runMutex);
145 AtomicZAP(runStatus);
146 AtomicEnd(runMutex);
147 }
148 if (reInvoke) Sched->Schedule((XrdJob *)&respJob);
149 else Link->Enable();
150 }
151
152// All done
153//
154 return rc;
155}
156
157/******************************************************************************/
158/* D i s c */
159/******************************************************************************/
160
162{
163 char buff[128];
164 int rc;
165
166// We do not allow disconnection while we are active
167//
168 AtomicBeg(runMutex);
169 rc = AtomicInc(runStatus);
170 AtomicEnd(runMutex);
171 if (rc) return false;
172
173// Reconnect original protocol to the link
174//
175 Link->setProtocol(realProt);
176
177// Now we need to recycle our xrootd part
178//
179 sprintf(buff, "%s disconnection", pName);
180 XrdXrootdProtocol::Recycle(Link, time(0)-cTime, buff);
181
182// Now just free up our object.
183//
184 TranStack.Push(&TranLink);
185 return true;
186}
187
188/******************************************************************************/
189/* Private: F a i l */
190/******************************************************************************/
191
192bool XrdXrootdTransit::Fail(int ecode, const char *etext)
193{
194 runError = ecode;
195 runEText = etext;
196 return true;
197}
198
199/******************************************************************************/
200/* F a t a l */
201/******************************************************************************/
202
203int XrdXrootdTransit::Fatal(int rc)
204{
207
208 return (respObj->Error(rInfo, runError, runEText) ? rc : -1);
209}
210
211/******************************************************************************/
212/* I n i t */
213/******************************************************************************/
214
215void XrdXrootdTransit::Init(XrdScheduler *schedP, int qMax, int qTTL)
216{
217 TranStack.Set(schedP, &XrdXrootdTrace, TRACE_MEM);
218 TranStack.Set(qMax, qTTL);
219}
220
221/******************************************************************************/
222
224 XrdLink *linkP,
225 XrdSecEntity *seceP,
226 const char *nameP,
227 const char *protP
228 )
229{
230 XrdNetAddrInfo *addrP;
231 const char *who;
232 char uname[sizeof(Request.login.username)+1];
233
234// Set standard stuff
235//
236 runArgs = 0;
237 runALen = 0;
238 runABsz = 0;
239 runError = 0;
240 runStatus = 0;
241 runWait = 0;
242 runWTot = 0;
243 runWMax = 3600;
244 runWCall = false;
245 runDone = false;
246 reInvoke = false;
247 wBuff = 0;
248 wBLen = 0;
249 respObj = respP;
250 pName = protP;
251 mySID = getSID();
252
253// Bind the protocol to the link
254//
255 SI->Bump(SI->Count);
256 Link = linkP;
257 Response.Set(linkP);
258 Response.Set(this);
259 strcpy(Entity.prot, "host");
260 Entity.host = (char *)linkP->Host();
261
262// Develop a trace identifier
263//
264 strncpy(uname, nameP, sizeof(uname)-1);
265 uname[sizeof(uname)-1] = 0;
267 linkP->setID(uname, mySID);
268
269// Place trace identifier everywhere is should be located
270
271// Indicate that this brige supports asynchronous responses
272//
274
275// Mark the client as IPv4 if they came in as IPv4 or mapped IPv4. Note
276// there is no way we can figure out if this is a dual-stack client.
277//
278 addrP = Link->AddrInfo();
279 if (addrP->isIPType(XrdNetAddrInfo::IPv4) || addrP->isMapped())
281
282// Mark the client as being on a private net if the address is private
283//
284 if (addrP->isPrivate()) {clientPV |= XrdOucEI::uPrip; rdType = 1;}
285 else rdType = 0;
286
287// Now tie the security information
288//
289 Client = (seceP ? seceP : &Entity);
290 Client->ueid = mySID;
292 Client->addrInfo = addrP;
293
294// Allocate a monitoring object, if needed for this connection and record login
295//
296 if (Monitor.Ready())
297 {Monitor.Register(linkP->ID, linkP->Host(), protP);
298 if (Monitor.Logins())
299 {if (Monitor.Auths() && seceP) MonAuth();
300 else Monitor.Report(Monitor.Auths() ? "" : 0);
301 }
302 }
303
304// Complete the request ID object
305//
306 ReqID.setID(Request.header.streamid, linkP->FDnum(), linkP->Inst());
307
308// Substitute our protocol for the existing one
309//
310 realProt = linkP->setProtocol(this);
311 linkP->setProtName(protP);
312 linkP->armBridge();
313
314// Document this login
315//
316 who = (seceP && seceP->name ? seceP->name : "nobody");
317 eDest.Log(SYS_LOG_01, "Bridge", Link->ID, "login as", who);
318
319// All done, indicate we are logged in
320//
322 cTime = time(0);
323
324// Propogate a connect through the whole system
325//
327}
328
329/******************************************************************************/
330/* P r o c e e d */
331/******************************************************************************/
332
334{
335 int rc;
336
337// If we were interrupted in a reinvoke state, resume that state.
338//
339 if (reInvoke) rc = Process(Link);
340 else rc = 0;
341
342// Handle ending status
343//
344 if (rc >= 0) Link->Enable();
345 else if (rc != -EINPROGRESS) Link->Close();
346}
347
348/******************************************************************************/
349/* P r o c e s s */
350/******************************************************************************/
351
353{
354 int rc;
355
356// This entry is serialized via link processing and data is now available.
357// One of the following will be returned.
358//
359// < 0 -> Stop getting requests,
360// -EINPROGRESS leave link disabled but otherwise all is well
361// -n Error, disable and close the link
362// = 0 -> OK, get next request, if allowed, o/w enable the link
363// > 0 -> Slow link, stop getting requests and enable the link
364//
365
366// Reflect data is present to the underlying protocol and if Run() has been
367// called we need to dispatch that request. This may be iterative.
368//
369do{rc = realProt->Process((reInvoke ? 0 : lp));
370 if (rc >= 0 && runStatus)
371 {reInvoke = (rc == 0);
372 if (runError) rc = Fatal(rc);
373 else {runDone = false;
375 if (rc >= 0)
376 {if (runWait) rc = -EINPROGRESS;
377 if (!runDone) return rc;
378 AtomicBeg(runMutex);
379 AtomicZAP(runStatus);
380 AtomicEnd(runMutex);
381 }
382 }
383 } else reInvoke = false;
384 } while(rc >= 0 && reInvoke);
385
386// Make sure that we indicate that we are no longer active
387//
388 if (runStatus)
389 {AtomicBeg(runMutex);
390 AtomicZAP(runStatus);
391 AtomicEnd(runMutex);
392 }
393
394// All done
395//
396 return (rc ? rc : 1);
397}
398
399/******************************************************************************/
400/* R e c y c l e */
401/******************************************************************************/
402
403void XrdXrootdTransit::Recycle(XrdLink *lp, int consec, const char *reason)
404{
405
406// Set ourselves as active so we can't get more requests
407//
408 AtomicBeg(runMutex);
409 AtomicInc(runStatus);
410 AtomicEnd(runMutex);
411
412// If we were active then we will need to quiesce before dismantling ourselves.
413// Note that Recycle() can only be called if the link is enabled. So, this bit
414// of code is improbable but we check it anyway.
415//
416 if (runWait > 0) Sched->Cancel(&waitJob);
417
418// First we need to recycle the real protocol
419//
420 if (realProt) realProt->Recycle(lp, consec, reason);
421
422// Now we need to recycle our xrootd part
423//
424 XrdXrootdProtocol::Recycle(lp, consec, reason);
425
426// Release the argument buffer
427//
428 if (runArgs) {free(runArgs); runArgs = 0;}
429
430// Delete all pending requests
431//
433
434// Now just free up our object.
435//
436 TranStack.Push(&TranLink);
437}
438
439/******************************************************************************/
440/* R e d r i v e */
441/******************************************************************************/
442
444{
445 static int eCode = htonl(kXR_NoMemory);
446 static char eText[] = "Insufficent memory to re-issue request";
447 static struct iovec ioV[] = {{(char *)&eCode,sizeof(eCode)},
448 {(char *)&eText,sizeof(eText)}};
449 int rc;
450
451// Update wait statistics
452//
453 runWTot += runWait;
454 runWait = 0;
455
456// While we are running asynchronously, there is no way that this object can
457// be deleted while a timer is outstanding as the link has been disabled. So,
458// we can reissue the request with little worry.
459//
460 if (!runALen || RunCopy(runArgs, runALen)) {
461 do{rc = Process2();
462 if (rc == 0) {
463 rc = realProt->Process(NULL);
464 }
465 if (runStatus)
466 {AtomicBeg(runMutex);
467 AtomicZAP(runStatus);
468 AtomicEnd(runMutex);
469 }
470 } while((rc == 0) && !runError && !runWait);
471 }
472 else rc = Send(kXR_error, ioV, 2, 0);
473
474// Defer the request if need be
475//
476 if (rc >= 0 && runWait) return;
477 runWTot = 0;
478
479// Indicate we are no longer active
480//
481 if (runStatus)
482 {AtomicBeg(runMutex);
483 AtomicZAP(runStatus);
484 AtomicEnd(runMutex);
485 }
486
487// If the link needs to be terminated, terminate the link. Otherwise, we can
488// enable the link for new requests at this point.
489//
490 if (rc < 0) Link->Close();
491 else Link->Enable();
492}
493
494/******************************************************************************/
495/* R e q T a b l e */
496/******************************************************************************/
497
498#define KXR_INDEX(x) x-kXR_auth
499
500const char *XrdXrootdTransit::ReqTable()
501{
502 static char rTab[kXR_truncate-kXR_auth+1];
503
504// Initialize the table
505//
506 memset(rTab, 0, sizeof(rTab));
507 rTab[KXR_INDEX(kXR_chmod)] = 1;
508 rTab[KXR_INDEX(kXR_close)] = 1;
509 rTab[KXR_INDEX(kXR_dirlist)] = 1;
510 rTab[KXR_INDEX(kXR_locate)] = 1;
511 rTab[KXR_INDEX(kXR_mkdir)] = 1;
512 rTab[KXR_INDEX(kXR_mv)] = 1;
513 rTab[KXR_INDEX(kXR_open)] = 1;
514 rTab[KXR_INDEX(kXR_prepare)] = 1;
515 rTab[KXR_INDEX(kXR_protocol)] = 1;
516 rTab[KXR_INDEX(kXR_query)] = 1;
517 rTab[KXR_INDEX(kXR_read)] = 2;
518 rTab[KXR_INDEX(kXR_readv)] = 2;
519 rTab[KXR_INDEX(kXR_rm)] = 1;
520 rTab[KXR_INDEX(kXR_rmdir)] = 1;
521 rTab[KXR_INDEX(kXR_set)] = 1;
522 rTab[KXR_INDEX(kXR_stat)] = 1;
523 rTab[KXR_INDEX(kXR_statx)] = 1;
524 rTab[KXR_INDEX(kXR_sync)] = 1;
525 rTab[KXR_INDEX(kXR_truncate)] = 1;
526 rTab[KXR_INDEX(kXR_write)] = 2;
527
528// Now return the address
529//
530 return rTab;
531}
532
533/******************************************************************************/
534/* Private: R e q W r i t e */
535/******************************************************************************/
536
537bool XrdXrootdTransit::ReqWrite(char *xdataP, int xdataL)
538{
539
540// Make sure we always transit to the resume point
541//
542 myBlen = 0;
543
544// If nothing was read, then this is a straight-up write
545//
546 if (!xdataL || !xdataP || !Request.header.dlen)
547 {Resume = 0; wBuff = xdataP; wBLen = xdataL;
548 return true;
549 }
550
551// Partial data was read, we may have to split this between a direct write
552// and a network read/write -- somewhat complicated.
553//
554 myBuff = wBuff = xdataP;
555 myBlast = wBLen = xdataL;
557 return true;
558}
559
560/******************************************************************************/
561/* R u n */
562/******************************************************************************/
563
564bool XrdXrootdTransit::Run(const char *xreqP, char *xdataP, int xdataL)
565{
566 int movLen, rc;
567
568// We do not allow re-entry if we are curently processing a request.
569// It will be reset, as need, when a response is effected.
570//
571 AtomicBeg(runMutex);
572 rc = AtomicInc(runStatus);
573 AtomicEnd(runMutex);
574 if (rc)
575 {TRACEP(REQ, "Bridge request failed due to re-entry");
576 return false;
577 }
578
579// Copy the request header
580//
581 memcpy((void *)&Request, (void *)xreqP, sizeof(Request));
582
583// Validate that we can actually handle this request
584//
586 if (Request.header.requestid & 0x8000
588 || !reqTab[Request.header.requestid - kXR_auth])
589 {TRACEP(REQ, "Unsupported bridge request");
590 return Fail(kXR_Unsupported, "Unsupported bridge request");
591 }
592
593// Validate the data length
594//
596 if (Request.header.dlen < 0)
597 {TRACEP(REQ, "Invalid request data length");
598 return Fail(kXR_ArgInvalid, "Invalid request data length");
599 }
600
601// Copy the stream id and trace this request
602//
604 TRACEP(REQ, "Bridge req=" <<Request.header.requestid
605 <<" dlen=" <<Request.header.dlen <<" blen=" <<xdataL);
606
607// If this is a write request, we will need to do a lot more
608//
609 if (Request.header.requestid == kXR_write) return ReqWrite(xdataP, xdataL);
610
611// Obtain any needed buffer and handle any existing data arguments. Also, we
612// need to keep a shadow copy of the request arguments should we get a wait
613// and will need to re-issue the request (the server mangles the args).
614//
615 if (Request.header.dlen)
616 {movLen = (xdataL < Request.header.dlen ? xdataL : Request.header.dlen);
617 if (!RunCopy(xdataP, movLen)) return true;
618 if (!runArgs || movLen > runABsz)
619 {if (runArgs) free(runArgs);
620 if (!(runArgs = (char *)malloc(movLen)))
621 {TRACEP(REQ, "Failed to allocate memory");
622 return Fail(kXR_NoMemory, "Insufficient memory");
623 }
624 runABsz = movLen;
625 }
626 memcpy(runArgs, xdataP, movLen); runALen = movLen;
627 if ((myBlen = Request.header.dlen - movLen))
628 {myBuff = argp->buff + movLen;
630 return true;
631 }
632 } else runALen = 0;
633
634// If we have all the data, indicate request accepted.
635//
636 runError = 0;
637 Resume = 0;
638 return true;
639}
640
641/******************************************************************************/
642/* Privae: R u n C o p y */
643/******************************************************************************/
644
645bool XrdXrootdTransit::RunCopy(char *buffP, int buffL)
646{
647
648// Allocate a buffer if we do not have one or it is too small
649//
650 if (!argp || Request.header.dlen+1 > argp->bsize)
651 {if (argp) BPool->Release(argp);
652 if (!(argp = BPool->Obtain(Request.header.dlen+1)))
653 {Fail(kXR_ArgTooLong, "Request argument too long"); return false;}
654 hcNow = hcPrev; halfBSize = argp->bsize >> 1;
655 }
656
657// Copy the arguments to the buffer
658//
659 memcpy(argp->buff, buffP, buffL);
660 argp->buff[buffL] = 0;
661 return true;
662}
663
664/******************************************************************************/
665/* S e n d */
666/******************************************************************************/
667
668int XrdXrootdTransit::Send(int rcode, const struct iovec *ioV, int ioN, int ioL)
669{
672 const char *eMsg;
673 int rc;
674 bool aOK;
675
676// Invoke the result object (we initially assume this is the final result)
677//
678 runDone = true;
679 switch(rcode)
680 {case kXR_error:
681 rc = XRD_GETNUM(ioV[0].iov_base);
682 eMsg = (ioN < 2 ? "" : (const char *)ioV[1].iov_base);
683 if (wBuff) respObj->Free(rInfo, wBuff, wBLen);
684 aOK = respObj->Error(rInfo, rc, eMsg);
685 break;
686 case kXR_ok:
687 if (wBuff) respObj->Free(rInfo, wBuff, wBLen);
688 aOK = (ioN ? respObj->Data(rInfo, ioV, ioN, ioL, true)
689 : respObj->Done(rInfo));
690 break;
691 case kXR_oksofar:
692 aOK = respObj->Data(rInfo, ioV, ioN, ioL, false);
693 runDone = false;
694 break;
695 case kXR_redirect:
696 if (wBuff) respObj->Free(rInfo, wBuff, wBLen);
697 rc = XRD_GETNUM(ioV[0].iov_base);
698 aOK = respObj->Redir(rInfo,rc,(const char *)ioV[1].iov_base);
699 break;
700 case kXR_wait:
701 return Wait(rInfo, ioV, ioN, ioL);
702 break;
703 case kXR_waitresp:
704 runDone = false;
705 return WaitResp(rInfo, ioV, ioN, ioL);
706 break;
707 default: if (wBuff) respObj->Free(rInfo, wBuff, wBLen);
708 aOK = respObj->Error(rInfo, kXR_ServerError,
709 "internal logic error");
710 break;
711 };
712
713// All done
714//
715 return (aOK ? 0 : -1);
716}
717
718/******************************************************************************/
719
720int XrdXrootdTransit::Send(long long offset, int dlen, int fdnum)
721{
724 offset, dlen, fdnum);
725
726// Effect callback (this is always a final result)
727//
728 runDone = true;
729 return (respObj->File(sfInfo, dlen) ? 0 : -1);
730}
731
732/******************************************************************************/
733
734int XrdXrootdTransit::Send(XrdOucSFVec *sfvec, int sfvnum, int dlen)
735{
738 sfvec, sfvnum, dlen);
739
740// Effect callback (this is always a final result)
741//
742 runDone = true;
743 return (respObj->File(sfInfo, dlen) ? 0 : -1);
744}
745
746/******************************************************************************/
747/* Private: W a i t */
748/******************************************************************************/
749
750int XrdXrootdTransit::Wait(XrdXrootd::Bridge::Context &rInfo,
751 const struct iovec *ioV, int ioN, int ioL)
752{
753 const char *eMsg;
754
755// Trace this request if need be
756//
757 runWait = XRD_GETNUM(ioV[0].iov_base);
758 eMsg = (ioN < 2 ? "reason unknown" : (const char *)ioV[1].iov_base);
759
760// Check if the protocol wants to handle all waits
761//
762 if (runWMax <= 0)
763 {int wtime = runWait;
764 runWait = 0;
765 return (respObj->Wait(rInfo, wtime, eMsg) ? 0 : -1);
766 }
767
768// Check if we have exceeded the maximum wait time
769//
770 if (runWTot >= runWMax)
771 {runDone = true;
772 runWait = 0;
773 return (respObj->Error(rInfo, kXR_Cancelled, eMsg) ? 0 : -1);
774 }
775
776// Readjust wait time
777//
778 if (runWait > runWMax) runWait = runWMax;
779
780// Check if the protocol wants a wait notification
781//
782 if (runWCall && !(respObj->Wait(rInfo, runWait, eMsg))) return -1;
783
784// All done, schedule the wait
785//
786 TRACEP(REQ, "Bridge delaying request " <<runWait <<" sec (" <<eMsg <<")");
787 Sched->Schedule((XrdJob *)&waitJob, time(0)+runWait);
788 return 0;
789}
790
791/******************************************************************************/
792/* Private: W a i t R e s p */
793/******************************************************************************/
794
795int XrdXrootdTransit::WaitResp(XrdXrootd::Bridge::Context &rInfo,
796 const struct iovec *ioV, int ioN, int ioL)
797{
799 const char *eMsg;
800 int wTime;
801
802// Trace this request if need be
803//
804 wTime = XRD_GETNUM(ioV[0].iov_base);
805 eMsg = (ioN < 2 ? "reason unknown" : (const char *)ioV[1].iov_base);
806 TRACEP(REQ, "Bridge waiting for resp; sid=" <<rInfo.sID.num
807 <<" wt=" <<wTime <<" (" <<eMsg <<")");
808
809// We would issue callback to see how we should handle this. However, we can't
810// predictably handle a waitresp. So that means we will just wait for a resp.
811//
812// XrdXrootd::Bridge::Result *newCBP = respObj->WaitResp(rInfo, runWait, eMsg);
813
814// Save the current state
815//
816 trP = new XrdXrootdTransPend(Link, this, &Request);
817 trP->Queue();
818
819// Effect a wait
820//
821 runWait = -1;
822 return 0;
823}
@ kXR_ArgInvalid
Definition XProtocol.hh:990
@ kXR_Unsupported
@ kXR_Cancelled
@ kXR_ServerError
@ kXR_ArgTooLong
Definition XProtocol.hh:992
@ kXR_NoMemory
Definition XProtocol.hh:998
kXR_char streamid[2]
Definition XProtocol.hh:156
kXR_char username[8]
Definition XProtocol.hh:396
@ kXR_waitresp
Definition XProtocol.hh:906
@ kXR_redirect
Definition XProtocol.hh:904
@ kXR_oksofar
Definition XProtocol.hh:900
@ kXR_ok
Definition XProtocol.hh:899
@ kXR_wait
Definition XProtocol.hh:905
@ kXR_error
Definition XProtocol.hh:903
struct ClientRequestHdr header
Definition XProtocol.hh:846
struct ClientLoginRequest login
Definition XProtocol.hh:857
kXR_unt16 requestid
Definition XProtocol.hh:157
@ kXR_read
Definition XProtocol.hh:125
@ kXR_open
Definition XProtocol.hh:122
@ 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_dirlist
Definition XProtocol.hh:116
@ kXR_rm
Definition XProtocol.hh:126
@ kXR_query
Definition XProtocol.hh:113
@ kXR_write
Definition XProtocol.hh:131
@ kXR_auth
Definition XProtocol.hh:112
@ 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_stat
Definition XProtocol.hh:129
@ kXR_locate
Definition XProtocol.hh:139
@ kXR_close
Definition XProtocol.hh:115
@ kXR_prepare
Definition XProtocol.hh:133
@ kXR_asyncap
Definition XProtocol.hh:378
@ kXR_ver002
Definition XProtocol.hh:386
unsigned short kXR_unt16
Definition XPtypes.hh:67
XrdOucTrace * XrdXrootdTrace
#define eMsg(x)
#define AtomicInc(x)
#define AtomicBeg(Mtx)
#define AtomicZAP(x)
#define AtomicEnd(Mtx)
const int SYS_LOG_01
#define TRACE_MEM
Definition XrdTrace.hh:38
#define TRACE(act, x)
Definition XrdTrace.hh:63
#define XRD_LOGGEDIN
#define TRACEP(act, x)
#define XRD_GETNUM(x)
#define KXR_INDEX(x)
void Release(XrdBuffer *bp)
Definition XrdBuffer.cc:221
XrdBuffer * Obtain(int bsz)
Definition XrdBuffer.cc:140
char * buff
Definition XrdBuffer.hh:45
bool isMapped() const
bool isIPType(IPType ipType) const
void Set(int inQMax, time_t agemax=1800)
Definition XrdObject.icc:90
void Push(XrdObject< T > *Node)
Definition XrdObject.hh:101
void Bump(int &val)
static void Sanitize(char *instr, char subc='_')
virtual void Recycle(XrdLink *lp=0, int consec=0, const char *reason=0)=0
virtual int Process(XrdLink *lp)=0
void Schedule(XrdJob *jp)
void Cancel(XrdJob *jp)
const char * pident
Trace identifier (originator)
XrdNetAddrInfo * addrInfo
Entity's connection details.
const char * tident
Trace identifier always preset.
char prot[XrdSecPROTOIDSIZE]
Auth protocol used (e.g. krb5)
char * name
Entity's name.
unsigned int ueid
Unique ID of entity instance.
char * host
Entity's host name dnr dependent.
virtual void Connect(const XrdSecEntity *client=0)
void Log(int mask, const char *esfx, const char *text1, const char *text2=0, const char *text3=0)
void Register(const char *Uname, const char *Hname, const char *Pname, unsigned int xSID=0)
void Report(const char *Info)
static XrdXrootdStats * SI
static XrdSysError & eDest
static unsigned int getSID()
XrdXrootdMonitor::User Monitor
int(XrdXrootdProtocol::* Resume)()
static XrdScheduler * Sched
int Process(XrdLink *lp) override
void Recycle(XrdLink *lp, int consec, const char *reason) override
XrdXrootdResponse Response
static XrdBuffManager * BPool
static XrdSfsFileSystem * osFS
void setID(unsigned long long id)
void Set(XrdLink *lp)
static XrdXrootdTransPend * Remove(XrdLink *lP, short sid)
union XrdXrootdTransPend::@190 Pend
XrdXrootdTransit * bridge
static void Clear(XrdXrootdTransit *trP)
bool Run(const char *xreqP, char *xdataP=0, int xdataL=0)
Inject an xrootd request into the protocol stack.
static const char * ReqTable()
Initialize the valid request table.
void Redrive()
Redrive a request after a wait.
int Send(int rcode, const struct iovec *ioVec, int ioNum, int ioLen)
Handle request data response.
void Recycle(XrdLink *lp, int consec, const char *reason)
Handle link shutdown.
static void Init(XrdScheduler *schedP, int qMax, int qTTL)
Perform one-time initialization.
static int Attn(XrdLink *lP, short *theSID, int rcode, const struct iovec *ioVec, int ioNum, int ioLen)
Handle attention response (i.e. async response)
void Proceed()
Resume processing after a waitresp completion.
bool Disc()
Handle dismantlement.
int Process(XrdLink *lp)
Handle link activation (replaces parent activation).
union XrdXrootd::Bridge::Context::@163 sID
associated request stream ID
virtual int File(Bridge::Context &info, int dlen)=0
virtual bool Data(Bridge::Context &info, const struct iovec *iovP, int iovN, int iovL, bool final)=0
virtual bool Error(Bridge::Context &info, int ecode, const char *etext)=0
virtual bool Done(Bridge::Context &info)=0
the result context
virtual bool Redir(Bridge::Context &info, int port, const char *hname)=0
virtual bool Wait(Bridge::Context &info, int wtime, const char *wtext)
virtual void Free(Bridge::Context &info, char *buffP, int buffL)
static const int uIPv4
ucap: Supports read redirects
static const int uPrip

Variable Documentation

◆ XrdXrootdTrace

XrdSysTrace XrdXrootdTrace
extern

Definition at line 96 of file XrdFrmAdminMain.cc.