Logo ROOT  
Reference Guide
XrdProofdProtocol Class Reference

Definition at line 54 of file XrdProofdProtocol.h.

Public Member Functions

 XrdProofdProtocol (XrdProtocol_Config *pi=0)
 Protocol constructor. More...
 
virtual ~XrdProofdProtocol ()
 
XrdBuffer * Argp () const
 
XrdSecProtocol * AuthProt () const
 
kXR_int32 CID () const
 
XrdProofdClientClient () const
 
int ConnType () const
 
void DoIt ()
 
int GetData (const char *dtype, char *buff, int blen)
 Get data from the open link. More...
 
const char * GroupIn () const
 
bool Internal ()
 
bool IsCtrlC ()
 
XrdLink * Link () const
 
XrdProtocolMatch (XrdLink *lp)
 Check whether the request matches this protocol. More...
 
int Pid () const
 
int Process (XrdLink *lp)
 Process the information received on the active link. More...
 
short int ProofProtocol () const
 
void Recycle (XrdLink *lp, int x, const char *y)
 Recycle call. Release the instance and give it back to the stack. More...
 
XPClientRequestRequest () const
 
void ResetCtrlC ()
 
XrdProofdResponseResponse (kXR_unt16 rid)
 Get response instance corresponding to stream ID 'sid'. More...
 
void SetAdminPath (const char *p)
 
void SetAuthEntity (XrdSecEntity *se=0)
 
void SetAuthProt (XrdSecProtocol *p)
 
void SetCID (kXR_int32 cid)
 
void SetClient (XrdProofdClient *c)
 
void SetClntCapVer (unsigned char c)
 
void SetConnType (int ct)
 
void SetGroupIn (const char *gin)
 
void SetPid (int pid)
 
void SetProofProtocol (short int pp)
 
void SetStatus (char s)
 
void SetSuperUser (bool su=1)
 
void SetTraceID ()
 
void SetUserIn (const char *uin)
 
int Stats (char *buff, int blen, int do_sync)
 Return statistics info about the protocol. More...
 
char Status () const
 
bool SuperUser () const
 
const char * TraceID () const
 
const char * UserIn () const
 

Static Public Member Functions

static int Configure (char *parms, XrdProtocol_Config *pi)
 Protocol configuration tool Function: Establish configuration at load time. More...
 
static int EUidAtStartup ()
 
static XrdBuffer * GetBuff (int quantum, XrdBuffer *argp=0)
 Allocate a buffer to handle quantum bytes; if argp points to an existing buffer, its size is checked and re-allocated if needed. More...
 
static int MaxBuffsz ()
 
static XrdProofdManagerMgr ()
 
static void ReleaseBuff (XrdBuffer *argp)
 Release a buffer previously allocated via GetBuff. More...
 

Private Member Functions

int CtrlC ()
 Set and propagate a Ctrl-C request. More...
 
XrdProofdResponseGetNewResponse (kXR_unt16 rid)
 Create new response instance for stream ID 'sid'. More...
 
int Interrupt ()
 Handle an interrupt request. More...
 
int Ping ()
 Handle a ping request. More...
 
int Process2 ()
 Local processing method: here the request is dispatched to the appropriate method. More...
 
void Reset ()
 Reset static and local vars. More...
 
int SendData (XrdProofdProofServ *xps, kXR_int32 sid=-1, XrdSrvBuffer **buf=0, bool sb=0)
 Send data over the open link. Segmentation is done here, if required. More...
 
int SendDataN (XrdProofdProofServ *xps, XrdSrvBuffer **buf=0, bool sb=0)
 Send data over the open client links of session 'xps'. More...
 
int SendMsg ()
 Handle a request to forward a message to another process. More...
 
void TouchAdminPath ()
 Recording time of the last request on this instance. More...
 
int Urgent ()
 Handle generic request of a urgent message to be forwarded to the server. More...
 

Static Private Member Functions

static void PostSession (int on, const char *u, const char *g, XrdProofdProofServ *xps)
 Post change of session status. More...
 

Private Attributes

XrdOucString fAdminPath
 
XrdBuffer * fArgp
 
XrdSecProtocol * fAuthProt
 
kXR_int32 fCID
 
unsigned char fClntCapVer
 
kXR_int32 fConnType
 
XrdSysRecMutex fCtrlcMutex
 
XrdOucString fGroupIn
 
bool fIsCtrlC
 
XrdLink * fLink
 
