xrootd
XrdXrootdAdmin.hh
Go to the documentation of this file.
1 #ifndef __XROOTDADMIN__
2 #define __XROOTDADMIN__
3 /******************************************************************************/
4 /* */
5 /* X r d X r o o t d A d m i n . h h */
6 /* */
7 /* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC03-76-SFO0515 with the Department of Energy */
11 /******************************************************************************/
12 
13 // $Id$
14 
15 #include <stdlib.h>
16 #include <netinet/in.h>
17 
18 #include "Xrd/XrdLinkMatch.hh"
19 #include "XrdOuc/XrdOucStream.hh"
20 #include "XProtocol/XProtocol.hh"
21 
22 class XrdNetSocket;
23 class XrdXrootdJob;
24 
26 {
27 public:
28 
29 static void addJob(const char *jname, XrdXrootdJob *jp);
30 
31 static int Init(XrdSysError *erp, XrdNetSocket *asock);
32 
33  void Login(int socknum);
34 
35  void *Start(XrdNetSocket *AdminSock);
36 
39 
40 private:
41 int do_Abort();
42 int do_Cj();
43 int do_Cont();
44 int do_Disc();
45 int do_Login();
46 int do_Lsc();
47 int do_Lsj();
48 int do_Lsj_Xeq(XrdXrootdJob *jp);
49 int do_Lsd();
50 int do_Msg();
51 int do_Pause();
52 int do_Red();
53 char *getMsg(char *msg, int &mlen);
54 int getreqID();
55 int getTarget(const char *act, char **rest=0);
56 int sendErr(int rc, const char *act, const char *msg);
57 int sendOK(int sent);
58 int sendResp(const char *act, XActionCode anum);
59 int sendResp(const char *act, XActionCode anum,
60  const char *msg, int mlen);
61 void Xeq();
62 
63 struct JobTable {struct JobTable *Next;
64  char *Jname;
66  };
67 
68 static JobTable *JobList;
69 
73 
74 struct usr {kXR_unt16 pad;
78  usr() {pad = 0; atn = htons(kXR_attn);}
79  ~usr() {}
80  } usResp;
81  char TraceID[24];
82  char reqID[16];
83 };
84 #endif