XRootD
Loading...
Searching...
No Matches
XrdXrootdConfig.cc File Reference
#include <unistd.h>
#include <cctype>
#include <fcntl.h>
#include <string>
#include <cstring>
#include <cstdio>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <vector>
#include "XrdVersion.hh"
#include "XProtocol/XProtocol.hh"
#include "XrdSfs/XrdSfsFlags.hh"
#include "XrdSfs/XrdSfsInterface.hh"
#include "XrdNet/XrdNetOpts.hh"
#include "XrdNet/XrdNetPMarkCfg.hh"
#include "XrdNet/XrdNetSocket.hh"
#include "XrdOuc/XrdOuca2x.hh"
#include "XrdOuc/XrdOucEnv.hh"
#include "XrdOuc/XrdOucProg.hh"
#include "XrdOuc/XrdOucReqID.hh"
#include "XrdOuc/XrdOucString.hh"
#include "XrdOuc/XrdOucStream.hh"
#include "XrdOuc/XrdOucUtils.hh"
#include "XrdSec/XrdSecLoadSecurity.hh"
#include "XrdSys/XrdSysError.hh"
#include "XrdSys/XrdSysHeaders.hh"
#include "XrdSys/XrdSysLogger.hh"
#include "XrdTls/XrdTlsContext.hh"
#include "XrdXrootd/XrdXrootdAdmin.hh"
#include "XrdXrootd/XrdXrootdCallBack.hh"
#include "XrdXrootd/XrdXrootdFile.hh"
#include "XrdXrootd/XrdXrootdFileLock.hh"
#include "XrdXrootd/XrdXrootdFileLock1.hh"
#include "XrdXrootd/XrdXrootdJob.hh"
#include "XrdXrootd/XrdXrootdPrepare.hh"
#include "XrdXrootd/XrdXrootdProtocol.hh"
#include "XrdXrootd/XrdXrootdStats.hh"
#include "XrdXrootd/XrdXrootdTrace.hh"
#include "XrdXrootd/XrdXrootdTransit.hh"
#include "XrdXrootd/XrdXrootdXPath.hh"
#include "Xrd/XrdBuffer.hh"
#include "Xrd/XrdInet.hh"
#include "Xrd/XrdLink.hh"
+ Include dependency graph for XrdXrootdConfig.cc:

Go to the source code of this file.

Namespaces

namespace  XrdXrootd
 

Macros

#define TS_Xeq(x, m)   (!strcmp(x,var)) GoNo = m(Config)
 
#define TS_Zeq(x, m)   (!strcmp(x,var)) GoNo = m(&eDest, Config)
 

Functions

XrdSfsFileSystemXrdSfsGetDefaultFileSystem (XrdSfsFileSystem *nativeFS, XrdSysLogger *Logger, const char *configFn, XrdOucEnv *EnvInfo)
 
XrdSfsFileSystemXrdXrootdloadFileSystem (XrdSysError *, XrdSfsFileSystem *, const char *, const char *, XrdOucEnv *)
 

Variables

char * XrdXrootd::bifResp [2] = {0,0}
 
int XrdXrootd::bifRLen [2] = {0,0}
 
XrdXrootdStatsXrdXrootd::SI
 
XrdOucStringXrdXrootdCF
 
const char * XrdXrootdInstance
 
int XrdXrootdPort
 
XrdXrootdPrepareXrdXrootdPrepQ
 
XrdSysTrace XrdXrootdTrace
 

Macro Definition Documentation

◆ TS_Xeq

#define TS_Xeq (   x,
 
)    (!strcmp(x,var)) GoNo = m(Config)

Definition at line 535 of file XrdXrootdConfig.cc.

◆ TS_Zeq

#define TS_Zeq (   x,
 
)    (!strcmp(x,var)) GoNo = m(&eDest, Config)

Definition at line 536 of file XrdXrootdConfig.cc.

Function Documentation

◆ XrdSfsGetDefaultFileSystem()

XrdSfsFileSystem * XrdSfsGetDefaultFileSystem ( XrdSfsFileSystem nativeFS,
XrdSysLogger Logger,
const char *  configFn,
XrdOucEnv EnvInfo 
)

Definition at line 49 of file XrdOfsFS.cc.

53{
55 extern XrdSysTrace OfsTrace;
56 static XrdSysMutex XrdDefaultOfsMutex;
57 static XrdOfs XrdDefaultOfsFS;
58
59// No need to herald this as it's now the default filesystem
60//
61 OfsEroute.SetPrefix("ofs_");
62 OfsEroute.logger(lp);
64
65// Initialize the subsystems
66//
67 {
68 XrdSysMutexHelper sentry(XrdDefaultOfsMutex);
69 if (XrdOfsFS == NULL) {
70 XrdOfsFS = &XrdDefaultOfsFS;
71 XrdOfsFS->ConfigFN = (configfn && *configfn ? strdup(configfn) : 0);
72 if ( XrdOfsFS->Configure(OfsEroute, EnvInfo) ) return 0;
73 }
74 }
75
76// All done, we can return the callout vector to these routines.
77//
78 return XrdOfsFS;
79}
XrdOfs * XrdOfsFS
Definition XrdOfsFS.cc:47
XrdSysError OfsEroute(0)
XrdSysTrace OfsTrace("ofs")
char * ConfigFN
Definition XrdOfs.hh:420
virtual int Configure(XrdSysError &)
const char * SetPrefix(const char *prefix)
XrdSysLogger * logger(XrdSysLogger *lp=0)
void SetLogger(XrdSysLogger *logp)

References XrdOfs::ConfigFN, XrdOfs::Configure(), XrdSysError::logger(), OfsEroute, OfsTrace, XrdSysTrace::SetLogger(), XrdSysError::SetPrefix(), and XrdOfsFS.

Referenced by LoadFS().

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

◆ XrdXrootdloadFileSystem()

XrdSfsFileSystem * XrdXrootdloadFileSystem ( XrdSysError eDest,
XrdSfsFileSystem prevFS,
const char *  fslib,
const char *  cfn,
XrdOucEnv envP 
)

Definition at line 43 of file XrdXrootdLoadLib.cc.

47{
48 static XrdVERSIONINFODEF(myVersion, XrdOfsLoader, XrdVNUMBER, XrdVERSION);
49 XrdOucPinLoader ofsLib(eDest, &myVersion, "fslib", fslib);
52 XrdSfsFileSystem *FS = 0;
53
54// Record the library path in the environment
55//
56 if (!prevFS) XrdOucEnv::Export("XRDOFSLIB", fslib);
57
58// Get the file system object creator and the object (we preferntially try
59// to find the version 2 of the plugin).
60//
61 if ((ep2 = (XrdSfsFileSystem2_t)ofsLib.Resolve("?XrdSfsGetFileSystem2")))
62 { FS = (*ep2)(prevFS, eDest->logger(), cfn, envP);
63 } else {
64 if ((ep = (XrdSfsFileSystem_t )ofsLib.Resolve("XrdSfsGetFileSystem")))
65 FS = (*ep) (prevFS, eDest->logger(), cfn);
66 }
67
68// Issue message if we could not load it
69//
70 if (!FS) eDest->Emsg("Config", "Unable to load file system via", fslib);
71
72// All done
73//
74 return FS;
75}
static XrdSysError eDest(0,"crypto_")
static XrdVERSIONINFODEF(compiledVer, XrdHttpProtocolTest, XrdVNUMBER, XrdVERSION)
XrdSfsFileSystem *(* XrdSfsFileSystem2_t)(XrdSfsFileSystem *nativeFS, XrdSysLogger *Logger, const char *configFn, XrdOucEnv *envP)
XrdSfsFileSystem *(* XrdSfsFileSystem_t)(XrdSfsFileSystem *nativeFS, XrdSysLogger *Logger, const char *configFn)
static int Export(const char *Var, const char *Val)
Definition XrdOucEnv.cc:170
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
XrdOucEnv * envP
Definition XrdPss.cc:108

References eDest, XrdSysError::Emsg(), XrdOucEnv::Export(), XrdSysError::logger(), XrdOucPinLoader::Resolve(), and XrdVERSIONINFODEF().

+ Here is the call graph for this function:

Variable Documentation

◆ XrdXrootdCF

XrdOucString* XrdXrootdCF

Definition at line 112 of file XrdXrootdConfig.cc.

Referenced by XrdXrootdProtocol::Configure().

◆ XrdXrootdInstance

const char* XrdXrootdInstance

Definition at line 118 of file XrdXrootdConfig.cc.

Referenced by XrdXrootdProtocol::Configure().

◆ XrdXrootdPort

int XrdXrootdPort

Definition at line 120 of file XrdXrootdConfig.cc.

Referenced by XrdXrootdProtocol::Configure().

◆ XrdXrootdPrepQ

XrdXrootdPrepare* XrdXrootdPrepQ

Definition at line 116 of file XrdXrootdConfig.cc.

Referenced by XrdXrootdProtocol::Configure().

◆ XrdXrootdTrace

XrdSysTrace XrdXrootdTrace
extern

Definition at line 96 of file XrdFrmAdminMain.cc.