XrdSysRecMutex fMutex
 
XrdProofdClientfPClient
 
int fPid
 
short int fProofProtocol
 
XpdObject fProtLink
 
XPClientRequest fRequest
 
std::vector< XrdProofdResponse * > fResponses
 
XrdSecEntity * fSecClient
 
XrdSecEntity fSecEntity
 
char fStatus
 
int fStdErrFD
 
bool fSuperUser
 
XrdOucString fTraceID
 
XrdOucString fUserIn
 

Static Private Attributes

static XrdSysRecMutex fgBMutex
 
static XrdBuffManager * fgBPool = 0
 
static bool fgConfigDone = 0
 
static int fgCount = 0
 
static XrdSysError fgEDest
 
static int fgEUidAtStartup = -1
 
static XrdSysLoggerfgLogger = 0
 
static int fgMaxBuffsz = 0
 
static XrdProofdManagerfgMgr = 0
 
static XpdObjectQ fgProtStack
 
static int fgReadWait = 0
 

#include <XrdProofdProtocol.h>

Inheritance diagram for XrdProofdProtocol:
[legend]

Constructor & Destructor Documentation

◆ XrdProofdProtocol()

XrdProofdProtocol::XrdProofdProtocol ( XrdProtocol_Config *  pi = 0)

Protocol constructor.

Definition at line 218 of file XrdProofdProtocol.cxx.

◆ ~XrdProofdProtocol()

virtual XrdProofdProtocol::~XrdProofdProtocol ( )
inlinevirtual

Definition at line 58 of file XrdProofdProtocol.h.

Member Function Documentation

◆ Argp()

XrdBuffer * XrdProofdProtocol::Argp ( ) const
inline

Definition at line 92 of file XrdProofdProtocol.h.

◆ AuthProt()

XrdSecProtocol * XrdProofdProtocol::AuthProt ( ) const
inline

Definition at line 94 of file XrdProofdProtocol.h.

◆ CID()

kXR_int32 XrdProofdProtocol::CID ( ) const
inline

Definition at line 75 of file XrdProofdProtocol.h.

◆ Client()

XrdProofdClient * XrdProofdProtocol::Client ( ) const
inline

Definition at line 76 of file XrdProofdProtocol.h.

◆ Configure()

int XrdProofdProtocol::Configure ( char *  parms,
XrdProtocol_Config *  pi 
)
static

Protocol configuration tool Function: Establish configuration at load time.

Output: 1 upon success or 0 otherwise.

Definition at line 429 of file XrdProofdProtocol.cxx.

◆ ConnType()

int XrdProofdProtocol::ConnType ( ) const
inline

Definition at line 79 of file XrdProofdProtocol.h.

◆ CtrlC()

int XrdProofdProtocol::CtrlC ( )
private

Set and propagate a Ctrl-C request.

Definition at line 1382 of file XrdProofdProtocol.cxx.

◆ DoIt()

void XrdProofdProtocol::DoIt ( )
inline

Definition at line 60 of file XrdProofdProtocol.h.

◆ EUidAtStartup()

static int XrdProofdProtocol::EUidAtStartup ( )
inlinestatic

Definition at line 114 of file XrdProofdProtocol.h.

◆ GetBuff()

XrdBuffer * XrdProofdProtocol::GetBuff ( int  quantum,
XrdBuffer *  argp = 0 
)
static

Allocate a buffer to handle quantum bytes; if argp points to an existing buffer, its size is checked and re-allocated if needed.

Definition at line 721 of file XrdProofdProtocol.cxx.

◆ GetData()

int XrdProofdProtocol::GetData ( const char *  dtype,
char *  buff,
int  blen 
)

Get data from the open link.

Definition at line 764 of file XrdProofdProtocol.cxx.

◆ GetNewResponse()

XrdProofdResponse * XrdProofdProtocol::GetNewResponse ( kXR_unt16  rid)
private

Create new response instance for stream ID 'sid'.

Definition at line 253 of file XrdProofdProtocol.cxx.

◆ GroupIn()

const char * XrdProofdProtocol::GroupIn ( ) const
inline

Definition at line 77 of file XrdProofdProtocol.h.

◆ Internal()

bool XrdProofdProtocol::Internal ( )
inline

Definition at line 81 of file XrdProofdProtocol.h.

◆ Interrupt()

int XrdProofdProtocol::Interrupt ( )
private

Handle an interrupt request.

Definition at line 1118 of file XrdProofdProtocol.cxx.

