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

#include <XrdOucPsx.hh>

Collaboration diagram for XrdOucPsx:

Public Member Functions

 XrdOucPsx (XrdVersionInfo *vInfo, const char *cfn, XrdSysLogger *lp=0, XrdOucEnv *vp=0)
 ~XrdOucPsx ()
const char * CCMInfo (const char *&path)
bool ClientConfig (const char *pfx, bool hush=false)
bool ConfigSetup (XrdSysError &eDest, bool hush=false)
bool hasCache ()
bool ParseCache (XrdSysError *Eroute, XrdOucStream &Config)
bool ParseCio (XrdSysError *Eroute, XrdOucStream &Config)
bool ParseCLib (XrdSysError *Eroute, XrdOucStream &Config)
bool ParseINet (XrdSysError *Eroute, XrdOucStream &Config)
bool ParseMLib (XrdSysError *Eroute, XrdOucStream &Config)
bool ParseNLib (XrdSysError *Eroute, XrdOucStream &Config)
bool ParseSet (XrdSysError *Eroute, XrdOucStream &Config)
bool ParseTrace (XrdSysError *Eroute, XrdOucStream &Config)
void SetRoot (const char *lroot, const char *oroot=0)

Public Attributes

int cioTries
int cioWait
char * configFN
int debugLvl
XrdOucCacheCMInit_t initCCM
int maxRHCB
char * mCache
XrdOucTListsetFirst
XrdOucTListsetLast
XrdOucCachetheCache
XrdOucEnvtheEnv
XrdSysLoggertheLogger
XrdOucName2NametheN2N
int traceLvl
bool useV4
bool xLfn2Pfn
bool xNameLib
char xPfn2Lfn

Static Public Attributes

static const int xP2Loff = 0
static const int xP2Lon = 1
static const int xP2Lsgi = 3
static const int xP2Lsrc = 2

Detailed Description

Definition at line 47 of file XrdOucPsx.hh.

Constructor & Destructor Documentation

◆ XrdOucPsx()

XrdOucPsx::XrdOucPsx ( XrdVersionInfo * vInfo,
const char * cfn,
XrdSysLogger * lp = 0,
XrdOucEnv * vp = 0 )
inline

Definition at line 102 of file XrdOucPsx.hh.

104 : configFN(strdup(cfn)), theLogger(lp), theEnv(vp),
105 theN2N(0), theCache(0), initCCM(0),
106 mCache(0), setFirst(0), setLast(0), maxRHCB(0),
107 traceLvl(0), debugLvl(0), cioWait(0), cioTries(0),
108 useV4(false), xLfn2Pfn(false), xPfn2Lfn(xP2Loff),
109 xNameLib(false),
110 LocalRoot(0), RemotRoot(0), N2NLib(0), N2NParms(0),
111 cPath(0), cParm(0), mPath(0), mParm(0),
112 myVersion(vInfo) {}
XrdOucEnv * theEnv
Definition XrdOucPsx.hh:80
bool useV4
Definition XrdOucPsx.hh:92
int maxRHCB
Definition XrdOucPsx.hh:87
char * configFN
Definition XrdOucPsx.hh:78
char * mCache
Definition XrdOucPsx.hh:84
int traceLvl
Definition XrdOucPsx.hh:88
int cioTries
Definition XrdOucPsx.hh:91
char xPfn2Lfn
Definition XrdOucPsx.hh:94
XrdOucCache * theCache
Definition XrdOucPsx.hh:82
int cioWait
Definition XrdOucPsx.hh:90
XrdOucTList * setFirst
Definition XrdOucPsx.hh:85
bool xNameLib
Definition XrdOucPsx.hh:95
int debugLvl
Definition XrdOucPsx.hh:89
bool xLfn2Pfn
Definition XrdOucPsx.hh:93
XrdOucName2Name * theN2N
Definition XrdOucPsx.hh:81
XrdOucCacheCMInit_t initCCM
Definition XrdOucPsx.hh:83
static const int xP2Loff
Definition XrdOucPsx.hh:97
XrdOucTList * setLast
Definition XrdOucPsx.hh:86
XrdSysLogger * theLogger
Definition XrdOucPsx.hh:79

