XRootD
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 38 of file XrdNetPMark.hh.

Constructor & Destructor Documentation

◆ XrdNetPMark()

XrdNetPMark::XrdNetPMark ( )
inline

Definition at line 75 of file XrdNetPMark.hh.

75 {}

◆ ~XrdNetPMark()

virtual XrdNetPMark::~XrdNetPMark ( )
inlinevirtual

Definition at line 76 of file XrdNetPMark.hh.

76 {} // 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
Definition: XrdNetPMark.hh:83
static const int btsActID
Definition: XrdNetPMark.hh:88
static const int maxTotID
Definition: XrdNetPMark.hh:84
static const int mskActID
Definition: XrdNetPMark.hh:89

References btsActID, maxTotID, minTotID, and mskActID.

Member Data Documentation

◆ btsActID

const int XrdNetPMark::btsActID = 6
staticprotected

Definition at line 88 of file XrdNetPMark.hh.

Referenced by getEA().

◆ maxActID

const int XrdNetPMark::maxActID = maxTotID & mskActID
staticprotected

Definition at line 93 of file XrdNetPMark.hh.

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

◆ maxExpID

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

Definition at line 92 of file XrdNetPMark.hh.

◆ maxTotID

const int XrdNetPMark::maxTotID = 65535
static

Definition at line 84 of file XrdNetPMark.hh.

Referenced by getEA().

◆ minActID

const int XrdNetPMark::minActID = minTotID & mskActID
staticprotected

Definition at line 91 of file XrdNetPMark.hh.

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

◆ minExpID

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

Definition at line 90 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 83 of file XrdNetPMark.hh.

Referenced by getEA().

◆ mskActID

const int XrdNetPMark::mskActID = 63
staticprotected

Definition at line 89 of file XrdNetPMark.hh.

Referenced by getEA().


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