Loading...
Searching...
No Matches
XrdOucPsx.hh
Go to the documentation of this file.
#ifndef _XRDOUCPSX_H
#define _XRDOUCPSX_H
/******************************************************************************/
/* */
/* X r d O u c P s x . h h */
/* */
/* (c) 2017 by the Board of Trustees of the Leland Stanford, Jr., University */
/* All Rights Reserved */
/* Produced by Andrew Hanushevsky for Stanford University under contract */
/* DE-AC02-76-SFO0515 with the Department of Energy */
/* */
/* This file is part of the XRootD software suite. */
/* */
/* XRootD is free software: you can redistribute it and/or modify it under */
/* the terms of the GNU Lesser General Public License as published by the */
/* Free Software Foundation, either version 3 of the License, or (at your */
/* option) any later version. */
/* */
/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
/* License for more details. */
/* */
/* You should have received a copy of the GNU Lesser General Public License */
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
/* */
/* The copyright holder's institutional names and contributor's names may not */
/* be used to endorse or promote products derived from this software without */
/* specific prior written permission of the institution or contributor. */
/******************************************************************************/
#include <cstdlib>
#include <cstring>
#include <sys/types.h>
#include "XrdOuc/XrdOucCacheCM.hh"
class XrdOucEnv;
class XrdOucName2Name;
class XrdSysError;
class XrdOucStream;
class XrdOucTList;
struct XrdVersionInfo;
class XrdOucPsx
{
public:
const
char *CCMInfo(const char *&path) {path = mPath; return mParm;}
bool ClientConfig(const char *pfx, bool hush=false);
bool ConfigSetup(XrdSysError &eDest, bool hush=false);
bool hasCache() {return mCache != 0 || cPath != 0;}
bool ParseCache(XrdSysError *Eroute, XrdOucStream &Config);
bool ParseCio(XrdSysError *Eroute, XrdOucStream &Config);
bool ParseCLib(XrdSysError *Eroute, XrdOucStream &Config);
bool ParseMLib(XrdSysError *Eroute, XrdOucStream &Config);
bool ParseINet(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);
char *configFN; // -> Pointer to the config file name
XrdSysLogger *theLogger;
XrdOucEnv *theEnv;
XrdOucName2Name *theN2N; // -> File mapper object
XrdOucCache *theCache; // -> Cache object
XrdOucCacheCMInit_t initCCM; // -> Cache context manager initializer
char *mCache; // -> memory cache parameters
XrdOucTList *setFirst;
XrdOucTList *setLast;
int maxRHCB;
int traceLvl;
int debugLvl;
int cioWait;
int cioTries;
bool useV4;
bool xLfn2Pfn;
char xPfn2Lfn; // See xP2Lxxx definitions below
bool xNameLib;
static const int xP2Loff = 0;
static const int xP2Lon = 1;
static const int xP2Lsrc = 2;
static const int xP2Lsgi = 3;
XrdOucPsx(XrdVersionInfo *vInfo, const char *cfn,
XrdSysLogger *lp=0, XrdOucEnv *vp=0)
: configFN(strdup(cfn)), theLogger(lp), theEnv(vp),
theN2N(0), theCache(0), initCCM(0),
mCache(0), setFirst(0), setLast(0), maxRHCB(0),
traceLvl(0), debugLvl(0), cioWait(0), cioTries(0),
useV4(false), xLfn2Pfn(false), xPfn2Lfn(xP2Loff),
xNameLib(false),
LocalRoot(0), RemotRoot(0), N2NLib(0), N2NParms(0),
cPath(0), cParm(0), mPath(0), mParm(0),
myVersion(vInfo) {}
~XrdOucPsx();
private:
char *LocalRoot;// -> Local n2n root, if any
char *RemotRoot;// -> Remote n2n root, if any
char *N2NLib; // -> Name2Name Library Path
char *N2NParms; // -> Name2Name Object Parameters
char *cPath; // -> Cache path
char *cParm; // -> Cache parameters
char *mPath; // -> CCM path
char *mParm; // -> CCM parameters
XrdVersionInfo *myVersion;// -> Compilation version
bool ConfigCache(XrdSysError &eDest);
bool ConfigN2N(XrdSysError &eDest);
bool LoadCCM(XrdSysError &eDest);
bool Parse(char*, XrdOucStream&, XrdSysError&);
char *ParseCache(XrdSysError *Eroute, XrdOucStream &Config, char *pBuff);
void ParseSet(const char *kword, int kval);
void WarnConfig(XrdSysError &eDest, XrdOucTList *tList, bool fatal);
void WarnPlugin(XrdSysError &eDest, XrdOucTList *tList,
const char *txt1, const char *txt2);
};
#endif
eDest
static XrdSysError eDest(0,"crypto_")
XrdOucCacheCM.hh
XrdOucCacheCMInit_t
bool(* XrdOucCacheCMInit_t)(XrdPosixCache &Cache, XrdSysLogger *Logger, const char *Config, const char *Parms, XrdOucEnv *envP)
Definition XrdOucCacheCM.hh:67
XrdOucCache
Definition XrdOucCache.hh:495
XrdOucEnv
Definition XrdOucEnv.hh:42
XrdOucName2Name
Definition XrdOucName2Name.hh:49
XrdOucPsx::xP2Lon
static const int xP2Lon
Definition XrdOucPsx.hh:98
XrdOucPsx::theEnv
XrdOucEnv * theEnv
Definition XrdOucPsx.hh:80
XrdOucPsx::useV4
bool useV4
Definition XrdOucPsx.hh:92
XrdOucPsx::maxRHCB
int maxRHCB
Definition XrdOucPsx.hh:87
XrdOucPsx::ParseINet
bool ParseINet(XrdSysError *Eroute, XrdOucStream &Config)
Definition XrdOucPsx.cc:611
XrdOucPsx::xP2Lsgi
static const int xP2Lsgi
Definition XrdOucPsx.hh:100
XrdOucPsx::ClientConfig
bool ClientConfig(const char *pfx, bool hush=false)
Definition XrdOucPsx.cc:100
XrdOucPsx::configFN
char * configFN
Definition XrdOucPsx.hh:78
XrdOucPsx::ParseCio
bool ParseCio(XrdSysError *Eroute, XrdOucStream &Config)
Definition XrdOucPsx.cc:481
XrdOucPsx::mCache
char * mCache
Definition XrdOucPsx.hh:84
XrdOucPsx::traceLvl
int traceLvl
Definition XrdOucPsx.hh:88
XrdOucPsx::cioTries
int cioTries
Definition XrdOucPsx.hh:91
XrdOucPsx::SetRoot
void SetRoot(const char *lroot, const char *oroot=0)
Definition XrdOucPsx.cc:827
XrdOucPsx::ParseMLib
bool ParseMLib(XrdSysError *Eroute, XrdOucStream &Config)
Definition XrdOucPsx.cc:571
XrdOucPsx::hasCache
bool hasCache()
Definition XrdOucPsx.hh:58
XrdOucPsx::xPfn2Lfn
char xPfn2Lfn
Definition XrdOucPsx.hh:94
XrdOucPsx::theCache
XrdOucCache * theCache
Definition XrdOucPsx.hh:82
XrdOucPsx::cioWait
int cioWait
Definition XrdOucPsx.hh:90
XrdOucPsx::setFirst
XrdOucTList * setFirst
Definition XrdOucPsx.hh:85
XrdOucPsx::xNameLib
bool xNameLib
Definition XrdOucPsx.hh:95
XrdOucPsx::xP2Lsrc
static const int xP2Lsrc
Definition XrdOucPsx.hh:99
XrdOucPsx::debugLvl
int debugLvl
Definition XrdOucPsx.hh:89
XrdOucPsx::xLfn2Pfn
bool xLfn2Pfn
Definition XrdOucPsx.hh:93
XrdOucPsx::ParseCache
bool ParseCache(XrdSysError *Eroute, XrdOucStream &Config)
Definition XrdOucPsx.cc:330
XrdOucPsx::theN2N
XrdOucName2Name * theN2N
Definition XrdOucPsx.hh:81
XrdOucPsx::initCCM
XrdOucCacheCMInit_t initCCM
Definition XrdOucPsx.hh:83
XrdOucPsx::CCMInfo
const char * CCMInfo(const char *&path)
Definition XrdOucPsx.hh:52
XrdOucPsx::xP2Loff
static const int xP2Loff
Definition XrdOucPsx.hh:97
XrdOucPsx::setLast
XrdOucTList * setLast
Definition XrdOucPsx.hh:86
XrdOucPsx::ParseCLib
bool ParseCLib(XrdSysError *Eroute, XrdOucStream &Config)
Definition XrdOucPsx.cc:525
XrdOucPsx::XrdOucPsx
XrdOucPsx(XrdVersionInfo *vInfo, const char *cfn, XrdSysLogger *lp=0, XrdOucEnv *vp=0)
Definition XrdOucPsx.hh:102
XrdOucPsx::ConfigSetup
bool ConfigSetup(XrdSysError &eDest, bool hush=false)
Definition XrdOucPsx.cc:217
XrdOucPsx::theLogger
XrdSysLogger * theLogger
Definition XrdOucPsx.hh:79
XrdOucPsx::ParseNLib
bool ParseNLib(XrdSysError *Eroute, XrdOucStream &Config)
Definition XrdOucPsx.cc:646
XrdOucPsx::~XrdOucPsx
~XrdOucPsx()
Definition XrdOucPsx.cc:78
XrdOucPsx::ParseTrace
bool ParseTrace(XrdSysError *Eroute, XrdOucStream &Config)
Definition XrdOucPsx.cc:791
XrdOucPsx::ParseSet
bool ParseSet(XrdSysError *Eroute, XrdOucStream &Config)
Definition XrdOucPsx.cc:702
XrdOucStream
Definition XrdOucStream.hh:47
XrdOucTList
Definition XrdOucTList.hh:42
XrdSysError
Definition XrdSysError.hh:90
XrdSysLogger
Definition XrdSysLogger.hh:53