00001 #ifndef __XrdProtLoad_H__
00002 #define __XrdProtLoad_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "Xrd/XrdProtocol.hh"
00016
00017 class XrdSysPlugin;
00018
00019
00020
00021 class XrdProtLoad : public XrdProtocol
00022 {
00023 public:
00024
00025 void DoIt() {}
00026
00027 static int Load(const char *lname, const char *pname, char *parms,
00028 XrdProtocol_Config *pi);
00029
00030 static int Port(const char *lname, const char *pname, char *parms,
00031 XrdProtocol_Config *pi);
00032
00033 XrdProtocol *Match(XrdLink *) {return 0;}
00034
00035 int Process(XrdLink *lp);
00036
00037 void Recycle(XrdLink *lp, int ctime, const char *txt);
00038
00039 int Stats(char *buff, int blen, int do_sync=0);
00040
00041 XrdProtLoad(int port=-1);
00042 ~XrdProtLoad();
00043
00044 static const int ProtoMax = 8;
00045
00046 private:
00047
00048 static XrdProtocol *getProtocol (const char *lname, const char *pname,
00049 char *parms, XrdProtocol_Config *pi);
00050 static int getProtocolPort(const char *lname, const char *pname,
00051 char *parms, XrdProtocol_Config *pi);
00052
00053 static char *ProtName[ProtoMax];
00054 static XrdProtocol *Protocol[ProtoMax];
00055 static int ProtPort[ProtoMax];
00056 static XrdProtocol *ProtoWAN[ProtoMax];
00057 static int ProtoCnt;
00058 static int ProtWCnt;
00059
00060 static char *liblist[ProtoMax];
00061 static XrdSysPlugin *libhndl[ProtoMax];
00062 static int libcnt;
00063
00064 int myPort;
00065 };
00066 #endif