Loading...
Searching...
No Matches
XrdOucN2NLoader Class Reference

`#include <XrdOucN2NLoader.hh>`

Collaboration diagram for XrdOucN2NLoader:

## Public Member Functions

| XrdOucN2NLoader (XrdOucgetName2NameArgs)
| ~XrdOucN2NLoader ()
XrdOucName2Name * | Load (const char *libName, XrdVersionInfo &urVer, XrdOucEnv *envP=0)

## Detailed Description

Definition at line 38 of file XrdOucN2NLoader.hh.

## Constructor & Destructor Documentation

## XrdOucN2NLoader()

XrdOucN2NLoader::XrdOucN2NLoader | ( | XrdOucgetName2NameArgs |  | ) |

inline

Definition at line 45 of file XrdOucN2NLoader.hh.

: eRoute(eDest), cFN(confg),
libParms((parms ? parms : "")),
lclRoot(lroot), rmtRoot(rroot) {}
eDest
static XrdSysError eDest(0,"crypto_")

References eDest, and XrdOucgetName2NameArgs.

## ~XrdOucN2NLoader()

XrdOucN2NLoader::~XrdOucN2NLoader | ( |  | ) |

inline

Definition at line 49 of file XrdOucN2NLoader.hh.

{}

## Member Function Documentation

## Load()

XrdOucName2Name * XrdOucN2NLoader::Load | ( | const char * | libName,
|  | XrdVersionInfo & | urVer,
|  | XrdOucEnv * | envP = 0 )

Definition at line 47 of file XrdOucN2NLoader.cc.

{
extern XrdOucName2NameVec *XrdOucN2NVec_P;
XrdOucName2Name *(*ep)(XrdOucgetName2NameArgs);
static XrdVERSIONINFODEF (myVer, XrdN2N, XrdVNUMBER, XrdVERSION);
XrdOucName2Name *n2nP;
XrdOucName2NameVec *n2nV;
// Use the default mapping if there is no library. Verify version numbers
// as we are normally in a different shared library.
//
if (!libName)
{if (!XrdSysPlugin::VerCmp(urVer, myVer)) return 0;
if (lclRoot)
{struct stat Stat;
if (stat(lclRoot, &Stat))
{eRoute->Emsg("N2N", errno, "use localroot", lclRoot);
return 0;
}
if (!S_ISDIR(Stat.st_mode))
{eRoute->Emsg("N2N", ENOTDIR, "use localroot", lclRoot);
return 0;
}
XrdOucEnv::Export("XRDLCLROOT", lclRoot);
}
if (rmtRoot) XrdOucEnv::Export("XRDRMTROOT", rmtRoot);
n2nP = XrdOucgetName2Name(eRoute, cFN, libParms, lclRoot, rmtRoot);
if (XrdOucN2NVec_P && envP)
envP->PutPtr("XrdOucName2NameVec*", XrdOucN2NVec_P);
return n2nP;
} else {
XrdOucEnv::Export("XRDN2NLIB", libName);
if (libParms) XrdOucEnv::Export("XRDN2NPARMS", libParms);
}
// Get the entry point of the object creator
//
XrdOucPinLoader myLib(eRoute, &urVer, "namelib", libName);
ep = (XrdOucName2Name *(*)(XrdOucgetName2NameArgs))(myLib.Resolve("XrdOucgetName2Name"));
if (!ep) return 0;
// Get the Object now
//
if ((n2nP = ep(eRoute, cFN, libParms, lclRoot, rmtRoot)) && envP)
{n2nV = (XrdOucName2NameVec *)myLib.Resolve("?Name2NameVec");
if (n2nV) envP->PutPtr("XrdOucName2NameVec*", n2nV);
}
return n2nP;
}
Stat
struct stat Stat
Definition XrdCks.cc:49
XrdVERSIONINFODEF
static XrdVERSIONINFODEF(compiledVer, XrdHttpProtocolTest, XrdVNUMBER, XrdVERSION)
XrdOucgetName2Name
XrdOucName2Name * XrdOucgetName2Name(XrdOucgetName2NameArgs)
Definition XrdOucN2No2p.cc:197
XrdOucN2NVec_P
XrdOucName2NameVec * XrdOucN2NVec_P
Definition XrdOucName2Name.cc:44
XrdOucgetName2NameArgs
#define XrdOucgetName2NameArgs
Definition XrdOucName2Name.hh:213
stat
#define stat(a, b)
Definition XrdPosix.hh:101
XrdOucEnv::Export
static int Export(const char *Var, const char *Val)
Definition XrdOucEnv.cc:170
XrdOucEnv::PutPtr
void PutPtr(const char *varname, void *value)
Definition XrdOucEnv.cc:298
XrdSysPlugin::VerCmp
static bool VerCmp(XrdVersionInfo &vInf1, XrdVersionInfo &vInf2, bool noMsg=false)
Definition XrdSysPlugin.cc:472
XrdProxy::envP
XrdOucEnv * envP
Definition XrdPss.cc:109

References XrdOucEnv::Export(), XrdOucEnv::PutPtr(), XrdOucPinLoader::Resolve(), Stat, stat, XrdSysPlugin::VerCmp(), XrdOucgetName2Name(), XrdOucgetName2NameArgs, XrdOucN2NVec_P, and XrdVERSIONINFODEF().

Referenced by XrdOssSys::ConfigN2N(), and XrdCephOss::Configure().

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

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

- XrdOucN2NLoader.hh
- XrdOucN2NLoader.cc