References cioTries, cioWait, configFN, debugLvl, initCCM, maxRHCB, mCache, setFirst, setLast, theCache, theEnv, theLogger, theN2N, traceLvl, useV4, xLfn2Pfn, xNameLib, xP2Loff, and xPfn2Lfn.

◆ ~XrdOucPsx()

XrdOucPsx::~XrdOucPsx ( )

Definition at line 78 of file XrdOucPsx.cc.

79{
80 XrdOucTList *tP;
81
82 if (mCache) free(mCache);
83 if (LocalRoot) free(LocalRoot);
84 if (RemotRoot) free(RemotRoot);
85 if (N2NLib) free(N2NLib);
86 if (N2NParms) free(N2NParms);
87 if (cPath) free(cPath);
88 if (cParm) free(cParm);
89 if (mPath) free(mPath);
90 if (mParm) free(mParm);
91 if (configFN) free(configFN);
92
93 while((tP = setFirst)) {setFirst = tP->next; delete tP;}
94}
XrdOucTList * next

References configFN, mCache, XrdOucTList::next, and setFirst.

Member Function Documentation

◆ CCMInfo()

const char * XrdOucPsx::CCMInfo ( const char *& path)
inline

Definition at line 52 of file XrdOucPsx.hh.

52{path = mPath; return mParm;}

◆ ClientConfig()

bool XrdOucPsx::ClientConfig ( const char * pfx,
bool hush = false )

Definition at line 100 of file XrdOucPsx.cc.

101{
102/*
103 Function: Establish configuration at start up time.
104
105 Input: None.
106
107 Output: 0 upon success or !0 otherwise.
108*/
109 XrdOucEnv myEnv;
110 const char *theIname = "*client anon@localhost";
111 XrdOucTListFIFO tFifo;
112 char *var;
113 int cfgFD, retc, pfxlen = strlen(pfx);
114 bool aOK = true;
115
116// Export the instance name as this is used in all sort of places
117//
118 XrdOucEnv::Export("XRDINSTANCE", theIname);
119
120// We must establish a stable logger for client-side configs. The error and
121// stream objects can be temporary.
122//
123 logP = new XrdSysLogger;
124 XrdSysError eDest(logP, "psx");
125 XrdOucStream Config(&eDest, theIname, &myEnv, "=====> ");
126
127// Try to open the configuration file.
128//
129 if ((cfgFD = open(configFN, O_RDONLY, 0)) < 0)
130 {eDest.Emsg("Config", errno, "open config file", configFN);
131 return false;
132 }
133 Config.Attach(cfgFD);
134
135// Capture all lines going to stderr if so wanted
136//
137 if (hush) logP->Capture(&tFifo);
138
139// Now start reading records until eof.
140//
141 while((var = Config.GetMyFirstWord()))
142 {if (!strncmp(var, pfx, pfxlen) && !Parse(var+pfxlen, Config, eDest))
143 {Config.Echo(); aOK = false;}
144 }
145
146// Check if we should blither about any warnings or errors
147//
148 if (hush)
149 {logP->Capture(0);
150 if ((!aOK || warn) && tFifo.first) WarnConfig(eDest, tFifo.first, !aOK);
151 tFifo.Clear();
152 }
153
154// Now check if any errors occurred during file i/o
155//
156 if ((retc = Config.LastError()))
157 {eDest.Emsg("Config", retc, "read config file", configFN); aOK = false;}
158 Config.Close();
159
160
161// If all went well, materialize the configuration and return result
162//
163 if (aOK) return ConfigSetup(eDest, hush);
164 return false;
165}
static XrdSysError eDest(0,"crypto_")
#define open
Definition XrdPosix.hh:76
static int Export(const char *Var, const char *Val)
Definition XrdOucEnv.cc:170
bool ConfigSetup(XrdSysError &eDest, bool hush=false)
Definition XrdOucPsx.cc:217
XrdOucTList * first
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
XrdCmsConfig Config

