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/XrdBuffer.hh"
00033 #include "Xrd/XrdInet.hh"
00034 #include "Xrd/XrdProtLoad.hh"
00035 #include "Xrd/XrdProtocol.hh"
00036 #include "Xrd/XrdScheduler.hh"
00037 #define XRD_TRACE Trace.
00038 #include "Xrd/XrdTrace.hh"
00039
00040 #include "XrdOuc/XrdOucTrace.hh"
00041 #include "XrdSys/XrdSysError.hh"
00042 #include "XrdSys/XrdSysLogger.hh"
00043
00044 class XrdNetSecurity;
00045 class XrdOucStream;
00046 class XrdConfigProt;
00047
00048 class XrdConfig
00049 {
00050 public:
00051
00052 int Configure(int argc, char **argv);
00053
00054 int ConfigXeq(char *var, XrdOucStream &Config, XrdSysError *eDest=0);
00055
00056 XrdConfig();
00057 ~XrdConfig() {}
00058
00059 XrdProtocol_Config ProtInfo;
00060 XrdInet *NetADM;
00061 XrdInet *NetTCP[XrdProtLoad::ProtoMax+1];
00062
00063 private:
00064
00065 int ASocket(const char *path, const char *fname, mode_t mode);
00066 int ConfigProc(void);
00067 int getUG(char *parm, uid_t &theUid, gid_t &theGid);
00068 void Manifest(const char *pidfn);
00069 void setCFG();
00070 int setFDL();
00071 int Setup(char *dfltp);
00072 void Usage(int rc);
00073 int xallow(XrdSysError *edest, XrdOucStream &Config);
00074 int xapath(XrdSysError *edest, XrdOucStream &Config);
00075 int xhpath(XrdSysError *edest, XrdOucStream &Config);
00076 int xbuf(XrdSysError *edest, XrdOucStream &Config);
00077 int xnet(XrdSysError *edest, XrdOucStream &Config);
00078 int xnkap(XrdSysError *edest, char *val);
00079 int xlog(XrdSysError *edest, XrdOucStream &Config);
00080 int xport(XrdSysError *edest, XrdOucStream &Config);
00081 int xprot(XrdSysError *edest, XrdOucStream &Config);
00082 int xrep(XrdSysError *edest, XrdOucStream &Config);
00083 int xsched(XrdSysError *edest, XrdOucStream &Config);
00084 int xsit(XrdSysError *edest, XrdOucStream &Config);
00085 int xtrace(XrdSysError *edest, XrdOucStream &Config);
00086 int xtmo(XrdSysError *edest, XrdOucStream &Config);
00087 int yport(XrdSysError *edest, const char *ptyp, const char *pval);
00088
00089 static const char *TraceID;
00090
00091 XrdSysLogger Logger;
00092 XrdSysError Log;
00093 XrdOucTrace Trace;
00094 XrdScheduler Sched;
00095 XrdBuffManager BuffPool;
00096 XrdNetSecurity *Police;
00097 const char *myProg;
00098 const char *myName;
00099 const char *myDomain;
00100 const char *mySitName;
00101 const char *myInsName;
00102 char *myInstance;
00103 char *AdminPath;
00104 char *HomePath;
00105 char *ConfigFN;
00106 char *repDest[2];
00107 XrdConfigProt *Firstcp;
00108 XrdConfigProt *Lastcp;
00109 int Net_Blen;
00110 int Net_Opts;
00111 int Wan_Blen;
00112 int Wan_Opts;
00113
00114 int PortTCP;
00115 int PortUDP;
00116 int PortWAN;
00117 int NetTCPlep;
00118 int AdminMode;
00119 int HomeMode;
00120 int repInt;
00121 char repOpts;
00122 char ppNet;
00123 signed char coreV;
00124 };
00125 #endif