XRootD
Loading...
Searching...
No Matches
XrdNetPMark Class Referenceabstract

#include <XrdNetPMark.hh>

+ Inheritance diagram for XrdNetPMark:
+ Collaboration diagram for XrdNetPMark:

Classes

class  Handle
 

Public Member Functions

 XrdNetPMark ()
 
virtual ~XrdNetPMark ()
 
virtual HandleBegin (XrdNetAddrInfo &addr, Handle &handle, const char *tident)=0
 
virtual HandleBegin (XrdSecEntity &Client, const char *path=0, const char *cgi=0, const char *app=0)=0
 

Static Public Member Functions

static bool getEA (const char *cgi, int &ecode, int &acode)
 

Static Public Attributes

static const int maxTotID = 65535
 
static const int minTotID = 65
 

Static Protected Attributes

static const int btsActID = 6
 
static const int maxActID = maxTotID & mskActID
 
static const int maxExpID = maxTotID >> btsActID
 
static const int minActID = minTotID & mskActID
 
static const int minExpID = minTotID >> btsActID
 
static const int mskActID = 63
 

Detailed Description

Definition at line 40 of file XrdNetPMark.hh.

Constructor & Destructor Documentation

◆ XrdNetPMark()

XrdNetPMark::XrdNetPMark ( )
inline

Definition at line 78 of file XrdNetPMark.hh.

78{}

◆ ~XrdNetPMark()

virtual XrdNetPMark::~XrdNetPMark ( )
inlinevirtual

Definition at line 79 of file XrdNetPMark.hh.

79{} // This object cannot be deleted!

Member Function Documentation

◆ Begin() [1/2]

virtual Handle * XrdNetPMark::Begin ( XrdNetAddrInfo & addr,
Handle & handle,
const char * tident )
pure virtual

Implemented in XrdNetPMarkCfg.

◆ Begin() [2/2]

virtual Handle * XrdNetPMark::Begin ( XrdSecEntity & Client,
const char * path = 0,
const char * cgi = 0,
const char * app = 0 )
pure virtual

Implemented in XrdNetPMarkCfg.

Referenced by XrdTpc::PMarkManager::beginPMarks().

+ Here is the caller graph for this function:

◆ getEA()

bool XrdNetPMark::getEA ( const char * cgi,
int & ecode,
int & acode )
static

Definition at line 40 of file XrdNetPMark.cc.

41{
42
43 ecode = acode = 0;
44// If we have cgi, see if we can extract rge codes from there
45//
46 if (cgi) {
47 const char *stP = strstr(cgi, "scitag.flow=");
48 if (stP) {
49 char *eol;
50 int eacode = strtol(stP + 12, &eol, 10);
51 if (*eol == '&' || *eol == 0) {
52 if (eacode >= XrdNetPMark::minTotID && eacode <= XrdNetPMark::maxTotID) {
53 ecode = eacode >> XrdNetPMark::btsActID;
54 acode = eacode & XrdNetPMark::mskActID;
55 }
56 // According to the specification, if the provided scitag.flow has an incorrect value
57 // the packets will be marked with a scitag = 0
58 return true;
59 }
60 }
61 }
62
63 // No go
64 //
65 return false;
66}
static const int minTotID
static const int btsActID
static const int maxTotID
static const int mskActID

References btsActID, maxTotID, minTotID, and mskActID.

Member Data Documentation

◆ btsActID

const int XrdNetPMark::btsActID = 6
staticprotected

Definition at line 91 of file XrdNetPMark.hh.

Referenced by getEA().

◆ maxActID

const int XrdNetPMark::maxActID = maxTotID & mskActID
staticprotected

Definition at line 96 of file XrdNetPMark.hh.

Referenced by XrdNetPMark::Handle::Valid().

◆ maxExpID

const int XrdNetPMark::maxExpID = maxTotID >> btsActID
staticprotected

Definition at line 95 of file XrdNetPMark.hh.

◆ maxTotID

const int XrdNetPMark::maxTotID = 65535
static

Definition at line 87 of file XrdNetPMark.hh.

Referenced by getEA().

◆ minActID

const int XrdNetPMark::minActID = minTotID & mskActID
staticprotected

Definition at line 94 of file XrdNetPMark.hh.

Referenced by XrdNetPMark::Handle::Valid().

◆ minExpID

const int XrdNetPMark::minExpID = minTotID >> btsActID
staticprotected

Definition at line 93 of file XrdNetPMark.hh.

Referenced by XrdNetPMark::Handle::Valid().

◆ minTotID

const int XrdNetPMark::minTotID = 65
static

From the specifications: Valid value for scitag is a single positive integer > 64 and <65536 (16bit). Any other value is considered invalid.

Definition at line 86 of file XrdNetPMark.hh.

Referenced by getEA().

◆ mskActID

const int XrdNetPMark::mskActID = 63
staticprotected

Definition at line 92 of file XrdNetPMark.hh.

Referenced by getEA().


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