XRootD
Loading...
Searching...
No Matches
XrdSsiSfsConfig.cc
Go to the documentation of this file.
1/******************************************************************************/
2/* */
3/* X r d S s i S f s C o n f i g . c c */
4/* */
5/* (c) 2013 by the Board of Trustees of the Leland Stanford, Jr., University */
6/* Produced by Andrew Hanushevsky for Stanford University under contract */
7/* DE-AC02-76-SFO0515 with the Deprtment of Energy */
8/* */
9/* This file is part of the XRootD software suite. */
10/* */
11/* XRootD is free software: you can redistribute it and/or modify it under */
12/* the terms of the GNU Lesser General Public License as published by the */
13/* Free Software Foundation, either version 3 of the License, or (at your */
14/* option) any later version. */
15/* */
16/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
17/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
18/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
19/* License for more details. */
20/* */
21/* You should have received a copy of the GNU Lesser General Public License */
22/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
23/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
24/* */
25/* The copyright holder's institutional names and contributor's names may not */
26/* be used to endorse or promote products derived from this software without */
27/* specific prior written permission of the institution or contributor. */
28/******************************************************************************/
29
30#include <unistd.h>
31#include <cerrno>
32#include <fcntl.h>
33#include <cstring>
34#include <cstdio>
35#include <cstdlib>
36#include <string>
37#include <sys/param.h>
38#include <sys/stat.h>
39#include <sys/types.h>
40
41#include "XrdCms/XrdCmsRole.hh"
42
43#include "XrdOuc/XrdOuca2x.hh"
46#include "XrdOuc/XrdOucUtils.hh"
47
48#include "XrdSsi/XrdSsiSfs.hh"
54#include "XrdSsi/XrdSsiTrace.hh"
55
56#include "XrdSsi/XrdSsiCms.hh"
57
58#include "XrdSys/XrdSysError.hh"
64
65#include "XrdOuc/XrdOucEnv.hh"
67#include "XrdOuc/XrdOucPList.hh"
68
69#include "XrdNet/XrdNetIF.hh"
70
71#include "XrdVersion.hh"
72
73#ifdef AIX
74#include <sys/mode.h>
75#endif
76
77/******************************************************************************/
78/* E x t e r n s */
79/******************************************************************************/
80
81class XrdScheduler;
82
83namespace XrdSsi
84{
86
88
90
92
94
96
98
100
101 int respWT = 0x7fffffff;
102
103 int minRSZ = 1024;
104 int maxRSZ = 2097152;
105
106 bool fsChk = false;
107
108 bool detReqOK = false;
109
110extern XrdSfsFileSystem *theFS;
111
112extern XrdSysError Log;
113};
114
115using namespace XrdSsi;
116
117/******************************************************************************/
118/* C o n s t r u c t o r */
119/******************************************************************************/
120
122{
123 static XrdVERSIONINFODEF(myVer, ssi, XrdVNUMBER, XrdVERSION);
124 char *bp;
125
126// Establish defaults
127//
128 ConfigFN = 0;
129 CmsLib = 0;
130 CmsParms = 0;
131 SsiCms = 0;
132 SvcLib = 0;
133 SvcParms = 0;
134 myRole = 0;
135 respWT = 0x7fffffff;
136 isServer = true;
137 isCms = iscms;
138 myHost = getenv("XRDHOST");
139 myProg = getenv("XRDPROG");
141 myVersion = &myVer;
142 myPort = (bp = getenv("XRDPORT")) ? strtol(bp, (char **)NULL, 10) : 0;
143}
144
145/******************************************************************************/
146/* D e s t r u c t o r */
147/******************************************************************************/
148
150{
151 if (ConfigFN) free(ConfigFN);
152 if (CmsLib) free(CmsLib);
153 if (CmsParms) free(CmsParms);
154 if (SvcLib) free(SvcLib);
155 if (SvcParms) free(SvcParms);
156}
157
158/******************************************************************************/
159/* C o n f i g u r e */
160/******************************************************************************/
161
162bool XrdSsiSfsConfig::Configure(const char *cFN, XrdOucEnv *envP)
163{
164 char *var;
165 const char *tmp;
166 int cfgFD, retc, NoGo = 0;
167 XrdOucEnv myEnv;
168 XrdOucStream cStrm(&Log, getenv("XRDINSTANCE"), &myEnv, "=====> ");
169
170// Print warm-up message
171//
172 Log.Say("++++++ ssi initialization started.");
173
174// Preset all variables with common defaults
175//
176 if (getenv("XRDDEBUG") || getenv("XRDSSIDEBUG"))
178
179// If there is no config file, return with an error.
180//
181 if( !cFN || !*cFN)
182 {Log.Emsg("Config", "Configuration file not specified.");
183 return false;
184 }
185
186// Try to open the configuration file.
187//
188 ConfigFN = strdup(cFN);
189 if ( (cfgFD = open(cFN, O_RDONLY, 0)) < 0)
190 {Log.Emsg("Config", errno, "open config file", cFN);
191 return false;
192 }
193 cStrm.Attach(cfgFD);
194 static const char *cvec[] = { "*** ssi (sfs) plugin config:", 0 };
195 cStrm.Capture(cvec);
196
197// Now start reading records until eof.
198//
199 cFile = &cStrm;
200 while((var = cFile->GetMyFirstWord()))
201 {if (!strncmp(var, "ssi.", 4)
202 || !strcmp(var, "all.role"))
203 {if (ConfigXeq(var+4)) {cFile->Echo(); NoGo=1;}}
204 }
205
206// Now check if any errors occurred during file i/o
207//
208 if ((retc = cStrm.LastError()))
209 NoGo = Log.Emsg("Config", -retc, "read config file", cFN);
210 cStrm.Close();
211
212// Make sure we are configured as a server
213//
214 if (!isServer)
215 {Log.Emsg("Config", "ssi only supports server roles but role is not "
216 "defined as 'server'.");
217 return false;
218 }
219
220// Configure filesystem callout as needed
221//
222 if ((fsChk = FSPath.NotEmpty()))
223 {if (!theFS && !isCms)
224 {Log.Emsg("Config", "Specifying an fspath requires SSI to be stacked "
225 "with a file system!");
226 return false;
227 }
228 if (isServer && !theFS && !isCms) fsChk = false;
229 }
230
231// Perform historical phase 2 initialization
232//
233 if (!NoGo) NoGo = !Configure(envP);
234
235// All done
236//
237 tmp = (NoGo ? " failed." : " completed.");
238 Log.Say("------ ssi initialization", tmp);
239 return !NoGo;
240}
241
242/******************************************************************************/
243
245{
246 static char theSSI[] = {'s', 's', 'i', 0};
247 static char **myArgv = 0, *dfltArgv[] = {0, 0};
248 XrdOucEnv *xrdEnvP;
249 int myArgc = 0, NoGo;
250
251// Now find the scheduler
252//
253 if (envP && !(Sched = (XrdScheduler *)envP->GetPtr("XrdScheduler*")))
254 {Log.Emsg("Config", "Scheduler pointer is undefined!");
255 NoGo = 1;
256 } else NoGo = 0;
257
258// Find our arguments, if any
259//
260 if ((xrdEnvP = (XrdOucEnv *)envP->GetPtr("xrdEnv*"))
261 && (myArgv = (char **)xrdEnvP->GetPtr("xrdssi.argv**")))
262 myArgc = xrdEnvP->GetInt("xrdssi.argc");
263
264// Verify that we have some and substitute if not
265//
266 if (!myArgv || myArgc < 1)
267 {if (!(dfltArgv[0] = (char *)xrdEnvP->GetPtr("argv[0]")))
268 dfltArgv[0] = theSSI;
269 myArgv = dfltArgv;
270 myArgc = 1;
271 }
272
273// Establish the network interface that the caller must provide
274//
275 if (!isCms && (!envP || !(myIF = (XrdNetIF *)envP->GetPtr("XrdNetIF*"))))
276 {Log.Emsg("Finder", "Network i/f undefined; unable to self-locate.");
277 NoGo = 1;
278 }
279
280// Now configure management functions and the cms if we are not the cms
281//
282 if (!NoGo && !isCms && envP)
283 {if (ConfigObj() || ConfigCms(envP)) NoGo = 1;}
284
285// Now configure the server
286//
287 if (!NoGo && ConfigSvc(myArgv, myArgc)) NoGo = 1;
288
289// All done
290//
291 return !NoGo;
292}
293
294/******************************************************************************/
295/* C o n f i g C m s */
296/******************************************************************************/
297
298class XrdOss;
299
300int XrdSsiSfsConfig::ConfigCms(XrdOucEnv *envP)
301{
302 EPNAME("SsiSfsConfig");
303 static const int cmsOpt = XrdCms::IsTarget;
304 const char *tident = "";
305 XrdCmsClient *cmsP = 0, *(*CmsGC)(XrdSysLogger *, int, int, XrdOss *);
306 XrdSysLogger *myLogger = Log.logger();
307
308// Check if we are configuring a simple standalone server
309//
310 if (!myRole)
311 {myRole = strdup("standalone");
312 Log.Say("Config Configuring standalone server.");
313 SsiCms = new XrdSsiCms;
314 return 0;
315 }
316
317// We now must make sure only one cms client is in effect.
318//
319 if ((cmsP = (XrdCmsClient*)envP->GetPtr("XrdCmsClientT*")))
320 {if (CmsLib) Log.Say("Config warning: ignoring cmslib directive; "
321 "using existing cms instance!");
322 SsiCms = new XrdSsiCms(cmsP);
323 DEBUG("Config: Using cms clientT from environment!");
324 return 0;
325 }
326 DEBUG("Config: Allocating new cms clientT!");
327
328// If a cmslib was specified then create a plugin object and get the client.
329// Otherwise, simply get the default client. In any case configure them.
330//
331 if (!cmsP)
332 {if (CmsLib)
333 {XrdSysPlugin myLib(&Log, CmsLib, "cmslib", myVersion);
334 CmsGC = (XrdCmsClient *(*)(XrdSysLogger *, int, int, XrdOss *))
335 (myLib.getPlugin("XrdCmsGetClient"));
336 if (!CmsGC) return 1;
337 myLib.Persist();
338 cmsP = CmsGC(myLogger, cmsOpt, myPort, 0);
339 }
340 else cmsP = XrdCms::GetDefaultClient(myLogger, cmsOpt, myPort);
341 }
342
343// If we have a client object onfigure it
344//
345 if (!cmsP || !cmsP->Configure(ConfigFN, CmsParms, envP))
346 {delete cmsP;
347 Log.Emsg("Config", "Unable to create cluster object.");
348 return 1;
349 }
350
351// Create the cluster onject and return
352//
353 SsiCms = new XrdSsiCms(cmsP);
354 return 0;
355}
356
357/******************************************************************************/
358/* C o n f i g O b j */
359/******************************************************************************/
360
361int XrdSsiSfsConfig::ConfigObj()
362{
363
364// Allocate a buffer pool
365//
366 if (maxRSZ < minRSZ) maxRSZ = minRSZ;
367 BuffPool = new XrdOucBuffPool(minRSZ, maxRSZ);
368 return 0;
369}
370
371/******************************************************************************/
372/* C o n f i g S v c */
373/******************************************************************************/
374
375int XrdSsiSfsConfig::ConfigSvc(char **myArgv, int myArgc)
376{
377 XrdSsiErrInfo eInfo;
378 XrdSysPlugin *myLib;
379 XrdSsiProvider **theProvider;
380 const char *pName = (isCms ? "XrdSsiProviderLookup"
381 : "XrdSsiProviderServer");
382
383// Make sure a library was specified
384//
385 if (!SvcLib)
386 {Log.Emsg("Config", "svclib not specified; provider cannot be loaded.");
387 return 1;
388 }
389
390// Create a plugin object
391//
392 if (!(myLib = new XrdSysPlugin(&Log, SvcLib, "svclib", myVersion)))
393 return 1;
394
395// Now get the entry point of the object creator
396//
397 theProvider = (XrdSsiProvider **)(myLib->getPlugin(pName));
398 if (!theProvider) return 1;
399 Provider = *theProvider;
400
401// Persist the library
402//
403 myLib->Persist(); delete myLib;
404
405// Initialize the provider
406//
407 if (!(Provider->Init(&SsiLogger, (XrdSsiCluster *)SsiCms,
408 std::string(ConfigFN),
409 std::string(SvcParms ? SvcParms : ""),
410 myArgc, myArgv)))
411 {Log.Emsg("Config", "Provider initialization failed.");
412 return 1;
413 }
414
415// If we are the cms then we are done.
416//
417 if (isCms) return 0;
418
419// Otherwise we need to get the service object (we get only one)
420//
421 if (!(Service = Provider->GetService(eInfo, "")))
422 {const char *eText = eInfo.Get().c_str();
423 Log.Emsg("Config", "Unable to obtain server-side service object;",
424 (eText ? eText : "reason unknown."));
425 }
426 return Service == 0;
427}
428
429/******************************************************************************/
430/* C o n f i g X e q */
431/******************************************************************************/
432
433int XrdSsiSfsConfig::ConfigXeq(char *var)
434{
435
436// Now assign the appropriate global variable
437//
438 if (!strcmp("cmslib", var)) return Xlib("cmslib", &CmsLib, &CmsParms);
439 if (!strcmp("svclib", var)) return Xlib("svclib", &SvcLib, &SvcParms);
440 if (!strcmp("fspath", var)) return Xfsp();
441 if (!strcmp("loglib", var)){char *theLib=0, *theParms=0;
442 int rc=Xlib("loglib", &theLib, &theParms);
443 if (theLib) free(theLib);
444 if (theParms) free(theParms);
445 return rc;
446 }
447 if (!strcmp("opts", var)) return Xopts();
448 if (!strcmp("role", var)) return Xrole();
449 if (!strcmp("trace", var)) return Xtrace();
450
451// No match found, complain.
452//
453 Log.Say("Config warning: ignoring unknown directive '",var,"'.");
454 cFile->Echo();
455 return 0;
456}
457
458/******************************************************************************/
459/* x L i b */
460/******************************************************************************/
461
462/* Function: Xlib
463
464 Purpose: To parse the directive: xxxlib <path> [<parms>]
465
466 <path> the path of the library to be used.
467 <parms> optional parms to be passed
468
469 Output: 0 upon success or !0 upon failure.
470*/
471
472int XrdSsiSfsConfig::Xlib(const char *lName, char **lPath, char **lParm)
473{
474 char *val, parms[2048];
475
476// Get the path and parms
477//
478 if (!(val = cFile->GetWord()) || !val[0])
479 {Log.Emsg("Config", lName, "not specified"); return 1;}
480
481// Set the CmsLib pointer
482//
483 if (*lPath) free(*lPath);
484 *lPath = strdup(val);
485
486// Combine the path and parameters
487//
488 *parms = 0;
489 if (!cFile->GetRest(parms, sizeof(parms)))
490 {Log.Emsg("Config", lName, "parameters too long"); return 1;}
491
492// Record the parameters, if any
493//
494 if (*lParm) free(*lParm);
495 *lParm = (*parms ? strdup(parms) : 0);
496 return 0;
497}
498
499/******************************************************************************/
500/* x f s p */
501/******************************************************************************/
502
503/* Function: xfsp
504
505 Purpose: To parse the directive: fspath <path>
506
507 <path> the path that is a file system path.
508
509 Output: 0 upon success or !0 upon failure.
510*/
511
512int XrdSsiSfsConfig::Xfsp()
513{
514 XrdOucPList *plp;
515 char *val, pbuff[1024];
516
517// Get the path
518//
519 val = cFile->GetWord();
520 if (!val || !val[0])
521 {Log.Emsg("Config", "fspath path not specified"); return 1;}
522 strlcpy(pbuff, val, sizeof(pbuff));
523
524// Add path to configuration
525//
526 if (!(plp = FSPath.Match(pbuff)))
527 {plp = new XrdOucPList(pbuff,1);
528 FSPath.Insert(plp);
529 }
530 return 0;
531}
532
533/******************************************************************************/
534/* X o p t s */
535/******************************************************************************/
536
537
538/* Function: Xopts
539
540 Purpose: To parse directive: opts [files <n>] [requests <n>] [respwt <t>]
541 [maxrsz <sz>] [authdns] [detreqok]
542
543 authdns always supply client's resolved host name.
544 detreqok allow detached requests.
545 files the maximum number of file objects to hold in reserve.
546 maxrsz the maximum size of a request.
547 requests the maximum number of requests objects to hold in reserve.
548 respwait the number of seconds to place client in response wait.
549
550 Output: 0 upon success or 1 upon failure.
551*/
552
553int XrdSsiSfsConfig::Xopts()
554{
555 static const int noArg = 1;
556 static const int isNum = 2;
557 static const int isSz = 3;
558 static const int isTM = 4;
559 char *val, oBuff[256];
560 long long ppp, rMax = -1, rObj = -1, fAut = -1, fDet = -1, fRwt = -1;
561 int i, xtm;
562
563 struct optsopts {const char *opname; long long *oploc; int maxv; int aOpt;}
564 opopts[] =
565 {
566 {"authinfo", &fAut, 2, noArg},
567 {"detreqok", &fDet, 2, noArg},
568 {"maxrsz", &rMax, 16*1024*1024, isSz},
569 {"requests", &rObj, 64*1024, isNum},
570 {"respwt", &fRwt, 0x7fffffffLL, isTM}
571 };
572 int numopts = sizeof(opopts)/sizeof(struct optsopts);
573
574 if (!(val = cFile->GetWord()))
575 {Log.Emsg("Config", "opts option not specified"); return 1;}
576
577 while (val)
578 {for (i = 0; i < numopts; i++)
579 if (!strcmp(val, opopts[i].opname))
580 {if (opopts[i].aOpt == noArg)
581 {*opopts[i].oploc = 1;
582 break;
583 }
584 if (!(val = cFile->GetWord()))
585 {Log.Emsg("Config", "opts ", opopts[i].opname,
586 "argument not specified.");
587 return 1;
588 }
589 snprintf(oBuff,sizeof(oBuff),"%s opts value",opopts[i].opname);
590 if (opopts[i].aOpt == isSz)
591 {if (XrdOuca2x::a2sz(Log, oBuff, val, &ppp,
592 0, opopts[i].maxv)) return 1;
593 }
594 else if (opopts[i].aOpt == isTM)
595 {if (XrdOuca2x::a2tm(Log, oBuff, val, &xtm,
596 0, opopts[i].maxv)) return 1;
597 ppp = xtm;
598 }
599 else if (XrdOuca2x::a2ll(Log, oBuff, val, &ppp,
600 0, opopts[i].maxv)) return 1;
601 *opopts[i].oploc = ppp;
602 break;
603 }
604 if (i >= numopts)
605 Log.Say("Config warning: ignoring invalid opts option '",val,"'.");
606 val = cFile->GetWord();
607 }
608
609// Set the values that were specified
610//
611 if (fAut >= 0) XrdSsiFileSess::SetAuthDNS();
612 if (fAut >= 0) detReqOK = true;
613 if (rMax >= 0) maxRSZ = static_cast<int>(rMax);
614 if (rObj >= 0) XrdSsiFileReq::SetMax(static_cast<int>(rObj));
615 if (fRwt >= 0) respWT = fRwt;
616
617 return 0;
618}
619
620/******************************************************************************/
621/* x r o l e */
622/******************************************************************************/
623
624/* Function: Xrole
625 Purpose: Parse: role { {[meta] | [proxy]} manager
626 | proxy | [proxy] server
627 | [proxy] supervisor
628 } [if ...]
629
630 manager xrootd: act as a manager (redirecting server). Prefixes:
631 meta - connect only to manager meta's
632 proxy - ignored
633 cmsd: accept server subscribes and redirectors. Prefix
634 modifiers do the following:
635 meta - No other managers apply
636 proxy - manage a cluster of proxy servers
637
638 proxy xrootd: act as a server but supply data from another
639 server. No local cmsd is present or required.
640 cmsd: Generates an error as this makes no sense.
641
642 server xrootd: act as a server (supply local data). Prefix
643 modifications do the following:
644 proxy - server is part of a cluster. A local
645 cmsd is required.
646 cmsd: subscribe to a manager, possibly as a proxy.
647
648 supervisor xrootd: equivalent to manager.
649 cmsd: equivalent to manager but also subscribe to a
650 manager. When proxy is specified, subscribe as
651 a proxy and only accept proxy servers.
652
653
654 if Apply the manager directive if "if" is true. See
655 XrdOucUtils:doIf() for "if" syntax.
656
657 Output: 0 upon success or !0 upon failure.
658*/
659
660int XrdSsiSfsConfig::Xrole()
661{
662 XrdCmsRole::RoleID roleID;
663 char *val, *Tok1, *Tok2;
664 int rc;
665
666// Get the first token
667//
668 if (!(val = cFile->GetWord()) || !strcmp(val, "if"))
669 {Log.Emsg("Config", "role not specified"); return 1;}
670 Tok1 = strdup(val);
671
672// Get second token which might be an "if"
673//
674 if ((val = cFile->GetWord()) && strcmp(val, "if"))
675 {Tok2 = strdup(val);
676 val = cFile->GetWord();
677 } else Tok2 = 0;
678
679// Process the if at this point
680//
681 if (val && !strcmp("if", val))
682 if ((rc = XrdOucUtils::doIf(&Log,*cFile,"role directive",
683 myHost,myInsName,myProg)) <= 0)
684 {free(Tok1); if (Tok2) free(Tok2);
685 if (!rc) cFile->noEcho();
686 return (rc < 0);
687 }
688
689// Convert the role names to a role ID, if possible
690//
691 roleID = XrdCmsRole::Convert(Tok1, Tok2);
692
693// Validate the role
694//
695 rc = 0;
696 if (roleID == XrdCmsRole::noRole)
697 {Log.Emsg("Config", "invalid role -", Tok1, Tok2); rc = 1;}
698
699// Release storage and return if an error occurred
700//
701 free(Tok1);
702 if (Tok2) free(Tok2);
703 if (rc) return rc;
704
705// Fill out information
706//
707 if (myRole) free(myRole);
708 myRole = strdup(XrdCmsRole::Name(roleID));
709 isServer = (roleID == XrdCmsRole::Server);
710 return 0;
711}
712
713/******************************************************************************/
714/* x t r a c e */
715/******************************************************************************/
716
717/* Function: Xtrace
718
719 Purpose: To parse the directive: trace <events>
720
721 <events> the blank separated list of events to trace. Trace
722 directives are cummalative.
723
724 Output: 0 upon success or !0 upon failure.
725*/
726
727int XrdSsiSfsConfig::Xtrace()
728{
729 static struct traceopts {const char *opname; int opval;} tropts[] =
730 {
731 {"all", TRACESSI_ALL},
732 {"debug", TRACESSI_Debug}
733 };
734 int i, neg, trval = 0, numopts = sizeof(tropts)/sizeof(struct traceopts);
735 char *val;
736
737 if (!(val = cFile->GetWord()))
738 {Log.Emsg("Config", "trace option not specified"); return 1;}
739 while (val)
740 {if (!strcmp(val, "off")) trval = 0;
741 else {if ((neg = (val[0] == '-' && val[1]))) val++;
742 for (i = 0; i < numopts; i++)
743 {if (!strcmp(val, tropts[i].opname))
744 {if (neg) trval &= ~tropts[i].opval;
745 else trval |= tropts[i].opval;
746 break;
747 }
748 }
749 if (i >= numopts)
750 Log.Say("Config warning: ignoring invalid trace option '",val,"'.");
751 }
752 val = cFile->GetWord();
753 }
754 Trace.What = trval;
755
756// All done
757//
758 return 0;
759}
XrdSysLogger myLogger
Definition XrdAccTest.cc:65
#define tident
#define DEBUG(x)
#define EPNAME(x)
static XrdVERSIONINFODEF(compiledVer, XrdHttpProtocolTest, XrdVNUMBER, XrdVERSION)
#define open
Definition XrdPosix.hh:76
#define TRACESSI_Debug
#define TRACESSI_ALL
size_t strlcpy(char *dst, const char *src, size_t sz)
virtual int Configure(const char *cfn, char *Parms, XrdOucEnv *EnvInfo)=0
static const char * Name(RoleID rid)
Definition XrdCmsRole.hh:63
static RoleID Convert(const char *Tok1, const char *Tok2)
Definition XrdCmsRole.hh:47
long GetInt(const char *varname)
Definition XrdOucEnv.cc:235
void * GetPtr(const char *varname)
Definition XrdOucEnv.cc:263
XrdOucPList * Match(const char *pathname)
void Insert(XrdOucPList *newitem)
int Attach(int FileDescriptor, int bsz=2047)
void Close(int hold=0)
static void Capture(const char **cVec=0, bool linefeed=true)
static const char * InstName(int TranOpt=0)
static int doIf(XrdSysError *eDest, XrdOucStream &Config, const char *what, const char *hname, const char *nname, const char *pname)
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
static int a2ll(XrdSysError &, const char *emsg, const char *item, long long *val, long long minv=-1, long long maxv=-1)
Definition XrdOuca2x.cc:70
static int a2tm(XrdSysError &, const char *emsg, const char *item, int *val, int minv=-1, int maxv=-1)
Definition XrdOuca2x.cc:288
const std::string & Get(int &eNum) const
static void SetMax(int mVal)
static void SetAuthDNS()
virtual bool Init(XrdSsiLogger *logP, XrdSsiCluster *clsP, std::string cfgFn, std::string parms, int argc, char **argv)=0
virtual XrdSsiService * GetService(XrdSsiErrInfo &eInfo, const std::string &contact, int oHold=256)
const char * myHost
XrdSsiSfsConfig(bool iscms=false)
XrdVersionInfo * myVersion
const char * myInsName
const char * myProg
bool Configure(const char *cFN, XrdOucEnv *envP)
XrdSsiCluster * SsiCms
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)
void * getPlugin(const char *pname, int optional=0)
void * Persist()
XrdCmsClient * GetDefaultClient(XrdSysLogger *Logger, int opMode, int myPort)
@ IsTarget
The role is server and will be a redirection target.
XrdOucEnv * envP
Definition XrdPss.cc:109
XrdSfsFileSystem * theFS
Definition XrdSsiFile.cc:54
bool fsChk
Definition XrdSsiFile.cc:56
XrdSsiCms * SsiCms
XrdSysTrace Trace
Definition XrdSsiSfs.cc:107
XrdNetIF * myIF
XrdSsiProvider * Provider
XrdOucBuffPool * BuffPool
XrdSsiService * Service
XrdScheduler * Sched
XrdSysError Log
XrdOucPListAnchor FSPath
Definition XrdSsiFile.cc:55
XrdSsiLogger SsiLogger