12 #ifndef ROOT_XrdProofdProtocol 13 #define ROOT_XrdProofdProtocol 35 #define XPROOFD_VERSBIN 0x000003EF 36 #define XPROOFD_VERSION "0.7" 40 #include "Xrd/XrdLink.hh" 41 #include "Xrd/XrdProtocol.hh" 42 #include "XrdOuc/XrdOucString.hh" 43 #include "XrdSec/XrdSecInterface.hh" 61 XrdProtocol *
Match(XrdLink *lp);
63 void Recycle(XrdLink *lp,
int x,
const char *
y);
64 int Stats(
char *buff,
int blen,
int do_sync);
66 static int Configure(
char *parms, XrdProtocol_Config *
pi);
69 int GetData(
const char *dtype,
char *buff,
int blen);
70 static XrdBuffer *
GetBuff(
int quantum, XrdBuffer *argp = 0);
75 inline kXR_int32
CID()
const {
return fCID; }
127 int StartRootd(XrdLink *lp, XrdOucString &emsg);
194 static void PostSession(
int on,
const char *u,
const char *g,
198 #define XPD_SETRESP(p, x) \ 200 memcpy((void *)&rid, (const void *)&(p->Request()->header.streamid[0]), 2); \ 201 XrdProofdResponse *response = p->Response(rid); \ 203 TRACEP(p, XERR, x << ": could not get Response instance for requid:"<< rid); \ 207 #define XPD_SETRESPV(p, x) \ 209 memcpy((void *)&rid, (const void *)&(p->Request()->header.streamid[0]), 2); \ 210 XrdProofdResponse *response = p->Response(rid); \ 212 TRACEP(p, XERR, x << ": could not get Response instance for requid:"<< rid); \ 216 #define XPD_CLNT_VERSION_OK(p,v) (v < 0 || (p && p->ProofProtocol() >= v))
static void PostSession(int on, const char *u, const char *g, XrdProofdProofServ *xps)
Post change of session status.
static XpdObjectQ fgProtStack
static XrdSysLogger * fgLogger
XrdSecEntity * fSecClient
XrdProtocol * Match(XrdLink *lp)
Check whether the request matches this protocol.
const char * TraceID() const
virtual ~XrdProofdProtocol()
void SetAuthProt(XrdSecProtocol *p)
static XrdSysError fgEDest
void SetAdminPath(const char *p)
static XrdSysRecMutex fgBMutex
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 ...
const char * UserIn() const
void SetCID(kXR_int32 cid)
static int Configure(char *parms, XrdProtocol_Config *pi)
Protocol configuration tool Function: Establish configuration at load time.
void SetUserIn(const char *uin)
short int ProofProtocol() const
static XrdBuffManager * fgBPool
static XrdProofdManager * fgMgr
std::vector< XrdProofdResponse * > fResponses
void Reset()
Reset static and local vars.
static int EUidAtStartup()
XrdProofdClient * fPClient
XrdSecProtocol * fAuthProt
const char * GroupIn() const
unsigned char fClntCapVer
XPClientRequest * Request() const
XrdProofdResponse * Response(kXR_unt16 rid)
Get response instance corresponding to stream ID 'sid'.
#define XrdSysMutexHelper
void Recycle(XrdLink *lp, int x, const char *y)
Recycle call. Release the instance and give it back to the stack.
void SetProofProtocol(short int pp)
XrdSecProtocol * AuthProt() const
void SetClntCapVer(unsigned char c)
void SetAuthEntity(XrdSecEntity *se=0)
int GetData(const char *dtype, char *buff, int blen)
Get data from the open link.
XrdProofdProtocol(XrdProtocol_Config *pi=0)
Protocol constructor.
void SetClient(XrdProofdClient *c)
void TouchAdminPath()
Recording time of the last request on this instance.
int Process2()
Local processing method: here the request is dispatched to the appropriate method.
void SetSuperUser(bool su=1)
XrdSysRecMutex fCtrlcMutex
XrdProofdResponse * GetNewResponse(kXR_unt16 rid)
Create new response instance for stream ID 'sid'.
int Ping()
Handle a ping request.
static int fgEUidAtStartup
int Process(XrdLink *lp)
Process the information received on the active link.
int StartRootd(XrdLink *lp, XrdOucString &emsg)
Transfer the connection to a rootd daemon to serve a file access request Return 0 on success...
int Urgent()
Handle generic request of a urgent message to be forwarded to the server.
static void ReleaseBuff(XrdBuffer *argp)
Release a buffer previously allocated via GetBuff.
int Stats(char *buff, int blen, int do_sync)
Return statistics info about the protocol.
int Interrupt()
Handle an interrupt request.
int SendDataN(XrdProofdProofServ *xps, XrdSrvBuffer **buf=0, bool sb=0)
Send data over the open client links of session 'xps'.
int SendMsg()
Handle a request to forward a message to another process.
static XrdProofdManager * Mgr()
int CtrlC()
Set and propagate a Ctrl-C request.
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.
XrdProofdClient * Client() const
void SetGroupIn(const char *gin)