◆ IsCtrlC()

bool XrdProofdProtocol::IsCtrlC ( )
inline

Definition at line 82 of file XrdProofdProtocol.h.

◆ Link()

XrdLink * XrdProofdProtocol::Link ( ) const
inline

Definition at line 93 of file XrdProofdProtocol.h.

◆ Match()

XrdProtocol * XrdProofdProtocol::Match ( XrdLink *  lp)

Check whether the request matches this protocol.

Definition at line 291 of file XrdProofdProtocol.cxx.

◆ MaxBuffsz()

static int XrdProofdProtocol::MaxBuffsz ( )
inlinestatic

Definition at line 72 of file XrdProofdProtocol.h.

◆ Mgr()

static XrdProofdManager * XrdProofdProtocol::Mgr ( )
inlinestatic

Definition at line 113 of file XrdProofdProtocol.h.

◆ Pid()

int XrdProofdProtocol::Pid ( ) const
inline

Definition at line 84 of file XrdProofdProtocol.h.

◆ Ping()

int XrdProofdProtocol::Ping ( )
private

Handle a ping request.

For internal connections, ping is done asynchronously to avoid locking problems; the session checker verifies that the admin file has been touched recently enough; touching is done in Process2, so we have nothing to do here

Definition at line 1174 of file XrdProofdProtocol.cxx.

◆ PostSession()

void XrdProofdProtocol::PostSession ( int  on,
const char *  u,
const char *  g,
XrdProofdProofServ xps 
)
staticprivate

Post change of session status.

Definition at line 1308 of file XrdProofdProtocol.cxx.

◆ Process()

int XrdProofdProtocol::Process ( XrdLink *  lp)

Process the information received on the active link.

(We ignore the argument here)

Definition at line 496 of file XrdProofdProtocol.cxx.

◆ Process2()

int XrdProofdProtocol::Process2 ( )
private

Local processing method: here the request is dispatched to the appropriate method.

Definition at line 558 of file XrdProofdProtocol.cxx.

◆ ProofProtocol()

short int XrdProofdProtocol::ProofProtocol ( ) const
inline

Definition at line 87 of file XrdProofdProtocol.h.

◆ Recycle()

void XrdProofdProtocol::Recycle ( XrdLink *  lp,
int  x,
const char *  y 
)

Recycle call. Release the instance and give it back to the stack.

Definition at line 627 of file XrdProofdProtocol.cxx.

◆ ReleaseBuff()

void XrdProofdProtocol::ReleaseBuff ( XrdBuffer *  argp)
static

Release a buffer previously allocated via GetBuff.

Definition at line 755 of file XrdProofdProtocol.cxx.

◆ Request()

XPClientRequest * XrdProofdProtocol::Request ( ) const
inline

Definition at line 91 of file XrdProofdProtocol.h.

◆ Reset()

void XrdProofdProtocol::Reset ( void  )
private

Reset static and local vars.

Definition at line 395 of file XrdProofdProtocol.cxx.

◆ ResetCtrlC()

void XrdProofdProtocol::ResetCtrlC ( )
inline

Definition at line 85 of file XrdProofdProtocol.h.

◆ Response()

XrdProofdResponse * XrdProofdProtocol::Response ( kXR_unt16  rid)

Get response instance corresponding to stream ID 'sid'.

Definition at line 237 of file XrdProofdProtocol.cxx.

◆ SendData()

int XrdProofdProtocol::SendData ( XrdProofdProofServ xps,
kXR_int32  sid = -1,
XrdSrvBuffer **  buf = 0,
bool  sb = 0 
)
private

Send data over the open link. Segmentation is done here, if required.

Definition at line 799 of file XrdProofdProtocol.cxx.

◆ SendDataN()

int XrdProofdProtocol::SendDataN ( XrdProofdProofServ xps,
XrdSrvBuffer **  buf = 0,
bool  savebuf = 0 
)
private

Send data over the open client links of session 'xps'.

Used when all the connected clients are eligible to receive the message. Segmentation is done here, if required.

Definition at line 875 of file XrdProofdProtocol.cxx.

◆ SendMsg()

int XrdProofdProtocol::SendMsg ( )
private

Handle a request to forward a message to another process.

Definition at line 925 of file XrdProofdProtocol.cxx.

◆ SetAdminPath()

void XrdProofdProtocol::SetAdminPath ( const char *  p)
inline

Definition at line 97 of file XrdProofdProtocol.h.