References XrdOucTListFIFO::Clear(), configFN, ConfigSetup(), eDest, XrdOucEnv::Export(), XrdOucTListFIFO::first, and open.

Referenced by XrdPosixXrootd::XrdPosixXrootd().

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

◆ ConfigSetup()

bool XrdOucPsx::ConfigSetup ( XrdSysError & eDest,
bool hush = false )

Definition at line 217 of file XrdOucPsx.cc.

218{
219 XrdOucTListFIFO tFifo;
220 bool aOK = true;
221
222// Handle hush option for client-side configs
223//
224 if (hush) eDest.logger()->Capture(&tFifo);
225
226// Initialize an alternate cache if one is present and load a CCM if need be
227//
228 if (cPath && !ConfigCache(eDest))
229 {aOK = false;
230 if (hush)
231 {eDest.logger()->Capture(0);
232 WarnPlugin(eDest, tFifo.first, "cachelib", cPath);
233 tFifo.Clear();
234 eDest.logger()->Capture(&tFifo);
235 }
236 } else {
237 if (mPath && theCache && !LoadCCM(eDest))
238 {aOK = false;
239 if (hush)
240 {eDest.logger()->Capture(0);
241 WarnPlugin(eDest, tFifo.first, "ccmlib", mPath);
242 tFifo.Clear();
243 eDest.logger()->Capture(&tFifo);
244 }
245 }
246 }
247
248// Configure the N2N library:
249//
250 if (!ConfigN2N(eDest))
251 {aOK = false;
252 if (hush)
253 {eDest.logger()->Capture(0);
254 if (N2NLib) WarnPlugin(eDest,tFifo.first,"namelib",N2NLib);
255 else WarnPlugin(eDest,tFifo.first,"name2name for",LocalRoot);
256 tFifo.Clear();
257 }
258 }
259
260// All done
261//
262 if (hush) eDest.logger()->Capture(0);
263 return aOK;
264}
XrdSysLogger * logger(XrdSysLogger *lp=0)
void Capture(XrdOucTListFIFO *tFIFO)

References XrdOucTListFIFO::Clear(), eDest, XrdOucTListFIFO::first, and theCache.

Referenced by ClientConfig().

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

◆ hasCache()

bool XrdOucPsx::hasCache ( )
inline

Definition at line 58 of file XrdOucPsx.hh.

58{return mCache != 0 || cPath != 0;}

References mCache.

◆ ParseCache()

bool XrdOucPsx::ParseCache ( XrdSysError * Eroute,
XrdOucStream & Config )

Definition at line 330 of file XrdOucPsx.cc.

331{
332 long long llVal, cSize=-1, m2Cache=-1, pSize=-1, minPg = -1;
333 const char *ivN = 0;
334 char *val, *sfSfx = 0, sfVal = '0', lgVal = '0', dbVal = '0', rwVal = '0';
335 char eBuff[2048], pBuff[1024], *eP;
336 struct sztab {const char *Key; long long *Val;} szopts[] =
337 {{"max2cache", &m2Cache},
338 {"minpages", &minPg},
339 {"pagesize", &pSize},
340 {"size", &cSize}
341 };
342 int i, numopts = sizeof(szopts)/sizeof(struct sztab);
343
344// Delete any cache parameters we may have
345//
346 if (mCache) {free(mCache); mCache = 0;}
347
348// If we have no parameters, then we just use the defaults
349//
350 if (!(val = Config.GetWord()))
351 {mCache = strdup("mode=s&optwr=0"); return true;}
352 *pBuff = 0;
353
354do{for (i = 0; i < numopts; i++) if (!strcmp(szopts[i].Key, val)) break;
355
356 if (i < numopts)
357 {if (!(val = Config.GetWord())) ivN = szopts[i].Key;
358 else if (XrdOuca2x::a2sz(*Eroute,szopts[i].Key,val,&llVal,0))
359 return false;
360 else *(szopts[i].Val) = llVal;
361 } else {
362 if (!strcmp("debug", val))
363 {if (!(val = Config.GetWord())
364 || ((*val < '0' || *val > '3') && !*(val+1))) ivN = "debug";
365 else dbVal = *val;
366 }
367 else if (!strcmp("logstats", val)) lgVal = '1';
368 else if (!strcmp("preread", val))
369 {if ((val = ParseCache(Eroute, Config, pBuff))) continue;
370 if (*pBuff == '?') return false;
371 break;
372 }
373 else if (!strcmp("r/w", val)) rwVal = '1';
374 else if (!strcmp("sfiles", val))
375 {if (sfSfx) {free(sfSfx); sfSfx = 0;}
376 if (!(val = Config.GetWord())) ivN = "sfiles";
377 else if (!strcmp("on", val)) sfVal = '1';
378 else if (!strcmp("off", val)) sfVal = '0';
379 else if (*val == '.' && strlen(val) < 16) sfSfx = strdup(val);
380 else ivN = "sfiles";
381 }
382 else {Eroute->Emsg("Config","invalid cache keyword -", val);
383 return false;
384 }
385 }
386
387 if (ivN)
388 {if (!val) Eroute->Emsg("Config","cache", ivN,"value not specified.");
389 else Eroute->Emsg("Config", val, "is invalid for cache", ivN);
390 return false;
391 }
392 } while ((val = Config.GetWord()));
393
394// Construct the envar string
395//
396 strcpy(eBuff, "mode=s&maxfiles=16384"); eP = eBuff + strlen(eBuff);
397 if (cSize > 0) eP += sprintf(eP, "&cachesz=%lld", cSize);
398 if (dbVal != '0') eP += sprintf(eP, "&debug=%c", dbVal);
399 if (m2Cache > 0) eP += sprintf(eP, "&max2cache=%lld", m2Cache);
400 if (minPg > 0)
401 {if (minPg > 32767) minPg = 32767;
402 eP += sprintf(eP, "&minpages=%lld", minPg);
403 }
404 if (pSize > 0) eP += sprintf(eP, "&pagesz=%lld", pSize);
405 if (lgVal != '0') strcat(eP, "&optlg=1");
406 if (sfVal != '0' || sfSfx)
407 {if (!sfSfx) strcat(eP, "&optsf=1");
408 else {strcat(eP, "&optsf="); strcat(eBuff, sfSfx); free(sfSfx);}
409 }
410 if (rwVal != '0') strcat(eP, "&optwr=1");
411 if (*pBuff) strcat(eP, pBuff);
412
413 mCache = strdup(eBuff);
414 return true;
415}
bool ParseCache(XrdSysError *Eroute, XrdOucStream &Config)
Definition XrdOucPsx.cc:330
static int a2sz(XrdSysError &, const char *emsg, const char *item, long long *val, long long minv=-1, long long maxv=-1)
Definition XrdOuca2x.cc:257

References XrdOuca2x::a2sz(), XrdSysError::Emsg(), mCache, and ParseCache().

Referenced by ParseCache().

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

◆ ParseCio()

bool XrdOucPsx::ParseCio ( XrdSysError * Eroute,
XrdOucStream & Config )

Definition at line 481 of file XrdOucPsx.cc.

