#include <XrdNetRegistry.hh>
|
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 const char | pfx = '%' |
| Registry names must start with this character.
|
|
|
static bool | Resolve (const char *hList, std::string *eText=0) |
|
static bool | SetAlias (const char *hAlias, const char *hName, std::string *eText=0) |
|
◆ XrdNetRegistry()
XrdNetRegistry::XrdNetRegistry |
( |
| ) |
|
|
inline |
◆ ~XrdNetRegistry()
XrdNetRegistry::~XrdNetRegistry |
( |
| ) |
|
|
inline |
◆ GetAddrs()
Return addresses associated with a registered name.
- Parameters
-
hSpec | Reference to address specification & must start with "pfx". |
aVec | Reference to the vector to contain addresses. |
ordn | Pointer to where the partition ordinal is to be stored. |
opts | Options on what to return (see XrdNetUtils). |
pNum | Port 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
-
hName | The pseudo-hostname which must start with 'pfx'. |
hList | A 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). |
eText | When not null, the reason for the registration failure. |
rotate | When 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
-
hName | The pseudo-hostname which must start with 'pfx'. |
hList | A list of "host:port" entries to register as hName. |
hLNum | The number of entries in hList. |
eText | When not null, the reason for the registration failure. |
rotate | When 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 |
◆ pfx
const char XrdNetRegistry::pfx = '%' |
|
static |
Registry names must start with this character.
The documentation for this class was generated from the following file: