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

#include <XrdNetRegistry.hh>

Public Member Functions

 XrdNetRegistry ()
 
 ~XrdNetRegistry ()
 

Static Public Member Functions

static const char * GetAddrs (const std::string &hSpec, std::vector< XrdNetAddr > &aVec, int *ordn=0, XrdNetUtils::AddrOpts opts=XrdNetUtils::allIPMap, int pNum=XrdNetUtils::PortInSpec)
 
static bool Register (const char *hName, const char *hList[], int hLNum, std::string *eText=0, bool rotate=false)
 
static bool Register (const char *hName, const char *hList, std::string *eText=0, bool rotate=false)
 

Static Public Attributes

static const char pfx = '%'
 Registry names must start with this character.
 

Static Private Member Functions

static bool Resolve (const char *hList, std::string *eText=0)
 
static bool SetAlias (const char *hAlias, const char *hName, std::string *eText=0)
 

Constructor & Destructor Documentation

◆ XrdNetRegistry()

XrdNetRegistry::XrdNetRegistry ( )
inline

◆ ~XrdNetRegistry()

XrdNetRegistry::~XrdNetRegistry ( )
inline

Member Function Documentation

◆ GetAddrs()

static const char * XrdNetRegistry::GetAddrs ( const std::string &  hSpec,
std::vector< XrdNetAddr > &  aVec,
int *  ordn = 0,
XrdNetUtils::AddrOpts  opts = XrdNetUtils::allIPMap,
int  pNum = XrdNetUtils::PortInSpec 
)
static

Return addresses associated with a registered name.

Parameters
hSpecReference to address specification & must start with "pfx".
aVecReference to the vector to contain addresses.
ordnPointer to where the partition ordinal is to be stored.
optsOptions on what to return (see XrdNetUtils).
pNumPort number argument (see XrdNetUtils), ignored for now.
Returns
Success: 0 is returned. When ordn is not nil, the number of IPv4 entries (for order46) or IPv6 (for order64) entries that appear in the front of the vector. If ordering is not specified, the value is set to the size of the vector. Failure: the error message text describing the error and aVec is cleared (i.e. has no elements).

◆ Register() [1/2]

static bool XrdNetRegistry::Register ( const char *  hName,
const char *  hList,
std::string *  eText = 0,
bool  rotate = false 
)
static

Register a pseuo-hostname to be associated with a string of hosts.

Parameters
hNameThe pseudo-hostname which must start with 'pfx'.
hListA string of comma separated "host:port" entries to register. If the name starts with 'pfx' then it assumed to be a single name where hName is to become its alias. Alias rules are: 1) hName must not exist, 2) the target must exist, and 3) if the target is an alias hName becomes an alias of it's target (i.e. its parent).
eTextWhen not null, the reason for the registration failure.
rotateWhen true, the returned host list will be rotated +1 relative to the previously returned list of hosts.
Returns
True upon success and false otherwise.
Note
The expanded list is returned when GetAddrs() is called with hName.

◆ Register() [2/2]

static bool XrdNetRegistry::Register ( const char *  hName,
const char *  hList[],
int  hLNum,
std::string *  eText = 0,
bool  rotate = false 
)
static

Register a pseuo-hostname to be associated with a list of hosts.

Parameters
hNameThe pseudo-hostname which must start with 'pfx'.
hListA list of "host:port" entries to register as hName.
hLNumThe number of entries in hList.
eTextWhen not null, the reason for the registration failure.
rotateWhen true, the returned host list will be rotated +1 relative to the previously returned list of hosts.
Returns
True upon success and false otherwise.
Note
The expanded list is returned when GetAddrs() is called with hName.

◆ Resolve()

static bool XrdNetRegistry::Resolve ( const char *  hList,
std::string *  eText = 0 
)
staticprivate

◆ SetAlias()

static bool XrdNetRegistry::SetAlias ( const char *  hAlias,
const char *  hName,
std::string *  eText = 0 
)
staticprivate

Member Data Documentation

◆ pfx

const char XrdNetRegistry::pfx = '%'
static

Registry names must start with this character.


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