xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdSec
XrdSecPManager.hh
Go to the documentation of this file.
1
#ifndef __SEC_PMANAGER_HH__
2
#define __SEC_PMANAGER_HH__
3
/******************************************************************************/
4
/* */
5
/* X r d S e c P M a n a g e r . h h */
6
/* */
7
/* (c) 2003 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
#include <sys/socket.h>
34
35
#include "
XrdSec/XrdSecInterface.hh
"
36
#include "
XrdSys/XrdSysPthread.hh
"
37
38
class
XrdOucErrInfo
;
39
class
XrdSecProtList
;
40
class
XrdSecProtocol
;
41
class
XrdSysError
;
42
43
typedef
int
XrdSecPMask_t
;
44
45
#define PROTPARMS const char, const char *, const struct sockaddr &, \
46
const char *, XrdOucErrInfo *
47
48
class
XrdSecPManager
49
{
50
public
:
51
52
XrdSecPMask_t
Find
(
const
char
*pid,
// In
53
char
**parg=0);
// Out
54
55
XrdSecProtocol
*
Get
(
const
char
*hname,
56
const
sockaddr &netaddr,
57
const
char
*pname,
58
XrdOucErrInfo
*erp);
59
60
XrdSecProtocol
*
Get
(
const
char
*hname,
61
const
struct
sockaddr &netaddr,
62
XrdSecParameters
&secparm);
63
64
int
Load
(
XrdOucErrInfo
*
eMsg
,
// In
65
const
char
pmode,
// In 'c' | 's'
66
const
char
*pid,
// In
67
const
char
*parg,
// In
68
const
char
*path)
// In
69
{
return
(0 !=
ldPO
(eMsg, pmode, pid, parg, path));}
70
71
void
setDebug
(
int
dbg) {
DebugON
= dbg;}
72
73
void
setErrP
(
XrdSysError
*eP) {
errP
= eP;}
74
75
XrdSecPManager
(
int
dbg=0)
76
:
protnum
(1),
First
(0),
Last
(0),
errP
(0),
77
DebugON
(dbg) {}
78
~XrdSecPManager
() {}
79
80
private
:
81
82
XrdSecProtList
*
Add
(
XrdOucErrInfo
*
eMsg
,
const
char
*pid,
83
XrdSecProtocol
*(*ep)(
PROTPARMS
),
const
char
*parg);
84
XrdSecProtList
*
ldPO
(
XrdOucErrInfo
*eMsg,
// In
85
const
char
pmode,
// In 'c' | 's'
86
const
char
*pid,
// In
87
const
char
*parg=0,
// In
88
const
char
*spath=0);
// In
89
XrdSecProtList
*
Lookup
(
const
char
*pid);
90
91
XrdSecPMask_t
protnum
;
92
XrdSysMutex
myMutex
;
93
XrdSecProtList
*
First
;
94
XrdSecProtList
*
Last
;
95
XrdSysError
*
errP
;
96
int
DebugON
;
97
};
98
#endif
Generated by
1.8.3.1