◆ SetAuthEntity()

void XrdProofdProtocol::SetAuthEntity ( XrdSecEntity *  se = 0)
inline

Definition at line 98 of file XrdProofdProtocol.h.

◆ SetAuthProt()

void XrdProofdProtocol::SetAuthProt ( XrdSecProtocol *  p)
inline

Definition at line 100 of file XrdProofdProtocol.h.

◆ SetCID()

void XrdProofdProtocol::SetCID ( kXR_int32  cid)
inline

Definition at line 103 of file XrdProofdProtocol.h.

◆ SetClient()

void XrdProofdProtocol::SetClient ( XrdProofdClient c)
inline

Definition at line 101 of file XrdProofdProtocol.h.

◆ SetClntCapVer()

void XrdProofdProtocol::SetClntCapVer ( unsigned char  c)
inline

Definition at line 102 of file XrdProofdProtocol.h.

◆ SetConnType()

void XrdProofdProtocol::SetConnType ( int  ct)
inline

Definition at line 104 of file XrdProofdProtocol.h.

◆ SetGroupIn()

void XrdProofdProtocol::SetGroupIn ( const char *  gin)
inline

Definition at line 105 of file XrdProofdProtocol.h.

◆ SetPid()

void XrdProofdProtocol::SetPid ( int  pid)
inline

Definition at line 107 of file XrdProofdProtocol.h.

◆ SetProofProtocol()

void XrdProofdProtocol::SetProofProtocol ( short int  pp)
inline

Definition at line 108 of file XrdProofdProtocol.h.

◆ SetStatus()

void XrdProofdProtocol::SetStatus ( char  s)
inline

Definition at line 109 of file XrdProofdProtocol.h.

◆ SetSuperUser()

void XrdProofdProtocol::SetSuperUser ( bool  su = 1)
inline

Definition at line 110 of file XrdProofdProtocol.h.

◆ SetTraceID()

void XrdProofdProtocol::SetTraceID ( )
inline

Definition at line 106 of file XrdProofdProtocol.h.

◆ SetUserIn()

void XrdProofdProtocol::SetUserIn ( const char *  uin)
inline

Definition at line 111 of file XrdProofdProtocol.h.

◆ Stats()

int XrdProofdProtocol::Stats ( char *  buff,
int  blen,
int  do_sync 
)

Return statistics info about the protocol.

Not really implemented yet: this is a reduced XrdXrootd version.

Definition at line 380 of file XrdProofdProtocol.cxx.

◆ Status()

char XrdProofdProtocol::Status ( ) const
inline

Definition at line 86 of file XrdProofdProtocol.h.

◆ SuperUser()

bool XrdProofdProtocol::SuperUser ( ) const
inline

Definition at line 88 of file XrdProofdProtocol.h.

◆ TouchAdminPath()

void XrdProofdProtocol::TouchAdminPath ( )
private

Recording time of the last request on this instance.

Definition at line 1350 of file XrdProofdProtocol.cxx.

◆ TraceID()

const char * XrdProofdProtocol::TraceID ( ) const
inline

Definition at line 80 of file XrdProofdProtocol.h.

◆ Urgent()

int XrdProofdProtocol::Urgent ( )
private

Handle generic request of a urgent message to be forwarded to the server.

Definition at line 1050 of file XrdProofdProtocol.cxx.

◆ UserIn()

const char * XrdProofdProtocol::UserIn ( ) const
inline

Definition at line 78 of file XrdProofdProtocol.h.

Member Data Documentation

◆ fAdminPath

XrdOucString XrdProofdProtocol::fAdminPath
private

Definition at line 149 of file XrdProofdProtocol.h.

◆ fArgp

XrdBuffer* XrdProofdProtocol::fArgp
private

Definition at line 134 of file XrdProofdProtocol.h.

◆ fAuthProt

XrdSecProtocol* XrdProofdProtocol::fAuthProt
private

Definition at line 154 of file XrdProofdProtocol.h.

◆ fCID

kXR_int32 XrdProofdProtocol::fCID
private

Definition at line 159 of file XrdProofdProtocol.h.

◆ fClntCapVer

unsigned char XrdProofdProtocol::fClntCapVer
private

Definition at line 141 of file XrdProofdProtocol.h.

◆ fConnType

kXR_int32 XrdProofdProtocol::fConnType
private

Definition at line 157 of file XrdProofdProtocol.h.

◆ fCtrlcMutex

