xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
XrdNetPMarkCfg.hh
Go to the documentation of this file.
1 #ifndef __XRDNETPMARKCFG__
2 #define __XRDNETPMARKCFG__
3 /******************************************************************************/
4 /* */
5 /* X r d N e t P M a r k C f g . h h */
6 /* */
7 /* (c) 2021 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 class XrdNetMsg;
34 class XrdNetPMark;
35 class XrdOucMapP2N;
36 class XrdOucStream;
37 class XrdScheduler;
38 class XrdSysError;
39 class XrdSysTrace;
40 
41 #include "XrdNet/XrdNetPMark.hh"
42 
44 {
45 public:
46 
48  const char *path=0,
49  const char *cgi=0,
50  const char *app=0) override;
51 
53  XrdNetPMark::Handle &handle,
54  const char *tident) override;
55 
56 static XrdNetPMark *Config(XrdSysError *eLog, XrdScheduler *sched,
57  XrdSysTrace *trc, bool &fatal);
58 
59 static int Parse(XrdSysError *eLog, XrdOucStream &Config);
60 
62 
63 // ID limits and specifications
64 //
65 
66 static const int btsActID = 6;
67 static const int mskActID = 63;
68 static const int maxActID = 63;
69 
70 static const int maxExpID = 511;
71 
72 private:
74 
75 static bool ConfigDefs();
76 static bool ConfigPV2E(char *info);
77 static bool ConfigRU2A(char *info);
78 static void Display();
79 static
80 const char *Extract(const char *sVec, char *buff, int blen);
81 static bool FetchFile();
82 static bool getCodes(XrdSecEntity &client, const char *path,
83  const char *cgi, int &ecode, int &acode);
84 static bool LoadFile();
85 static bool LoadJson(char *buff);
86 };
87 #endif
XrdNetPMark::Handle * Begin(XrdSecEntity &Client, const char *path=0, const char *cgi=0, const char *app=0) override
static const int maxExpID
Definition: XrdNetPMarkCfg.hh:70
static bool ConfigDefs()
static const int maxActID
Definition: XrdNetPMarkCfg.hh:68
Definition: XrdNetPMark.hh:36
Definition: XrdOucStream.hh:46
Definition: XrdNetMsg.hh:48
static int Parse(XrdSysError *eLog, XrdOucStream &Config)
static XrdNetPMark * Config(XrdSysError *eLog, XrdScheduler *sched, XrdSysTrace *trc, bool &fatal)
static bool getCodes(XrdSecEntity &client, const char *path, const char *cgi, int &ecode, int &acode)
static const int mskActID
Definition: XrdNetPMarkCfg.hh:67
Definition: XrdSysError.hh:89
Definition: XrdSysTrace.hh:48
static bool ConfigPV2E(char *info)
static const int btsActID
Definition: XrdNetPMarkCfg.hh:66
Definition: XrdScheduler.hh:45
static bool LoadFile()
static const char * Extract(const char *sVec, char *buff, int blen)
static bool ConfigRU2A(char *info)
Definition: XrdNetPMark.hh:40
static bool FetchFile()
Definition: XrdNetAddrInfo.hh:53
XrdNetPMarkCfg()
Definition: XrdNetPMarkCfg.hh:61
Definition: XrdSecEntity.hh:63
static bool LoadJson(char *buff)
static void Display()
~XrdNetPMarkCfg()
Definition: XrdNetPMarkCfg.hh:73
Definition: XrdNetPMarkCfg.hh:43