ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
XrdProofdProtocol Class Reference

Definition at line 54 of file XrdProofdProtocol.h.

Public Member Functions

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

Static Public Member Functions

static int Configure (char *parms, XrdProtocol_Config *pi)
 Protocol configuration tool Function: Establish configuration at load time. More...
 
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 void ReleaseBuff (XrdBuffer *argp)
 Release a buffer previously allocated via GetBuff. More...
 
static int MaxBuffsz ()
 
static XrdProofdManagerMgr ()
 
static int EUidAtStartup ()
 

Private Member Functions

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...
 
int CtrlC ()
 Set and propagate a Ctrl-C request. More...
 
int StartRootd (XrdLink *lp, XrdOucString &emsg)
 Transfer the connection to a rootd daemon to serve a file access request Return 0 on success, -1 on failure. 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

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

Static Private Attributes

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

#include <XrdProofdProtocol.h>

Inheritance diagram for XrdProofdProtocol:
[legend]

Constructor & Destructor Documentation

XrdProofdProtocol::XrdProofdProtocol ( XrdProtocol_Config *  pi = 0)

Protocol constructor.

Definition at line 218 of file XrdProofdProtocol.cxx.

Referenced by Match().

virtual XrdProofdProtocol::~XrdProofdProtocol ( )
inlinevirtual

Definition at line 58 of file XrdProofdProtocol.h.

Member Function Documentation

XrdBuffer* XrdProofdProtocol::Argp ( ) const
inline
XrdSecProtocol* XrdProofdProtocol::AuthProt ( ) const
inline
kXR_int32 XrdProofdProtocol::CID ( ) const
inline
XrdProofdClient* XrdProofdProtocol::Client ( ) const
inline
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 530 of file XrdProofdProtocol.cxx.

Referenced by XrdgetProtocol().

int XrdProofdProtocol::ConnType ( ) const
inline
int XrdProofdProtocol::CtrlC ( )
private

Set and propagate a Ctrl-C request.

Definition at line 1483 of file XrdProofdProtocol.cxx.

Referenced by Process2().

void XrdProofdProtocol::DoIt ( )
inline

Definition at line 60 of file XrdProofdProtocol.h.

static int XrdProofdProtocol::EUidAtStartup ( )
inlinestatic
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 822 of file XrdProofdProtocol.cxx.

Referenced by Process(), XrdProofdAdmin::PutFile(), SendData(), and SendDataN().

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

Get data from the open link.

Definition at line 865 of file XrdProofdProtocol.cxx.

Referenced by Match(), Process(), XrdProofdAdmin::PutFile(), SendData(), and SendDataN().

XrdProofdResponse * XrdProofdProtocol::GetNewResponse ( kXR_unt16  rid)
private

Create new response instance for stream ID 'sid'.

Definition at line 253 of file XrdProofdProtocol.cxx.

Referenced by Process().

const char* XrdProofdProtocol::GroupIn ( ) const
inline

Definition at line 77 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::CheckClient().

bool XrdProofdProtocol::Internal ( )
inline

Definition at line 81 of file XrdProofdProtocol.h.

Referenced by Ping(), Recycle(), SendMsg(), and TouchAdminPath().

int XrdProofdProtocol::Interrupt ( )
private

Handle an interrupt request.

Definition at line 1219 of file XrdProofdProtocol.cxx.

Referenced by Process2().

bool XrdProofdProtocol::IsCtrlC ( )
inline

Definition at line 82 of file XrdProofdProtocol.h.

Referenced by XrdProofdAdmin::CpFile(), and XrdProofdAdmin::ExecCmd().

XrdLink* XrdProofdProtocol::Link ( ) const
inline
XrdProtocol * XrdProofdProtocol::Match ( XrdLink *  lp)

Check whether the request matches this protocol.

Definition at line 291 of file XrdProofdProtocol.cxx.

Referenced by XrdProofdProofServMgr::SetupProtocol().

static int XrdProofdProtocol::MaxBuffsz ( )
inlinestatic

Definition at line 72 of file XrdProofdProtocol.h.

Referenced by XrdProofdAdmin::PutFile().

static XrdProofdManager* XrdProofdProtocol::Mgr ( )
inlinestatic

Definition at line 113 of file XrdProofdProtocol.h.

int XrdProofdProtocol::Pid ( ) const
inline
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 1275 of file XrdProofdProtocol.cxx.

Referenced by Process2().

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

Post change of session status.

Definition at line 1409 of file XrdProofdProtocol.cxx.

Referenced by SendMsg().

int XrdProofdProtocol::Process ( XrdLink *  lp)

Process the information received on the active link.

(We ignore the argument here)

Definition at line 597 of file XrdProofdProtocol.cxx.

Referenced by XrdProofdAdmin::CpFile(), and XrdProofdAdmin::ExecCmd().

int XrdProofdProtocol::Process2 ( )
private

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

Definition at line 659 of file XrdProofdProtocol.cxx.

Referenced by Process().

short int XrdProofdProtocol::ProofProtocol ( ) const
inline
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 728 of file XrdProofdProtocol.cxx.

Referenced by Match().

