XRootD
Loading...
Searching...
No Matches
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 <vector>
33
34#include "Xrd/XrdProtLoad.hh"
35#include "Xrd/XrdProtocol.hh"
36
37#include <sys/types.h>
38
39class XrdSysError;
40class XrdTcpMonInfo;
41class XrdNetSecurity;
42class XrdOucStream;
43class XrdInet;
44class XrdConfigProt;
45
47{
48public:
49
50int Configure(int argc, char **argv);
51
52int ConfigXeq(char *var, XrdOucStream &Config, XrdSysError *eDest=0);
53
54 XrdConfig();
56
59std::vector<XrdInet*> NetTCP;
60
61private:
62
63int ASocket(const char *path, const char *fname, mode_t mode);
64int ConfigProc(void);
65XrdInet *getNet(int port, bool isTLS);
66int getUG(char *parm, uid_t &theUid, gid_t &theGid);
67void Manifest(const char *pidfn);
68bool PidFile(const char *clpFN, bool optbg);
69void setCFG(bool start);
70int setFDL();
71int Setup(char *dfltp, char *libProt);
72int SetupAPath();
73bool SetupTLS();
74void Usage(int rc);
75int xallow(XrdSysError *edest, XrdOucStream &Config);
76int xapath(XrdSysError *edest, XrdOucStream &Config);
77int xhpath(XrdSysError *edest, XrdOucStream &Config);
78int xbuf(XrdSysError *edest, XrdOucStream &Config);
79int xmaxfd(XrdSysError *edest, XrdOucStream &Config);
80int xnet(XrdSysError *edest, XrdOucStream &Config);
81int xnkap(XrdSysError *edest, char *val);
82int xlog(XrdSysError *edest, XrdOucStream &Config);
83int xpidf(XrdSysError *edest, XrdOucStream &Config);
84int xport(XrdSysError *edest, XrdOucStream &Config);
85int xprot(XrdSysError *edest, XrdOucStream &Config);
86int xrep(XrdSysError *edest, XrdOucStream &Config);
87int xsched(XrdSysError *edest, XrdOucStream &Config);
88int xsit(XrdSysError *edest, XrdOucStream &Config);
89int xtcpmon(XrdSysError *edest, XrdOucStream &Config);
90int xtls(XrdSysError *edest, XrdOucStream &Config);
91int xtlsca(XrdSysError *edest, XrdOucStream &Config);
92int xtlsci(XrdSysError *edest, XrdOucStream &Config);
93int xtrace(XrdSysError *edest, XrdOucStream &Config);
94int xtmo(XrdSysError *edest, XrdOucStream &Config);
95
96static const char *TraceID;
97XrdNetSecurity *Police;
98XrdTcpMonInfo *tmoInfo;
99const char *myProg;
100const char *myName;
101const char *myDomain;
102const char *mySitName;
103const char *myInsName;
104char *myInstance;
105char *AdminPath;
106char *HomePath;
107char *PidPath;
108char *tlsCert;
109char *tlsKey;
110char *caDir;
111char *caFile;
112char *ConfigFN;
113char *repDest[2];
114XrdConfigProt *Firstcp;
115XrdConfigProt *Lastcp;
116int Net_Blen;
117int Net_Opts;
118int TLS_Blen;
119int TLS_Opts;
120
121int PortTCP; // TCP Port to listen on
122int PortUDP; // UDP Port to listen on (currently unsupported)
123int PortTLS; // TCP port to listen on for TLS connections
124
125int AdminMode;
126int HomeMode;
127int repInt;
128
129uint64_t tlsOpts;
130bool tlsNoVer;
131bool tlsNoCAD;
132
133char repOpts;
134char ppNet;
135signed char coreV;
136char Specs;
137static const int hpSpec = 0x01;
138
139bool isStrict;
140unsigned int maxFD;
141};
142#endif
static XrdSysError eDest(0,"crypto_")
XrdProtocol_Config ProtInfo
Definition XrdConfig.hh:57
XrdInet * NetADM
Definition XrdConfig.hh:58
std::vector< XrdInet * > NetTCP
Definition XrdConfig.hh:59
int ConfigXeq(char *var, XrdOucStream &Config, XrdSysError *eDest=0)
Definition XrdConfig.cc:794
int Configure(int argc, char **argv)
Definition XrdConfig.cc:318