00001 #ifndef __XRDOUCREQID__
00002 #define __XRDOUCREQID__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include <stdlib.h>
00016 #ifndef WIN32
00017 #include <strings.h>
00018 #endif
00019
00020 #include "XrdSys/XrdSysPthread.hh"
00021
00022 class XrdOucReqID
00023 {
00024 public:
00025
00026 static char *ID(char *buff, int blen);
00027
00028 static int isMine(char *reqid)
00029 {return !strncmp((const char *)reqPFX,(const char *)reqid,reqPFXlen);}
00030
00031 static int isMine(char *reqid, int &hport, char *hname, int hlen);
00032
00033 static char *PFX() {return reqPFX;}
00034
00035 static int Index(int KeyMax, const char *KeyVal, int KeyLen=0);
00036
00037 XrdOucReqID(int instance, const char *myhost, unsigned int myaddr);
00038 ~XrdOucReqID() {}
00039
00040 private:
00041
00042 static XrdSysMutex myMutex;
00043 static int reqPFXlen;
00044 static char *reqPFX;
00045 static char *reqFMT;
00046 static int reqNum;
00047 };
00048 #endif