void XrdProofdProtocol::ReleaseBuff ( XrdBuffer *  argp)
static

Release a buffer previously allocated via GetBuff.

Definition at line 856 of file XrdProofdProtocol.cxx.

Referenced by XrdProofdAdmin::PutFile(), and SendDataN().

XPClientRequest* XrdProofdProtocol::Request ( ) const
inline
void XrdProofdProtocol::Reset ( void  )
private

Reset static and local vars.

Definition at line 496 of file XrdProofdProtocol.cxx.

Referenced by Recycle(), and XrdProofdProtocol().

void XrdProofdProtocol::ResetCtrlC ( )
inline

Definition at line 85 of file XrdProofdProtocol.h.

XrdProofdResponse * XrdProofdProtocol::Response ( kXR_unt16  rid)

Get response instance corresponding to stream ID 'sid'.

Definition at line 237 of file XrdProofdProtocol.cxx.

Referenced by XrdProofdProofServ::Broadcast(), XrdProofdClientMgr::MapClient(), Process(), and XrdClientID::SetR().

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 900 of file XrdProofdProtocol.cxx.

Referenced by SendMsg().

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 976 of file XrdProofdProtocol.cxx.

Referenced by SendMsg().

int XrdProofdProtocol::SendMsg ( )
private

Handle a request to forward a message to another process.

Definition at line 1026 of file XrdProofdProtocol.cxx.

Referenced by Process2().

void XrdProofdProtocol::SetAdminPath ( const char *  p)
inline
void XrdProofdProtocol::SetAuthEntity ( XrdSecEntity *  se = 0)
inline

Definition at line 98 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::Auth(), and XrdProofdClientMgr::Login().

void XrdProofdProtocol::SetAuthProt ( XrdSecProtocol *  p)
inline

Definition at line 100 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::Auth().

void XrdProofdProtocol::SetCID ( kXR_int32  cid)
inline

Definition at line 103 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::MapClient().

void XrdProofdProtocol::SetClient ( XrdProofdClient c)
inline
void XrdProofdProtocol::SetClntCapVer ( unsigned char  c)
inline

Definition at line 102 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::Login().

void XrdProofdProtocol::SetConnType ( int  ct)
inline

Definition at line 104 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::Login().

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

Definition at line 105 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::Login().

void XrdProofdProtocol::SetPid ( int  pid)
inline

Definition at line 107 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::Login().

void XrdProofdProtocol::SetProofProtocol ( short int  pp)
inline

Definition at line 108 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::MapClient().

void XrdProofdProtocol::SetStatus ( char  s)
inline

Definition at line 109 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::Auth(), and XrdProofdClientMgr::Login().

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

Definition at line 110 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::CheckClient().

void XrdProofdProtocol::SetTraceID ( )
inline

Definition at line 106 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::Login().

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

Definition at line 111 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::Login().

int XrdProofdProtocol::StartRootd ( XrdLink *  lp,
XrdOucString &  emsg 
)
private

Transfer the connection to a rootd daemon to serve a file access request Return 0 on success, -1 on failure.

Definition at line 382 of file XrdProofdProtocol.cxx.

Referenced by Match().

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 481 of file XrdProofdProtocol.cxx.

char XrdProofdProtocol::Status ( ) const
inline
bool XrdProofdProtocol::SuperUser ( ) const
inline
void XrdProofdProtocol::TouchAdminPath ( )
private

Recording time of the last request on this instance.

Definition at line 1451 of file XrdProofdProtocol.cxx.

Referenced by Process2().

const char* XrdProofdProtocol::TraceID ( ) const
inline

Definition at line 80 of file XrdProofdProtocol.h.

int XrdProofdProtocol::Urgent ( )
private

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

Definition at line 1151 of file XrdProofdProtocol.cxx.

Referenced by Process2().

const char* XrdProofdProtocol::UserIn ( ) const
inline

Definition at line 78 of file XrdProofdProtocol.h.

Referenced by XrdProofdClientMgr::Auth(), and XrdProofdClientMgr::Login().

Member Data Documentation

XrdOucString XrdProofdProtocol::fAdminPath
private

Definition at line 150 of file XrdProofdProtocol.h.

Referenced by Recycle(), Reset(), SetAdminPath(), and TouchAdminPath().

XrdBuffer* XrdProofdProtocol::fArgp
private

Definition at line 135 of file XrdProofdProtocol.h.

Referenced by Argp(), Process(), Recycle(), Reset(), and XrdProofdProtocol().

XrdSecProtocol* XrdProofdProtocol::fAuthProt
private

Definition at line 155 of file XrdProofdProtocol.h.

Referenced by AuthProt(), Reset(), SetAuthProt(), and XrdProofdProtocol().

kXR_int32 XrdProofdProtocol::fCID
private

Definition at line 160 of file XrdProofdProtocol.h.

Referenced by CID(), Recycle(), Reset(), SendMsg(), and SetCID().

unsigned char XrdProofdProtocol::fClntCapVer
private

Definition at line 142 of file XrdProofdProtocol.h.

Referenced by Reset(), and SetClntCapVer().

