xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
Xrd
XrdLinkMatch.hh
Go to the documentation of this file.
1
#ifndef __LINK_MATCH__
2
#define __LINK_MATCH__
3
/******************************************************************************/
4
/* */
5
/* X r d L i n k M a t c h . h h */
6
/* */
7
/* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */
8
/* All Rights Reserved. See XrdInfo.cc for complete License Terms */
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 <strings.h>
16
#include <stdlib.h>
17
18
class
XrdLinkMatch
19
{
20
public
:
21
22
23
int
Match
(
const
char
*uname,
int
unlen,
24
const
char
*hname,
int
hnlen);
25
inline
int
Match
(
const
char
*uname,
int
unlen,
26
const
char
*hname)
27
{
return
Match
(uname, unlen, hname, strlen(hname));}
28
29
// Target: [<user>][*][@[<hostpfx>][*][<hostsfx>]]
30
//
31
void
Set
(
const
char
*target);
32
33
XrdLinkMatch
(
const
char
*target=0)
34
{
Uname
=
HnameL
=
HnameR
= 0;
35
Unamelen
=
Hnamelen
= 0;
36
if
(target)
Set
(target);
37
}
38
39
~XrdLinkMatch
() {}
40
41
private
:
42
43
char
Buff
[256];
44
int
Unamelen
;
45
char
*
Uname
;
46
int
HnamelenL
;
47
char
*
HnameL
;
48
int
HnamelenR
;
49
char
*
HnameR
;
50
int
Hnamelen
;
51
};
52
#endif
Generated by
1.8.1.2