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-AC03-76-SFO0515 with the Department of Energy */
11
/******************************************************************************/
12
13
// $Id$
14
15
#include <sys/socket.h>
16
17
#include "
XrdSec/XrdSecInterface.hh
"
18
#include "
XrdSys/XrdSysPthread.hh
"
19
20
class
XrdOucErrInfo
;
21
class
XrdSecProtList
;
22
class
XrdSecProtocol
;
23
24
typedef
int
XrdSecPMask_t
;
25
26
#define PROTPARMS const char, const char *, const struct sockaddr &, \
27
const char *, XrdOucErrInfo *
28
29
class
XrdSecPManager
30
{
31
public
:
32
33
XrdSecPMask_t
Find
(
const
char
*pid,
// In
34
char
**parg=0);
// Out
35
36
XrdSecProtocol
*
Get
(
const
char
*hname,
37
const
sockaddr &netaddr,
38
const
char
*pname,
39
XrdOucErrInfo
*erp);
40
41
XrdSecProtocol
*
Get
(
const
char
*hname,
42
const
struct
sockaddr &netaddr,
43
XrdSecParameters
&secparm);
44
45
int
Load
(
XrdOucErrInfo
*
eMsg
,
// In
46
const
char
pmode,
// In 'c' | 's'
47
const
char
*pid,
// In
48
const
char
*parg,
// In
49
const
char
*path)
// In
50
{
return
(0 !=
ldPO
(eMsg, pmode, pid, parg, path));}
51
52
void
setDebug
(
int
dbg) {
DebugON
= dbg;}
53
54
XrdSecPManager
(
int
dbg=0)
55
{
First
=
Last
= 0;
DebugON
= dbg;
protnum
= 1;}
56
~XrdSecPManager
() {}
57
58
private
:
59
60
XrdSecProtList
*
Add
(
XrdOucErrInfo
*
eMsg
,
const
char
*pid,
61
XrdSecProtocol
*(*ep)(
PROTPARMS
),
const
char
*parg);
62
XrdSecProtList
*
ldPO
(
XrdOucErrInfo
*eMsg,
// In
63
const
char
pmode,
// In 'c' | 's'
64
const
char
*pid,
// In
65
const
char
*parg=0,
// In
66
const
char
*spath=0);
// In
67
XrdSecProtList
*
Lookup
(
const
char
*pid);
68
69
XrdSecPMask_t
protnum
;
70
XrdSysMutex
myMutex
;
71
XrdSecProtList
*
First
;
72
XrdSecProtList
*
Last
;
73
int
DebugON
;
74
};
75
#endif
Generated by
1.8.1.2