00001 #ifndef _XRD_CONFIG_H
00002 #define _XRD_CONFIG_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include "Xrd/XrdProtLoad.hh"
00033 #include "Xrd/XrdProtocol.hh"
00034
00035 class XrdSysError;
00036 class XrdTcpMonInfo;
00037 class XrdNetSecurity;
00038 class XrdOucStream;
00039 class XrdInet;
00040 class XrdConfigProt;
00041
00042 class XrdConfig
00043 {
00044 public:
00045
00046 int Configure(int argc, char **argv);
00047
00048 int ConfigXeq(char *var, XrdOucStream &Config, XrdSysError *eDest=0);
00049
00050 XrdConfig();
00051 ~XrdConfig() {}
00052
00053 XrdProtocol_Config ProtInfo;
00054 XrdInet *NetADM;
00055 XrdInet *NetTCP[XrdProtLoad::ProtoMax+1];
00056
00057 private:
00058
00059 int ASocket(const char *path, const char *fname, mode_t mode);
00060 int ConfigProc(void);
00061 int getUG(char *parm, uid_t &theUid, gid_t &theGid);
00062 void Manifest(const char *pidfn);
00063 bool PidFile(const char *clpFN, bool optbg);
00064 void setCFG(bool start);
00065 int setFDL();
00066 int Setup(char *dfltp, char *libProt);
00067 int SetupAPath();
00068 bool SetupTLS();
00069 void Usage(int rc);
00070 int xallow(XrdSysError *edest, XrdOucStream &Config);
00071 int xapath(XrdSysError *edest, XrdOucStream &Config);
00072 int xhpath(XrdSysError *edest, XrdOucStream &Config);
00073 int xbuf(XrdSysError *edest, XrdOucStream &Config);
00074 int xnet(XrdSysError *edest, XrdOucStream &Config);
00075 int xnkap(XrdSysError *edest, char *val);
00076 int xlog(XrdSysError *edest, XrdOucStream &Config);
00077 int xpidf(XrdSysError *edest, XrdOucStream &Config);
00078 int xport(XrdSysError *edest, XrdOucStream &Config);
00079 int xprot(XrdSysError *edest, XrdOucStream &Config);
00080 int xrep(XrdSysError *edest, XrdOucStream &Config);
00081 int xsched(XrdSysError *edest, XrdOucStream &Config);
00082 int xsit(XrdSysError *edest, XrdOucStream &Config);
00083 int xtcpmon(XrdSysError *edest, XrdOucStream &Config);
00084 int xtls(XrdSysError *edest, XrdOucStream &Config);
00085 int xtlsca(XrdSysError *edest, XrdOucStream &Config);
00086 int xtlsci(XrdSysError *edest, XrdOucStream &Config);
00087 int xtrace(XrdSysError *edest, XrdOucStream &Config);
00088 int xtmo(XrdSysError *edest, XrdOucStream &Config);
00089 int yport(XrdSysError *edest, const char *ptyp, const char *pval);
00090
00091 static const char *TraceID;
00092 XrdNetSecurity *Police;
00093 XrdTcpMonInfo *tmoInfo;
00094 const char *myProg;
00095 const char *myName;
00096 const char *myDomain;
00097 const char *mySitName;
00098 const char *myInsName;
00099 char *myInstance;
00100 char *AdminPath;
00101 char *HomePath;
00102 char *PidPath;
00103 char *tlsCert;
00104 char *tlsKey;
00105 char *caDir;
00106 char *caFile;
00107 char *ConfigFN;
00108 char *repDest[2];
00109 XrdConfigProt *Firstcp;
00110 XrdConfigProt *Lastcp;
00111 int Net_Blen;
00112 int Net_Opts;
00113 int TLS_Blen;
00114 int TLS_Opts;
00115
00116 int PortTCP;
00117 int PortUDP;
00118 int PortTLS;
00119 int NetTCPlep;
00120
00121 int AdminMode;
00122 int HomeMode;
00123 int repInt;
00124
00125 uint64_t tlsOpts;
00126 bool tlsNoVer;
00127 bool tlsNoCAD;
00128
00129 char repOpts;
00130 char ppNet;
00131 signed char coreV;
00132 char Specs;
00133 static const int hpSpec = 0x01;
00134 };
00135 #endif