xrootd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
XrdCmsUtils Class Reference

#include <XrdCmsUtils.hh>

Public Member Functions

 XrdCmsUtils ()
 
 ~XrdCmsUtils ()
 

Static Public Member Functions

static XrdCmsPerfMonloadPerfMon (XrdSysError *eDest, const char *libPath, XrdVersionInfo &urVer)
 Load the performance monitor plugin.
 
static bool ParseMan (XrdSysError *eDest, XrdOucTList **oldMans, char *hSpec, char *hPort, int *sPort=0, bool hush=false)
 
static char * ParseManPort (XrdSysError *eDest, XrdOucStream &CFile, char *hSpec)
 
static const char * SiteName (int snum)
 

Static Private Member Functions

static void Display (XrdSysError *eDest, const char *hSpec, const char *hName, bool isBad)
 
static XrdOucTListSInsert (XrdOucTList *oldP, XrdOucTList *newP)
 

Constructor & Destructor Documentation

◆ XrdCmsUtils()

XrdCmsUtils::XrdCmsUtils ( )
inline

◆ ~XrdCmsUtils()

XrdCmsUtils::~XrdCmsUtils ( )

Member Function Documentation

◆ Display()

static void XrdCmsUtils::Display ( XrdSysError eDest,
const char *  hSpec,
const char *  hName,
bool  isBad 
)
staticprivate

◆ loadPerfMon()

static XrdCmsPerfMon * XrdCmsUtils::loadPerfMon ( XrdSysError eDest,
const char *  libPath,
XrdVersionInfo &  urVer 
)
static

Load the performance monitor plugin.

Parameters
eDestPointer to the error message object to route messages.
libPathA pointer to the shared library path.
urVerReference to the caller's version number.
Returns
Pointer to the performance monitor object or nil upon failure.

◆ ParseMan()

static bool XrdCmsUtils::ParseMan ( XrdSysError eDest,
XrdOucTList **  oldMans,
char *  hSpec,
char *  hPort,
int *  sPort = 0,
bool  hush = false 
)
static

Obtain and merge a new manager list with an existing list.

Parameters
eDestPointer to the error message object to route messages.
oldMansA pointer to the existing list of managers, if any. If oldMans is nil, then the hSpec/hPort/sPort is processed but no list is returned.
hSpecthe host specification suitable for XrdNetAddr.Set(). The hSpec may end with a '+' indicating that all addresses assigned to hSpec be considered for inclusion.
hPortthe port specification which can be a text number or a service name (e.g. xroot).
sPortIf not nil, the *sPort will be set to the numeric hPort if the IP address in one of the entries matches the host address. Otherwise, the value is unchanged.
hushWhen true does not print the dns name to host mappings.
Returns
Success: True and if oldMans is supplied, the additional entries that do not duplicate existing entries are added to the front. Note: *oldMans->val is the port number. *oldMans->text is the host name. The list of objects belongs to the caller. Failure: False. Any existing list is not modified. However, sPort may be updated, if correct, even when false is returned.

◆ ParseManPort()

static char * XrdCmsUtils::ParseManPort ( XrdSysError eDest,
XrdOucStream CFile,
char *  hSpec 
)
static

Obtain the port for a manager specification

Parameters
eDestPointer to the error message object to route messages.
CFileThe configuration file stream.
hSpecThe initial manager specification which may or may not have the port number in it.
Returns
Success: Pointer to a copy of the port specification. The caller is responsible for freeing it using free(). Failure: A nil pointer. An error message has already been issued.

◆ SInsert()

static XrdOucTList * XrdCmsUtils::SInsert ( XrdOucTList oldP,
XrdOucTList newP 
)
staticprivate

◆ SiteName()

static const char * XrdCmsUtils::SiteName ( int  snum)
static

Translate site number to site name.

Parameters
snumThe site number.
Returns
Pointer to the corresponding site name (anonymous if none).

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