12 #ifndef ROOT_XrdProofdProofServ 13 #define ROOT_XrdProofdProofServ 18 #if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__APPLE__) 29 #include "Xrd/XrdLink.hh" 30 #include "XrdOuc/XrdOucHash.hh" 54 if (dup && bp && sz > 0) {
85 XrdProofQuery(
const char *t,
const char *
n =
"",
long s = 0) : fTag(t), fDSName(
n), fDSSize(s) { }
87 const char *
GetTag() {
return fTag.c_str(); }
104 #define kXPROOFSRVTAGMAX 64 105 #define kXPROOFSRVALIASMAX 256 123 int CheckSession(
bool oldvers,
bool isrec,
124 int shutopt,
int shutdel,
bool changeown,
int &nc);
127 {
XrdSysMutexHelper mhp(fMutex);
if (fStartMsg)
delete fStartMsg; fStartMsg = 0;}
128 int DisconnectTime();
131 if (q) { fQueries.push_back(q); };
return fQueries.size(); }
132 void ExportBuf(XrdOucString &buf);
133 void ExportWorkers(XrdOucString &wrks);
137 int GetNClients(
bool check);
151 inline std::list<XrdProofQuery *> *
Queries()
const 152 {
return (std::list<XrdProofQuery *> *)&fQueries; }
153 void RemoveQuery(
const char *tag);
154 void RemoveWorker(
const char *o);
161 int SendData(
int cid,
void *buff,
int len);
162 int SendDataN(
void *buff,
int len);
163 void SendClusterInfo(
int nsess,
int nacti);
164 int SetAdminPath(
const char *
a,
bool assert,
bool setown);
196 int TerminateProofServ(
bool changeown);
198 int VerifyProofServ(
bool fw);
199 inline XrdOucHash<XrdProofWorker> *
Workers()
const 200 {
XrdSysMutexHelper mhp(fMutex);
return (XrdOucHash<XrdProofWorker> *)&fWorkers; }
204 void DeleteUNIXSock();
XrdProofdResponse * Response() const
XrdOucString fUNIXSockPath
void SetParent(XrdClientID *cid)
static int BroadcastPriority(const char *, XrdProofdProofServ *ps, void *s)
Run thorugh entries to broadcast the relevant priority.
int Enqueue(XrdProofQuery *q)
void SetAlias(const char *a)
bool Match(short int id) const
XrdOucHash< XrdProofWorker > fWorkers
void SetPLiteNWrks(int n)
static int FreeClientID(const char *, XrdProofdProofServ *ps, void *s)
Run through entries to reset the disconnecting client slots.
std::list< XrdProofQuery * > fQueries
XrdClientID * Parent() const
void SetOrdinal(const char *o)
XrdProofdResponse * fResponse
XrdSrvBuffer(char *bp=0, int sz=0, bool dup=0)
const char * UNIXSockPath() const
std::list< XrdProofQuery * > * Queries() const
void SetProtocol(XrdProofdProtocol *p)
XrdProofQuery(const char *t, const char *n="", long s=0)
const char * Client() const
void SetUNIXSockPath(const char *s)
void SetGroup(const char *g)
XrdProofdProtocol * Protocol() const
void SetFileout(const char *f)
XrdSrvBuffer * StartMsg() const
const char * Ordinal() const
int changeown(const std::string &path, uid_t u, gid_t g)
Change the ownership of 'path' to the entity described by {u,g}.
#define XrdSysMutexHelper
const char * AdminPath() const
void Reset(Detail::TBranchProxy *x)
void SetTag(const char *t)
const char * UserEnvs() const
void SetConnection(XrdProofdResponse *r)
XrdNet * UNIXSock() const
const char * Alias() const
void SetValid(bool valid=1)
void SetUserEnvs(const char *t)
XrdOucHash< XrdProofWorker > * Workers() const
XrdProofdProtocol * fProtocol
const char * Fileout() const
std::vector< XrdClientID * > fClients
void SetStartMsg(XrdSrvBuffer *sm)
void SetClient(const char *c)
const char * Group() const
XrdProofQuery * CurrentQuery()