xrootd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Private Member Functions | List of all members
XrdCmsBlackList Class Reference

#include <XrdCmsBlackList.hh>

Inheritance diagram for XrdCmsBlackList:
Inheritance graph
[legend]
Collaboration diagram for XrdCmsBlackList:
Collaboration graph
[legend]

Public Member Functions

void DoIt ()
 Time driven method for checking black list file.
 
 XrdCmsBlackList ()
 Constructor and Destructor.
 
 ~XrdCmsBlackList ()
 
- Public Member Functions inherited from XrdJob
 XrdJob (const char *desc="")
 
virtual ~XrdJob ()
 

Static Public Member Functions

static void Init (XrdScheduler *sP, XrdCmsCluster *cP, const char *blfn, int chkt=600)
 
static int Present (const char *hName, XrdOucTList *bList=0, char *rbuff=0, int rblen=0)
 

Static Private Member Functions

static bool AddBL (BL_Grip &bAnchor, char *hSpec, BL_Grip *rAnchor, char *rSpec)
 
static int AddRD (BL_Grip *rAnchor, char *rSpec, char *hSpec)
 
static bool AddRD (XrdOucTList **rList, char *rSpec, char *hSpec)
 
static XrdOucTListFlatten (XrdOucTList *tList, int tPort)
 
static bool GetBL (XrdOucTList *&bList, XrdOucTList **&rList, int &rcnt, bool isInit=false)
 

Additional Inherited Members

- Public Attributes inherited from XrdJob
XrdJobNextJob
 
const char * Comment
 

Constructor & Destructor Documentation

◆ XrdCmsBlackList()

XrdCmsBlackList::XrdCmsBlackList ( )
inline

Constructor and Destructor.

◆ ~XrdCmsBlackList()

XrdCmsBlackList::~XrdCmsBlackList ( )
inline

Member Function Documentation

◆ AddBL()

static bool XrdCmsBlackList::AddBL ( BL_Grip &  bAnchor,
char *  hSpec,
BL_Grip *  rAnchor,
char *  rSpec 
)
staticprivate

◆ AddRD() [1/2]

static int XrdCmsBlackList::AddRD ( BL_Grip *  rAnchor,
char *  rSpec,
char *  hSpec 
)
staticprivate

◆ AddRD() [2/2]

static bool XrdCmsBlackList::AddRD ( XrdOucTList **  rList,
char *  rSpec,
char *  hSpec 
)
staticprivate

◆ DoIt()

void XrdCmsBlackList::DoIt ( )
virtual

Time driven method for checking black list file.

Implements XrdJob.

◆ Flatten()

static XrdOucTList * XrdCmsBlackList::Flatten ( XrdOucTList tList,
int  tPort 
)
staticprivate

◆ GetBL()

static bool XrdCmsBlackList::GetBL ( XrdOucTList *&  bList,
XrdOucTList **&  rList,
int &  rcnt,
bool  isInit = false 
)
staticprivate

◆ Init()

static void XrdCmsBlackList::Init ( XrdScheduler sP,
XrdCmsCluster cP,
const char *  blfn,
int  chkt = 600 
)
static

Initialize the black list

Parameters
sPPointer to the scheduler object.
cPPointer to the cluster object.
blfnThe path to the black list file or null.
chktSeconds between checks for blacklist changes. If the value is negative, the blacklist is treated as a whitelist.

◆ Present()

static int XrdCmsBlackList::Present ( const char *  hName,
XrdOucTList bList = 0,
char *  rbuff = 0,
int  rblen = 0 
)
static

Check if host is in the black list and how it should be managed.

Parameters
hNamePointer to the host name or address.
bListOptional pointer to a private black list.
rbuffPointer to the buffer to contain the redirect response. If nil, the host is not redirected.
rblenThe size of rbuff. If zero or insufficiently large the host is not redirected.
Returns
< -1 Host is in the black list and would be redirected; but either rbuff was nil or the buffer was too small. The abs(returned value) is the size the buffer should have been.
= -1 Host is in the black list and should not be redirected.
= 0 Host not in the black list.
> 0 Host is in the black list and should be redirected. The return value is the size of the redirect response placed in the supplied buffer.

The documentation for this class was generated from the following file: