XrdCmsBlackList Class Reference

#include <XrdCmsBlackList.hh>

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

List of all members.

Public Member Functions

void DoIt ()
 Time driven method for checking black list file.
 XrdCmsBlackList ()
 Constructor and Destructor.
 ~XrdCmsBlackList ()

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)

Constructor & Destructor Documentation

XrdCmsBlackList::XrdCmsBlackList (  )  [inline]

Constructor and Destructor.

XrdCmsBlackList::~XrdCmsBlackList (  )  [inline]

Member Function Documentation

static bool XrdCmsBlackList::AddBL ( BL_Grip &  bAnchor,
char *  hSpec,
BL_Grip *  rAnchor,
char *  rSpec 
) [static, private]
static bool XrdCmsBlackList::AddRD ( XrdOucTList **  rList,
char *  rSpec,
char *  hSpec 
) [static, private]
static int XrdCmsBlackList::AddRD ( BL_Grip *  rAnchor,
char *  rSpec,
char *  hSpec 
) [static, private]
void XrdCmsBlackList::DoIt (  )  [virtual]

Time driven method for checking black list file.

Implements XrdJob.

static XrdOucTList* XrdCmsBlackList::Flatten ( XrdOucTList tList,
int  tPort 
) [static, private]
static bool XrdCmsBlackList::GetBL ( XrdOucTList *&  bList,
XrdOucTList **&  rList,
int &  rcnt 
) [static, private]
static void XrdCmsBlackList::Init ( XrdScheduler sP,
XrdCmsCluster cP,
const char *  blfn,
int  chkt = 600 
) [static]

Initialize the black list

Parameters:
sP Pointer to the scheduler object.
cP Pointer to the cluster object.
blfn The path to the black list file or null.
chkt Seconds between checks for blacklist changes. If the value is negative, the blacklist is treated as a whitelist.
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:
hName Pointer to the host name or address.
bList Optional pointer to a private black list.
rbuff Pointer to the buffer to contain the redirect response. If nil, the host is not redirected.
rblen The 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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 30 Sep 2019 for xrootd by  doxygen 1.6.1