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 494 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 } while((rc == 0) && !runError && !runWait);
466 }
467 else rc = Send(kXR_error, ioV, 2, 0);
468
469// Defer the request if need be
470//
471 if (rc >= 0 && runWait) return;
472 runWTot = 0;
473
474// Indicate we are no longer active
475//
476 if (runStatus)
477 {AtomicBeg(runMutex);
478 AtomicZAP(runStatus);
479 AtomicEnd(runMutex);
480 }
481
482// If the link needs to be terminated, terminate the link. Otherwise, we can
483// enable the link for new requests at this point.
484//
485 if (rc < 0) Link->Close();
486 else Link->Enable();
487}
488
489/******************************************************************************/
490/* R e q T a b l e */
491/******************************************************************************/
492
493#define KXR_INDEX(x) x-kXR_auth
494
495const char *XrdXrootdTransit::ReqTable()
496{
497 static char rTab[kXR_truncate-kXR_auth+1];
498
499// Initialize the table
500//
501 memset(rTab, 0, sizeof(rTab));
502 rTab[KXR_INDEX(kXR_chmod)] = 1;
503 rTab[KXR_INDEX(kXR_close)] = 1;
504 rTab[KXR_INDEX(kXR_dirlist)] = 1;
505 rTab[KXR_INDEX(kXR_locate)] = 1;
506 rTab[KXR_INDEX(kXR_mkdir)] = 1;
507 rTab[KXR_INDEX(kXR_mv)] = 1;
508 rTab[KXR_INDEX(kXR_open)] = 1;
509 rTab[KXR_INDEX(kXR_prepare)] = 1;
510 rTab[KXR_INDEX(kXR_protocol)] = 1;
511 rTab[KXR_INDEX(kXR_query)] = 1;
512 rTab[KXR_INDEX(kXR_read)] = 2;
513 rTab[KXR_INDEX(kXR_readv)] = 2;
514 rTab[KXR_INDEX(kXR_rm)] = 1;
515 rTab[KXR_INDEX(kXR_rmdir)] = 1;
516 rTab[KXR_INDEX(kXR_set)] = 1;
517 rTab[KXR_INDEX(kXR_stat)] = 1;
518 rTab[KXR_INDEX(kXR_statx)] = 1;
519 rTab[KXR_INDEX(kXR_sync)] = 1;
520 rTab[KXR_INDEX(kXR_truncate)] = 1;
521 rTab[KXR_INDEX(kXR_write)] = 2;
522
523// Now return the address
524//
525 return rTab;
526}
527
528/******************************************************************************/
529/* Private: R e q W r i t e */
530/******************************************************************************/
531
532bool XrdXrootdTransit::ReqWrite(char *xdataP, int xdataL)
533{
534
535// Make sure we always transit to the resume point
536//
537 myBlen = 0;
538
539// If nothing was read, then this is a straight-up write
540//
541 if (!xdataL || !xdataP || !Request.header.dlen)
542 {Resume = 0; wBuff = xdataP; wBLen = xdataL;
543 return true;
544 }
545
546// Partial data was read, we may have to split this between a direct write
547// and a network read/write -- somewhat complicated.
548//
549 myBuff = wBuff = xdataP;
550 myBlast = wBLen = xdataL;
552 return true;
553}
554
555/******************************************************************************/
556/* R u n */
557/******************************************************************************/
558
559bool XrdXrootdTransit::Run(const char *xreqP, char *xdataP, int xdataL)
560{
561 int movLen, rc;
562
563// We do not allow re-entry if we are curently processing a request.
564// It will be reset, as need, when a response is effected.
565//
566 AtomicBeg(runMutex);
567 rc = AtomicInc(runStatus);
568 AtomicEnd(runMutex);
569 if (rc) return false;
570
571// Copy the request header
572//
573 memcpy((void *)&Request, (void *)xreqP, sizeof(Request));
574
575// Validate that we can actually handle this request
576//
578 if (Request.header.requestid & 0x8000
580 || !reqTab[Request.header.requestid - kXR_auth])
581 return Fail(kXR_Unsupported, "Unsupported bridge request");
582
583// Validate the data length
584//
586 if (Request.header.dlen < 0)
587 return Fail(kXR_ArgInvalid, "Invalid request data length");
588
589// Copy the stream id and trace this request
590//
592 TRACEP(REQ, "Bridge req=" <<Request.header.requestid
593 <<" dlen=" <<Request.header.dlen <<" blen=" <<xdataL);
594
595// If this is a write request, we will need to do a lot more
596//
597 if (Request.header.requestid == kXR_write) return ReqWrite(xdataP, xdataL);
598
599// Obtain any needed buffer and handle any existing data arguments. Also, we
600// need to keep a shadow copy of the request arguments should we get a wait
601// and will need to re-issue the request (the server mangles the args).
602//
603 if (Request.header.dlen)
604 {movLen = (xdataL < Request.header.dlen ? xdataL : Request.header.dlen);
605 if (!RunCopy(xdataP, movLen)) return true;
606 if (!runArgs || movLen > runABsz)
607 {if (runArgs) free(runArgs);
608 if (!(runArgs = (char *)malloc(movLen)))
609 return Fail(kXR_NoMemory, "Insufficient memory");
610 runABsz = movLen;
611 }
612 memcpy(runArgs, xdataP, movLen); runALen = movLen;
613 if ((myBlen = Request.header.dlen - movLen))
614 {myBuff = argp->buff + movLen;
616 return true;
617 }
618 } else runALen = 0;
619
620// If we have all the data, indicate request accepted.
621//
622 runError = 0;
623 Resume = 0;
624 return true;
625}
626
627/******************************************************************************/
628/* Privae: R u n C o p y */
629/******************************************************************************/
630
631bool XrdXrootdTransit::RunCopy(char *buffP, int buffL)
632{
633
634// Allocate a buffer if we do not have one or it is too small
635//
636 if (!argp || Request.header.dlen+1 > argp->bsize)
637 {if (argp) BPool->Release(argp);
638 if (!(argp = BPool->Obtain(Request.header.dlen+1)))
639 {Fail(kXR_ArgTooLong, "Request argument too long"); return false;}
640 hcNow = hcPrev; halfBSize = argp->bsize >> 1;
641 }
642
643// Copy the arguments to the buffer
644//
645 memcpy(argp->buff, buffP, buffL);
646 argp->buff[buffL] = 0;
647 return true;
648}
649
650/******************************************************************************/
651/* S e n d */
652/******************************************************************************/
653
654int XrdXrootdTransit::Send(int rcode, const struct iovec *ioV, int ioN, int ioL)
655{
658 const char *eMsg;
659 int rc;
660 bool aOK;
661
662// Invoke the result object (we initially assume this is the final result)
663//
664 runDone = true;
665 switch(rcode)
666 {case kXR_error:
667 rc = XRD_GETNUM(ioV[0].iov_base);
668 eMsg = (ioN < 2 ? "" : (const char *)ioV[1].iov_base);
669 if (wBuff) respObj->Free(rInfo, wBuff, wBLen);
670 aOK = respObj->Error(rInfo, rc, eMsg);
671 break;
672 case kXR_ok:
673 if (wBuff) respObj->Free(rInfo, wBuff, wBLen);
674 aOK = (ioN ? respObj->Data(rInfo, ioV, ioN, ioL, true)
675 : respObj->Done(rInfo));
676 break;
677 case kXR_oksofar:
678 aOK = respObj->Data(rInfo, ioV, ioN, ioL, false);
679 runDone = false;
680 break;
681 case kXR_redirect:
682 if (wBuff) respObj->Free(rInfo, wBuff, wBLen);
683 rc = XRD_GETNUM(ioV[0].iov_base);
684 aOK = respObj->Redir(rInfo,rc,(const char *)ioV[1].iov_base);
685 break;
686 case kXR_wait:
687 return Wait(rInfo, ioV, ioN, ioL);
688 break;
689 case kXR_waitresp:
690 runDone = false;
691 return WaitResp(rInfo, ioV, ioN, ioL);
692 break;
693 default: if (wBuff) respObj->Free(rInfo, wBuff, wBLen);
694 aOK = respObj->Error(rInfo, kXR_ServerError,
695 "internal logic error");
696 break;
697 };
698
699// All done
700//
701 return (aOK ? 0 : -1);
702}
703
704/******************************************************************************/
705
706int XrdXrootdTransit::Send(long long offset, int dlen, int fdnum)
707{
710 offset, dlen, fdnum);
711
712// Effect callback (this is always a final result)
713//
714 runDone = true;
715 return (respObj->File(sfInfo, dlen) ? 0 : -1);
716}
717
718/******************************************************************************/
719
720int XrdXrootdTransit::Send(XrdOucSFVec *sfvec, int sfvnum, int dlen)
721{
724 sfvec, sfvnum, dlen);
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/* Private: W a i t */
734/******************************************************************************/
735
736int XrdXrootdTransit::Wait(XrdXrootd::Bridge::Context &rInfo,
737 const struct iovec *ioV, int ioN, int ioL)
738{
739 const char *eMsg;
740
741// Trace this request if need be
742//
743 runWait = XRD_GETNUM(ioV[0].iov_base);
744 eMsg = (ioN < 2 ? "reason unknown" : (const char *)ioV[1].iov_base);
745
746// Check if the protocol wants to handle all waits
747//
748 if (runWMax <= 0)
749 {int wtime = runWait;
750 runWait = 0;
751 return (respObj->Wait(rInfo, wtime, eMsg) ? 0 : -1);
752 }
753
754// Check if we have exceeded the maximum wait time
755//
756 if (runWTot >= runWMax)
757 {runDone = true;
758 runWait = 0;
759 return (respObj->Error(rInfo, kXR_Cancelled, eMsg) ? 0 : -1);
760 }
761
762// Readjust wait time
763//
764 if (runWait > runWMax) runWait = runWMax;
765
766// Check if the protocol wants a wait notification
767//
768 if (runWCall && !(respObj->Wait(rInfo, runWait, eMsg))) return -1;
769
770// All done, schedule the wait
771//
772 TRACEP(REQ, "Bridge delaying request " <<runWait <<" sec (" <<eMsg <<")");
773 Sched->Schedule((XrdJob *)&waitJob, time(0)+runWait);
774 return 0;
775}
776
777/******************************************************************************/
778/* Private: W a i t R e s p */
779/******************************************************************************/
780
781int XrdXrootdTransit::WaitResp(XrdXrootd::Bridge::Context &rInfo,
782 const struct iovec *ioV, int ioN, int ioL)
783{
785 const char *eMsg;
786 int wTime;
787
788// Trace this request if need be
789//
790 wTime = XRD_GETNUM(ioV[0].iov_base);
791 eMsg = (ioN < 2 ? "reason unknown" : (const char *)ioV[1].iov_base);
792 TRACEP(REQ, "Bridge waiting for resp; sid=" <<rInfo.sID.num
793 <<" wt=" <<wTime <<" (" <<eMsg <<")");
794
795// We would issue callback to see how we should handle this. However, we can't
796// predictably handle a waitresp. So that means we will just wait for a resp.
797//
798// XrdXrootd::Bridge::Result *newCBP = respObj->WaitResp(rInfo, runWait, eMsg);
799
800// Save the current state
801//
802 trP = new XrdXrootdTransPend(Link, this, &Request);
803 trP->Queue();
804
805// Effect a wait
806//
807 runWait = -1;
808 return 0;
809}
@ kXR_ArgInvalid
Definition XProtocol.hh:988
@ kXR_Unsupported
@ kXR_Cancelled
@ kXR_ServerError
@ kXR_ArgTooLong
Definition XProtocol.hh:990
@ kXR_NoMemory
Definition XProtocol.hh:996
kXR_char streamid[2]
Definition XProtocol.hh:156
kXR_char username[8]
Definition XProtocol.hh:396
@ kXR_waitresp
Definition XProtocol.hh:904
@ kXR_redirect
Definition XProtocol.hh:902
@ kXR_oksofar
Definition XProtocol.hh:898
@ kXR_ok
Definition XProtocol.hh:897
@ kXR_wait
Definition XProtocol.hh:903
@ kXR_error
Definition XProtocol.hh:901
struct ClientRequestHdr header
Definition XProtocol.hh:844
struct ClientLoginRequest login
Definition XProtocol.hh:855
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)
XrdXrootdTransit * bridge
union XrdXrootdTransPend::@185 Pend
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::@166 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.