482{
483 char *val;
484 int tsec, mtry;
485
486// Get the try seconds
487//
488 if (!(val = Config.GetWord()) || !val[0])
489 {Eroute->Emsg("Config", "ciosync parameter not specified"); return false;}
490
491// Convert to seconds
492//
493 if (XrdOuca2x::a2i(*Eroute,"ciosync interval",val,&tsec,10)) return false;
494
495// Get the max seconds
496//
497 if (!(val = Config.GetWord()) || !val[0])
498 {Eroute->Emsg("Config", "max time not specified"); return false;}
499
500// Convert to seconds
501//
502 if (XrdOuca2x::a2i(*Eroute,"ciosync max time",val,&mtry,2)) return false;
503
504// Set values and return success
505//
506 cioWait = tsec;
507 cioTries = mtry;
508 return true;
509}
static int a2i(XrdSysError &, const char *emsg, const char *item, int *val, int minv=-1, int maxv=-1)
Definition XrdOuca2x.cc:45

References XrdOuca2x::a2i(), cioTries, cioWait, and XrdSysError::Emsg().

Here is the call graph for this function:

◆ ParseCLib()

bool XrdOucPsx::ParseCLib ( XrdSysError * Eroute,
XrdOucStream & Config )

Definition at line 525 of file XrdOucPsx.cc.

526{
527 char *val, parms[2048];
528
529// Get the path and parms
530//
531 if (!(val = Config.GetWord()) || !val[0])
532 {Eroute->Emsg("Config", "cachelib not specified"); return false;}
533
534// Save the path
535//
536 if (cPath) free(cPath);
537 if (!strcmp(val,"libXrdFileCache.so") || !strcmp(val,"libXrdFileCache-4.so"))
538 {Eroute->Say("Config warning: 'libXrdFileCache' has been replaced by "
539 "'libXrdPfc'; for future compatibility specify 'default' instead!");
540 cPath = strdup("libXrdPfc.so");
541 } else {
542 cPath = (strcmp(val,"default") ? strdup(val) : strdup("libXrdPfc.so"));
543 }
544
545// Get the parameters
546//
547 if (!Config.GetRest(parms, sizeof(parms)))
548 {Eroute->Emsg("Config", "cachelib parameters too long"); return false;}
549 if (cParm) free(cParm);
550 cParm = (*parms ? strdup(parms) : 0);
551
552// All done
553//
554 return true;
555}
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)

References XrdSysError::Emsg(), and XrdSysError::Say().

Here is the call graph for this function:

◆ ParseINet()

bool XrdOucPsx::ParseINet ( XrdSysError * Eroute,
XrdOucStream & Config )

Definition at line 611 of file XrdOucPsx.cc.

612{
613 char *val;
614
615// Get the mode
616//
617 if (!(val = Config.GetWord()) || !val[0])
618 {Eroute->Emsg("Config", "inetmode value not specified"); return false;}
619
620// Validate the value
621//
622 if (!strcmp(val, "v4")) useV4 = true;
623 else if (!strcmp(val, "v6")) useV4 = false;
624 else {Eroute->Emsg("Config", "invalid inetmode value -", val); return false;}
625
626// All done
627//
628 return true;
629}

References XrdSysError::Emsg(), and useV4.

Here is the call graph for this function:

◆ ParseMLib()

bool XrdOucPsx::ParseMLib ( XrdSysError * Eroute,
XrdOucStream & Config )

Definition at line 571 of file XrdOucPsx.cc.

572{
573 char *val, parms[2048];
574
575// Get the path and parms
576//
577 if (!(val = Config.GetWord()) || !val[0])
578 {Eroute->Emsg("Config", "ccmlib not specified"); return false;}
579
580// Save the path
581//
582 if (mPath) free(mPath);
583 mPath = strdup(val);
584
585// Get the parameters
586//
587 if (!Config.GetRest(parms, sizeof(parms)))
588 {Eroute->Emsg("Config", "ccmlib parameters too long"); return false;}
589 if (mParm) free(mParm);
590 mParm = (*parms ? strdup(parms) : 0);
591
592// All done
593//
594 return true;
595}

References XrdSysError::Emsg().

Here is the call graph for this function:

◆ ParseNLib()

bool XrdOucPsx::ParseNLib ( XrdSysError * Eroute,
XrdOucStream & Config )

