xrootd
XrdNetRegistry.hh
Go to the documentation of this file.
1 #ifndef __XRDNETREGISTRY_HH__
2 #define __XRDNETREGISTRY_HH__
3 /******************************************************************************/
4 /* */
5 /* X r d N e t R e g i s t r y . h h */
6 /* */
7 /* (c) 2020 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC02-76-SFO0515 with the Department of Energy */
11 /* */
12 /* This file is part of the XRootD software suite. */
13 /* */
14 /* XRootD is free software: you can redistribute it and/or modify it under */
15 /* the terms of the GNU Lesser General Public License as published by the */
16 /* Free Software Foundation, either version 3 of the License, or (at your */
17 /* option) any later version. */
18 /* */
19 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22 /* License for more details. */
23 /* */
24 /* You should have received a copy of the GNU Lesser General Public License */
25 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27 /* */
28 /* The copyright holder's institutional names and contributor's names may not */
29 /* be used to endorse or promote products derived from this software without */
30 /* specific prior written permission of the institution or contributor. */
31 /******************************************************************************/
32 
33 #include <string>
34 
35 #include "XrdNet/XrdNetUtils.hh"
36 
37 class XrdNetAddr;
38 
40 {
41 public:
42 
43 static const char pfx = '%';
44 
45 //------------------------------------------------------------------------------
60 //------------------------------------------------------------------------------
61 static
62 const char *GetAddrs(const std::string &hSpec,
63  std::vector<XrdNetAddr> &aVec, int *ordn=0,
65  int pNum=XrdNetUtils::PortInSpec);
66 
67 //------------------------------------------------------------------------------
80 //------------------------------------------------------------------------------
81 
82 static bool Register(const char *hName, const char *hList[], int hLNum,
83  std::string *eText=0, bool rotate=false);
84 
85 //------------------------------------------------------------------------------
102 //------------------------------------------------------------------------------
103 
104 static bool Register(const char *hName, const char *hList,
105  std::string *eText=0, bool rotate=false);
106 
109 
110 private:
111 
112 static bool Resolve(const char *hList, std::string *eText=0);
113 static bool SetAlias(const char *hAlias, const char *hName, std::string *eText=0);
114 };
115 #endif
static const int PortInSpec
Definition: XrdNetUtils.hh:129
Definition: XrdNetRegistry.hh:39
static const char * GetAddrs(const std::string &hSpec, std::vector< XrdNetAddr > &aVec, int *ordn=0, XrdNetUtils::AddrOpts opts=XrdNetUtils::allIPMap, int pNum=XrdNetUtils::PortInSpec)
XrdNetRegistry()
Definition: XrdNetRegistry.hh:107
Definition: XrdNetAddr.hh:41
~XrdNetRegistry()
Definition: XrdNetRegistry.hh:108
AddrOpts
Definition: XrdNetUtils.hh:123
static bool SetAlias(const char *hAlias, const char *hName, std::string *eText=0)
static bool Resolve(const char *hList, std::string *eText=0)
static const char pfx
Registry names must start with this character.
Definition: XrdNetRegistry.hh:43
Definition: XrdNetUtils.hh:123
static bool Register(const char *hName, const char *hList[], int hLNum, std::string *eText=0, bool rotate=false)