xrootd
XrdConfig.hh
Go to the documentation of this file.
1 #ifndef _XRD_CONFIG_H
2 #define _XRD_CONFIG_H
3 /******************************************************************************/
4 /* */
5 /* X r d C o n f i g . h h */
6 /* */
7 /* (C) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* Produced by Andrew Hanushevsky for Stanford University under contract */
9 /* DE-AC02-76-SFO0515 with the Deprtment of Energy */
10 /* */
11 /* This file is part of the XRootD software suite. */
12 /* */
13 /* XRootD is free software: you can redistribute it and/or modify it under */
14 /* the terms of the GNU Lesser General Public License as published by the */
15 /* Free Software Foundation, either version 3 of the License, or (at your */
16 /* option) any later version. */
17 /* */
18 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
19 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
20 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
21 /* License for more details. */
22 /* */
23 /* You should have received a copy of the GNU Lesser General Public License */
24 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
25 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
26 /* */
27 /* The copyright holder's institutional names and contributor's names may not */
28 /* be used to endorse or promote products derived from this software without */
29 /* specific prior written permission of the institution or contributor. */
30 /******************************************************************************/
31 
32 #include "Xrd/XrdProtLoad.hh"
33 #include "Xrd/XrdProtocol.hh"
34 
35 class XrdSysError;
36 class XrdTcpMonInfo;
37 class XrdNetSecurity;
38 class XrdOucStream;
39 class XrdInet;
40 class XrdConfigProt;
41 
42 class XrdConfig
43 {
44 public:
45 
46 int Configure(int argc, char **argv);
47 
48 int ConfigXeq(char *var, XrdOucStream &Config, XrdSysError *eDest=0);
49 
52 
56 
57 private:
58 
59 int ASocket(const char *path, const char *fname, mode_t mode);
60 int ConfigProc(void);
61 int getUG(char *parm, uid_t &theUid, gid_t &theGid);
62 void Manifest(const char *pidfn);
63 bool PidFile(const char *clpFN, bool optbg);
64 void setCFG(bool start);
65 int setFDL();
66 int Setup(char *dfltp, char *libProt);
67 int SetupAPath();
68 bool SetupTLS();
69 void Usage(int rc);
75 int xnkap(XrdSysError *edest, char *val);
89 int yport(XrdSysError *edest, const char *ptyp, const char *pval);
90 
91 static const char *TraceID;
93 XrdTcpMonInfo *tmoInfo;
94 const char *myProg;
95 const char *myName;
96 const char *myDomain;
97 const char *mySitName;
98 const char *myInsName;
99 char *myInstance;
100 char *AdminPath;
101 char *HomePath;
102 char *PidPath;
103 char *tlsCert;
104 char *tlsKey;
105 char *caDir;
106 char *caFile;
107 char *ConfigFN;
108 char *repDest[2];
109 XrdConfigProt *Firstcp;
110 XrdConfigProt *Lastcp;
115 
116 int PortTCP; // TCP Port to listen on
117 int PortUDP; // UDP Port to listen on (currently unsupported)
118 int PortTLS; // TCP port to listen on for TLS connections
120 
123 int repInt;
124 
125 uint64_t tlsOpts;
126 bool tlsNoVer;
127 bool tlsNoCAD;
128 
129 char repOpts;
130 char ppNet;
131 signed char coreV;
132 char Specs;
133 static const int hpSpec = 0x01;
134 };
135 #endif
XrdConfig::tlsOpts
uint64_t tlsOpts
Definition: XrdConfig.hh:125
XrdConfig::Net_Opts
int Net_Opts
Definition: XrdConfig.hh:112
XrdConfig::TraceID
static const char * TraceID
Definition: XrdConfig.hh:91
XrdProtLoad::ProtoMax
static const int ProtoMax
Definition: XrdProtLoad.hh:61
XrdConfig::xtcpmon
int xtcpmon(XrdSysError *edest, XrdOucStream &Config)
XrdConfig
Definition: XrdConfig.hh:43
XrdConfig::myInsName
const char * myInsName
Definition: XrdConfig.hh:98
XrdConfig::Police
XrdNetSecurity * Police
Definition: XrdConfig.hh:92
XrdConfig::xlog
int xlog(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::PortTCP
int PortTCP
Definition: XrdConfig.hh:116
XrdConfig::Firstcp
XrdConfigProt * Firstcp
Definition: XrdConfig.hh:109
XrdConfig::caFile
char * caFile
Definition: XrdConfig.hh:106
XrdConfig::AdminPath
char * AdminPath
Definition: XrdConfig.hh:100
XrdConfig::myName
const char * myName
Definition: XrdConfig.hh:95
XrdConfig::caDir
char * caDir
Definition: XrdConfig.hh:105
XrdConfig::xprot
int xprot(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::xtlsca
int xtlsca(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::ASocket
int ASocket(const char *path, const char *fname, mode_t mode)
XrdProtocol_Config
Definition: XrdProtocol.hh:56
XrdConfig::xtmo
int xtmo(XrdSysError *edest, XrdOucStream &Config)
XrdNetSecurity
Definition: XrdNetSecurity.hh:44
XrdConfig::xrep
int xrep(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::NetADM
XrdInet * NetADM
Definition: XrdConfig.hh:54
XrdConfig::xtls
int xtls(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::xallow
int xallow(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::xport
int xport(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::SetupTLS
bool SetupTLS()
XrdConfig::Usage
void Usage(int rc)
XrdOucStream
Definition: XrdOucStream.hh:47
XrdConfig::Lastcp
XrdConfigProt * Lastcp
Definition: XrdConfig.hh:110
XrdProtocol.hh
XrdConfig::tlsKey
char * tlsKey
Definition: XrdConfig.hh:104
XrdConfig::Net_Blen
int Net_Blen
Definition: XrdConfig.hh:111
XrdConfig::PidFile
bool PidFile(const char *clpFN, bool optbg)
XrdConfig::repDest
char * repDest[2]
Definition: XrdConfig.hh:108
XrdConfig::repOpts
char repOpts
Definition: XrdConfig.hh:129
XrdConfig::~XrdConfig
~XrdConfig()
Definition: XrdConfig.hh:51
XrdConfig::TLS_Opts
int TLS_Opts
Definition: XrdConfig.hh:114
XrdConfig::hpSpec
static const int hpSpec
Definition: XrdConfig.hh:133
XrdConfig::PidPath
char * PidPath
Definition: XrdConfig.hh:102
XrdConfig::PortUDP
int PortUDP
Definition: XrdConfig.hh:117
XrdConfig::NetTCPlep
int NetTCPlep
Definition: XrdConfig.hh:119
XrdConfig::HomeMode
int HomeMode
Definition: XrdConfig.hh:122
XrdConfig::myDomain
const char * myDomain
Definition: XrdConfig.hh:96
XrdConfig::xpidf
int xpidf(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::ConfigProc
int ConfigProc(void)
XrdConfig::Manifest
void Manifest(const char *pidfn)
XrdConfig::xtlsci
int xtlsci(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::TLS_Blen
int TLS_Blen
Definition: XrdConfig.hh:113
XrdConfig::HomePath
char * HomePath
Definition: XrdConfig.hh:101
XrdConfig::xtrace
int xtrace(XrdSysError *edest, XrdOucStream &Config)
XrdProtLoad.hh
XrdConfig::coreV
signed char coreV
Definition: XrdConfig.hh:131
XrdConfig::PortTLS
int PortTLS
Definition: XrdConfig.hh:118
XrdConfig::setFDL
int setFDL()
XrdCms::Config
XrdCmsConfig Config
XrdConfig::Configure
int Configure(int argc, char **argv)
XrdConfig::repInt
int repInt
Definition: XrdConfig.hh:123
XrdConfig::xsched
int xsched(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::ConfigXeq
int ConfigXeq(char *var, XrdOucStream &Config, XrdSysError *eDest=0)
XrdConfig::Setup
int Setup(char *dfltp, char *libProt)
XrdConfig::AdminMode
int AdminMode
Definition: XrdConfig.hh:121
XrdConfig::SetupAPath
int SetupAPath()
XrdInet
Definition: XrdInet.hh:48
XrdConfig::NetTCP
XrdInet * NetTCP[XrdProtLoad::ProtoMax+1]
Definition: XrdConfig.hh:55
XrdConfig::ConfigFN
char * ConfigFN
Definition: XrdConfig.hh:107
XrdConfig::ProtInfo
XrdProtocol_Config ProtInfo
Definition: XrdConfig.hh:53
XrdConfig::tlsNoVer
bool tlsNoVer
Definition: XrdConfig.hh:126
XrdConfig::tmoInfo
XrdTcpMonInfo * tmoInfo
Definition: XrdConfig.hh:93
XrdConfig::setCFG
void setCFG(bool start)
XrdConfig::ppNet
char ppNet
Definition: XrdConfig.hh:130
XrdConfig::xhpath
int xhpath(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::tlsNoCAD
bool tlsNoCAD
Definition: XrdConfig.hh:127
XrdConfig::myInstance
char * myInstance
Definition: XrdConfig.hh:99
XrdConfig::mySitName
const char * mySitName
Definition: XrdConfig.hh:97
XrdConfig::xsit
int xsit(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::xbuf
int xbuf(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::yport
int yport(XrdSysError *edest, const char *ptyp, const char *pval)
XrdSysError
Definition: XrdSysError.hh:90
XrdConfig::getUG
int getUG(char *parm, uid_t &theUid, gid_t &theGid)
XrdConfig::Specs
char Specs
Definition: XrdConfig.hh:132
XrdConfig::xnkap
int xnkap(XrdSysError *edest, char *val)
XrdConfig::tlsCert
char * tlsCert
Definition: XrdConfig.hh:103
XrdConfig::xapath
int xapath(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::myProg
const char * myProg
Definition: XrdConfig.hh:94
XrdConfig::xnet
int xnet(XrdSysError *edest, XrdOucStream &Config)
XrdConfig::XrdConfig
XrdConfig()