Definition at line 646 of file XrdOucPsx.cc.

647{
648 char *val, parms[1024];
649 bool l2p = false, p2l = false, p2lsrc = false, p2lsgi = false;
650
651// Parse options, if any
652//
653 while((val = Config.GetWord()) && val[0])
654 { if (!strcmp(val, "-lfn2pfn")) l2p = true;
655 else if (!strcmp(val, "-lfncache")) p2l = true;
656 else if (!strcmp(val, "-lfncachesrc")) p2l = p2lsrc = true;
657 else if (!strcmp(val, "-lfncachesrc+")) p2l = p2lsgi = true;
658 else break;
659 }
660
661 if (!l2p && !p2l) l2p = true;
662 xLfn2Pfn = l2p;
663 if (!p2l) xPfn2Lfn = xP2Loff;
664 else if (p2lsrc) xPfn2Lfn = xP2Lsrc;
665 else if (p2lsgi) xPfn2Lfn = xP2Lsgi;
666 else xPfn2Lfn = xP2Lon;
667
668// Get the path
669//
670 if (!val || !val[0])
671 {Eroute->Emsg("Config", "namelib not specified"); return false;}
672 xNameLib = true;
673
674// Record the path
675//
676 if (N2NLib) free(N2NLib);
677 N2NLib = strdup(val);
678
679// Record any parms
680//
681 if (!Config.GetRest(parms, sizeof(parms)))
682 {Eroute->Emsg("Config", "namelib parameters too long"); return false;}
683 if (N2NParms) free(N2NParms);
684 N2NParms = (*parms ? strdup(parms) : 0);
685 return true;
686}
static const int xP2Lon
Definition XrdOucPsx.hh:98
static const int xP2Lsgi
Definition XrdOucPsx.hh:100
static const int xP2Lsrc
Definition XrdOucPsx.hh:99

References XrdSysError::Emsg(), xLfn2Pfn, xNameLib, xP2Loff, xP2Lon, xP2Lsgi, xP2Lsrc, and xPfn2Lfn.

Here is the call graph for this function:

◆ ParseSet()

bool XrdOucPsx::ParseSet ( XrdSysError * Eroute,
XrdOucStream & Config )

Definition at line 702 of file XrdOucPsx.cc.

703{
704 char kword[256], *val;
705 int kval, noGo;
706 static struct sopts {const char *Sopt; const char *Copt; int isT;} Sopts[] =
707 {
708 {"ConnectTimeout", "ConnectionWindow",1}, // Default 120
709 {"ConnectionRetry", "ConnectionRetry",1}, // Default 5
710 {"DataServerTTL", "DataServerTTL",1}, // Default 300
711 {"DataServerConn_ttl", "DataServerTTL",1}, // Default 300
712 {"DebugLevel", "*",0}, // Default -1
713 {"DebugMask", "*",0}, // Default -1
714 {"DirlistAll", "DirlistAll",0},
715 {"DataServerTTL", "DataServerTTL",1}, // Default 300
716 {"LBServerConn_ttl", "LoadBalancerTTL",1}, // Default 1200
717 {"LoadBalancerTTL", "LoadBalancerTTL",1}, // Default 1200
718 {"ParallelEvtLoop", "ParallelEvtLoop",0}, // Default 10
719 {"ParStreamsPerPhyConn", "SubStreamsPerChannel",0},// Default 1
720 {"ReadAheadSize", 0,0},
721 {"ReadAheadStrategy", 0,0},
722 {"ReadCacheBlkRemPolicy", 0,0},
723 {"ReadCacheSize", 0,0},
724 {"ReadTrimBlockSize", 0,0},
725 {"ReconnectWait", "StreamErrorWindow",1}, // Default 1800
726 {"RedirCntTimeout", "!use RedirectLimit instead.",0},
727 {"RedirectLimit", "RedirectLimit",0}, // Default 16
728 {"RedirectorConn_ttl", "LoadBalancerTTL",1}, // Default 1200
729 {"RemoveUsedCacheBlocks", 0,0},
730 {"RequestTimeout", "RequestTimeout",1}, // Default 1800
731 {"StreamTimeout", "StreamTimeout",1},
732 {"TransactionTimeout", "",1},
733 {"WorkerThreads", "WorkerThreads",0} // Set To 64
734 };
735 int i, numopts = sizeof(Sopts)/sizeof(struct sopts);
736
737 if (!(val = Config.GetWord()))
738 {Eroute->Emsg("Config", "setopt keyword not specified"); return false;}
739 strlcpy(kword, val, sizeof(kword));
740 if (!(val = Config.GetWord()))
741 {Eroute->Emsg("Config", "setopt", kword, "value not specified");
742 return false;
743 }
744
745 for (i = 0; i < numopts; i++)
746 if (!strcmp(Sopts[i].Sopt, kword))
747 {if (!Sopts[i].Copt || *(Sopts[i].Copt) == '!')
748 {Eroute->Emsg("Config", kword, "no longer supported;",
749 (Sopts[i].Copt ? Sopts[i].Copt+1 : "ignored"));
750 } else if (*(Sopts[i].Copt))
751 {noGo = (Sopts[i].isT
752 ? XrdOuca2x::a2tm(*Eroute,kword,val,&kval)
753 : XrdOuca2x::a2i (*Eroute,kword,val,&kval));
754 if (noGo) return false;
755 if (*(Sopts[i].Copt) == '*') debugLvl = kval;
756 else ParseSet(Sopts[i].Copt, kval);
757 }
758 return true;
759 }
760
761 Eroute->Say("Config warning: ignoring unknown setopt '",kword,"'.");
762 warn = true;
763 return true;
764}
size_t strlcpy(char *dst, const char *src, size_t sz)
bool ParseSet(XrdSysError *Eroute, XrdOucStream &Config)
Definition XrdOucPsx.cc:702
static int a2tm(XrdSysError &, const char *emsg, const char *item, int *val, int minv=-1, int maxv=-1)
Definition XrdOuca2x.cc:288

References XrdOuca2x::a2i(), XrdOuca2x::a2tm(), debugLvl, XrdSysError::Emsg(), ParseSet(), XrdSysError::Say(), and strlcpy().

Referenced by ParseSet().

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

◆ ParseTrace()

bool XrdOucPsx::ParseTrace ( XrdSysError * Eroute,
XrdOucStream & Config )

Definition at line 791 of file XrdOucPsx.cc.

792{
793 char *val;
794 static struct traceopts {const char *opname; int opval;} tropts[] =
795 {
796 {"all", 3},
797 {"debug", 2},
798 {"on", 1}
799 };
800 int i, trval = 0, numopts = sizeof(tropts)/sizeof(struct traceopts);
801
802 if (!(val = Config.GetWord()))
803 {Eroute->Emsg("Config", "trace option not specified"); return false;}
804 while (val)
805 {if (!strcmp(val, "off")) trval = 0;
806 else {for (i = 0; i < numopts; i++)
807 {if (!strcmp(val, tropts[i].opname))
808 {trval |= tropts[i].opval;
809 break;
810 }
811 }
812 if (i >= numopts)
813 {Eroute->Say("Config warning: ignoring invalid trace option '",val,"'.");
814 warn = true;
815 }
816 }
817 val = Config.GetWord();
818 }
819 traceLvl = trval;
820 return true;
821}

References XrdSysError::Emsg(), XrdSysError::Say(), and traceLvl.

Here is the call graph for this function:

◆ SetRoot()

void XrdOucPsx::SetRoot ( const char * lroot,
const char * oroot = 0 )

Definition at line 827 of file XrdOucPsx.cc.