XrdSysRecMutex XrdProofdProtocol::fCtrlcMutex
private

Definition at line 162 of file XrdProofdProtocol.h.

◆ fgBMutex

XrdSysRecMutex XrdProofdProtocol::fgBMutex
staticprivate

Definition at line 181 of file XrdProofdProtocol.h.

◆ fgBPool

XrdBuffManager * XrdProofdProtocol::fgBPool = 0
staticprivate

Definition at line 179 of file XrdProofdProtocol.h.

◆ fgConfigDone

bool XrdProofdProtocol::fgConfigDone = 0
staticprivate

Definition at line 176 of file XrdProofdProtocol.h.

◆ fgCount

int XrdProofdProtocol::fgCount = 0
staticprivate

Definition at line 177 of file XrdProofdProtocol.h.

◆ fgEDest

XrdSysError XrdProofdProtocol::fgEDest
staticprivate

Definition at line 183 of file XrdProofdProtocol.h.

◆ fgEUidAtStartup

int XrdProofdProtocol::fgEUidAtStartup = -1
staticprivate

Definition at line 186 of file XrdProofdProtocol.h.

◆ fgLogger

XrdSysLogger * XrdProofdProtocol::fgLogger = 0
staticprivate

Definition at line 184 of file XrdProofdProtocol.h.

◆ fgMaxBuffsz

int XrdProofdProtocol::fgMaxBuffsz = 0
staticprivate

Definition at line 180 of file XrdProofdProtocol.h.

◆ fgMgr

XrdProofdManager * XrdProofdProtocol::fgMgr = 0
staticprivate

Definition at line 191 of file XrdProofdProtocol.h.

◆ fgProtStack

XpdObjectQ XrdProofdProtocol::fgProtStack
staticprivate

Definition at line 178 of file XrdProofdProtocol.h.

◆ fgReadWait

int XrdProofdProtocol::fgReadWait = 0
staticprivate

Definition at line 190 of file XrdProofdProtocol.h.

◆ fGroupIn

XrdOucString XrdProofdProtocol::fGroupIn
private

Definition at line 147 of file XrdProofdProtocol.h.

◆ fIsCtrlC

bool XrdProofdProtocol::fIsCtrlC
private

Definition at line 164 of file XrdProofdProtocol.h.

◆ fLink

XrdLink* XrdProofdProtocol::fLink
private

Definition at line 136 of file XrdProofdProtocol.h.

◆ fMutex

XrdSysRecMutex XrdProofdProtocol::fMutex
private

Definition at line 161 of file XrdProofdProtocol.h.

◆ fPClient

XrdProofdClient* XrdProofdProtocol::fPClient
private

Definition at line 148 of file XrdProofdProtocol.h.

◆ fPid

int XrdProofdProtocol::fPid
private

Definition at line 137 of file XrdProofdProtocol.h.

◆ fProofProtocol

short int XrdProofdProtocol::fProofProtocol
private

Definition at line 142 of file XrdProofdProtocol.h.

◆ fProtLink

XpdObject XrdProofdProtocol::fProtLink
private

Definition at line 133 of file XrdProofdProtocol.h.

◆ fRequest

XPClientRequest XrdProofdProtocol::fRequest
private

Definition at line 170 of file XrdProofdProtocol.h.

◆ fResponses

std::vector<XrdProofdResponse *> XrdProofdProtocol::fResponses
private

Definition at line 171 of file XrdProofdProtocol.h.

◆ fSecClient

XrdSecEntity* XrdProofdProtocol::fSecClient
private

Definition at line 153 of file XrdProofdProtocol.h.

◆ fSecEntity

XrdSecEntity XrdProofdProtocol::fSecEntity
private

Definition at line 155 of file XrdProofdProtocol.h.

◆ fStatus

char XrdProofdProtocol::fStatus
private

Definition at line 139 of file XrdProofdProtocol.h.

◆ fStdErrFD

int XrdProofdProtocol::fStdErrFD
private

Definition at line 166 of file XrdProofdProtocol.h.

◆ fSuperUser

bool XrdProofdProtocol::fSuperUser
private

Definition at line 144 of file XrdProofdProtocol.h.

◆ fTraceID

XrdOucString XrdProofdProtocol::fTraceID
private

Definition at line 151 of file XrdProofdProtocol.h.

◆ fUserIn

XrdOucString XrdProofdProtocol::fUserIn
private

Definition at line 146 of file XrdProofdProtocol.h.


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