kXR_int32 XrdProofdProtocol::fConnType
private

Definition at line 158 of file XrdProofdProtocol.h.

Referenced by ConnType(), Internal(), Recycle(), Reset(), and SetConnType().

XrdSysRecMutex XrdProofdProtocol::fCtrlcMutex
private

Definition at line 163 of file XrdProofdProtocol.h.

Referenced by CtrlC(), IsCtrlC(), and ResetCtrlC().

XrdSysRecMutex XrdProofdProtocol::fgBMutex
staticprivate

Definition at line 182 of file XrdProofdProtocol.h.

Referenced by GetBuff(), ReleaseBuff(), and SendData().

XrdBuffManager * XrdProofdProtocol::fgBPool = 0
staticprivate

Definition at line 180 of file XrdProofdProtocol.h.

Referenced by Configure(), GetBuff(), Recycle(), ReleaseBuff(), and SendData().

bool XrdProofdProtocol::fgConfigDone = 0
staticprivate

Definition at line 177 of file XrdProofdProtocol.h.

Referenced by Configure().

int XrdProofdProtocol::fgCount = 0
staticprivate

Definition at line 178 of file XrdProofdProtocol.h.

Referenced by Stats().

XrdSysError XrdProofdProtocol::fgEDest
staticprivate

Definition at line 184 of file XrdProofdProtocol.h.

Referenced by Configure().

int XrdProofdProtocol::fgEUidAtStartup = -1
staticprivate

Definition at line 187 of file XrdProofdProtocol.h.

Referenced by Configure(), and EUidAtStartup().

XrdSysLogger * XrdProofdProtocol::fgLogger = 0
staticprivate

Definition at line 185 of file XrdProofdProtocol.h.

Referenced by Configure().

int XrdProofdProtocol::fgMaxBuffsz = 0
staticprivate

Definition at line 181 of file XrdProofdProtocol.h.

Referenced by Configure(), MaxBuffsz(), SendData(), and SendDataN().

XrdProofdManager * XrdProofdProtocol::fgMgr = 0
staticprivate
XpdObjectQ XrdProofdProtocol::fgProtStack
staticprivate

Definition at line 179 of file XrdProofdProtocol.h.

Referenced by Configure(), Match(), and Recycle().

int XrdProofdProtocol::fgReadWait = 0
staticprivate

Definition at line 191 of file XrdProofdProtocol.h.

Referenced by Configure(), GetData(), and Match().

XrdOucString XrdProofdProtocol::fGroupIn
private

Definition at line 148 of file XrdProofdProtocol.h.

Referenced by GroupIn(), Reset(), and SetGroupIn().

bool XrdProofdProtocol::fIsCtrlC
private

Definition at line 165 of file XrdProofdProtocol.h.

Referenced by CtrlC(), IsCtrlC(), and ResetCtrlC().

XrdLink* XrdProofdProtocol::fLink
private
XrdSysRecMutex XrdProofdProtocol::fMutex
private

Definition at line 162 of file XrdProofdProtocol.h.

Referenced by SetAdminPath().

XrdProofdClient* XrdProofdProtocol::fPClient
private
int XrdProofdProtocol::fPid
private

Definition at line 138 of file XrdProofdProtocol.h.

Referenced by Pid(), Recycle(), Reset(), and SetPid().

short int XrdProofdProtocol::fProofProtocol
private

Definition at line 143 of file XrdProofdProtocol.h.

Referenced by ProofProtocol(), and SetProofProtocol().

XpdObject XrdProofdProtocol::fProtLink
private

Definition at line 134 of file XrdProofdProtocol.h.

Referenced by Recycle().

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

Definition at line 172 of file XrdProofdProtocol.h.

Referenced by GetNewResponse(), Reset(), Response(), and XrdProofdProtocol().

XrdSecEntity* XrdProofdProtocol::fSecClient
private

Definition at line 154 of file XrdProofdProtocol.h.

Referenced by SetAuthEntity(), and XrdProofdProtocol().

XrdSecEntity XrdProofdProtocol::fSecEntity
private

Definition at line 156 of file XrdProofdProtocol.h.

Referenced by Match(), Reset(), and SetAuthEntity().

char XrdProofdProtocol::fStatus
private

Definition at line 140 of file XrdProofdProtocol.h.

Referenced by Process2(), Reset(), SetStatus(), and Status().

int XrdProofdProtocol::fStdErrFD
private

Definition at line 167 of file XrdProofdProtocol.h.

Referenced by StartRootd(), and XrdProofdProtocol().

bool XrdProofdProtocol::fSuperUser
private

Definition at line 145 of file XrdProofdProtocol.h.

Referenced by Reset(), SetSuperUser(), and SuperUser().

XrdOucString XrdProofdProtocol::fTraceID
private

Definition at line 152 of file XrdProofdProtocol.h.

Referenced by Reset(), SetTraceID(), and TraceID().

XrdOucString XrdProofdProtocol::fUserIn
private

Definition at line 147 of file XrdProofdProtocol.h.

Referenced by Reset(), SetUserIn(), and UserIn().

Collaboration diagram for XrdProofdProtocol:
[legend]

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