828{
829// Handle the local root (posix dependent)
830//
831 if (LocalRoot) free(LocalRoot);
832 if (!lroot) LocalRoot = 0;
833 {LocalRoot = strdup(lroot);
834 xLfn2Pfn = true;
835 }
836
837// Handle the oss local root
838//
839 if (RemotRoot) free(RemotRoot);
840 RemotRoot = (rroot ? strdup(rroot) : 0);
841}

References xLfn2Pfn.

Member Data Documentation

◆ cioTries

int XrdOucPsx::cioTries

Definition at line 91 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), ParseCio(), and XrdPosixConfig::SetConfig().

◆ cioWait

int XrdOucPsx::cioWait

Definition at line 90 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), ParseCio(), and XrdPosixConfig::SetConfig().

◆ configFN

char* XrdOucPsx::configFN

Definition at line 78 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), ~XrdOucPsx(), and ClientConfig().

◆ debugLvl

int XrdOucPsx::debugLvl

Definition at line 89 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), ParseSet(), and XrdPosixConfig::SetConfig().

◆ initCCM

XrdOucCacheCMInit_t XrdOucPsx::initCCM

Definition at line 83 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), and XrdPosixConfig::SetConfig().

◆ maxRHCB

int XrdOucPsx::maxRHCB

Definition at line 87 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), and XrdPosixConfig::SetConfig().

◆ mCache

char* XrdOucPsx::mCache

Definition at line 84 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), ~XrdOucPsx(), hasCache(), ParseCache(), and XrdPosixConfig::SetConfig().

◆ setFirst

XrdOucTList* XrdOucPsx::setFirst

Definition at line 85 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), ~XrdOucPsx(), and XrdPosixConfig::SetConfig().

◆ setLast

XrdOucTList* XrdOucPsx::setLast

Definition at line 86 of file XrdOucPsx.hh.

Referenced by XrdOucPsx().

◆ theCache

XrdOucCache* XrdOucPsx::theCache

Definition at line 82 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), ConfigSetup(), and XrdPosixConfig::SetConfig().

◆ theEnv

XrdOucEnv* XrdOucPsx::theEnv

Definition at line 80 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), and XrdPosixConfig::SetConfig().

◆ theLogger

XrdSysLogger* XrdOucPsx::theLogger

Definition at line 79 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), and XrdPosixConfig::SetConfig().

◆ theN2N

XrdOucName2Name* XrdOucPsx::theN2N

Definition at line 81 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), and XrdPosixConfig::SetConfig().

◆ traceLvl

int XrdOucPsx::traceLvl

Definition at line 88 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), ParseTrace(), and XrdPosixConfig::SetConfig().

◆ useV4

bool XrdOucPsx::useV4

Definition at line 92 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), ParseINet(), and XrdPosixConfig::SetConfig().

◆ xLfn2Pfn

bool XrdOucPsx::xLfn2Pfn

Definition at line 93 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), ParseNLib(), and SetRoot().

◆ xNameLib

bool XrdOucPsx::xNameLib

Definition at line 95 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), and ParseNLib().

◆ xP2Loff

const int XrdOucPsx::xP2Loff = 0
static

Definition at line 97 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), and ParseNLib().

◆ xP2Lon

const int XrdOucPsx::xP2Lon = 1
static

Definition at line 98 of file XrdOucPsx.hh.

Referenced by ParseNLib().

◆ xP2Lsgi

const int XrdOucPsx::xP2Lsgi = 3
static

Definition at line 100 of file XrdOucPsx.hh.

Referenced by ParseNLib(), and XrdPosixConfig::SetConfig().

◆ xP2Lsrc

const int XrdOucPsx::xP2Lsrc = 2
static

Definition at line 99 of file XrdOucPsx.hh.

Referenced by ParseNLib(), and XrdPosixConfig::SetConfig().

◆ xPfn2Lfn

char XrdOucPsx::xPfn2Lfn

Definition at line 94 of file XrdOucPsx.hh.

Referenced by XrdOucPsx(), ParseNLib(), and XrdPosixConfig::SetConfig().


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