xrootd
XrdFrmMonitor.hh
Go to the documentation of this file.
1 #ifndef __XRDFRMMONITOR__
2 #define __XRDFRMMONITOR__
3 /******************************************************************************/
4 /* */
5 /* X r d F r m M o n i t o r . h h */
6 /* */
7 /* (c) 2010 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-AC02-76-SFO0515 with the Department of Energy */
11 /* */
12 /* This file is part of the XRootD software suite. */
13 /* */
14 /* XRootD is free software: you can redistribute it and/or modify it under */
15 /* the terms of the GNU Lesser General Public License as published by the */
16 /* Free Software Foundation, either version 3 of the License, or (at your */
17 /* option) any later version. */
18 /* */
19 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22 /* License for more details. */
23 /* */
24 /* You should have received a copy of the GNU Lesser General Public License */
25 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27 /* */
28 /* The copyright holder's institutional names and contributor's names may not */
29 /* be used to endorse or promote products derived from this software without */
30 /* specific prior written permission of the institution or contributor. */
31 /******************************************************************************/
32 
33 #include <inttypes.h>
34 #include <time.h>
35 #include <sys/types.h>
36 
38 #include "XProtocol/XPtypes.hh"
39 
40 #define XROOTD_MON_INFO 1
41 #define XROOTD_MON_STAGE 2
42 #define XROOTD_MON_MIGR 4
43 #define XROOTD_MON_PURGE 8
44 
45 class XrdNetMsg;
46 
48 {
49 public:
50 
51 static void Defaults(char *dest1, int m1, char *dest2, int m2,
52  int iTime);
53 
54 static void Ident();
55 
56 static int Init(const char *iHost, const char *iProg,
57  const char *iName);
58 
59 static kXR_unt32 Map(char code, const char *uname, const char *path);
60 
61 static char monMIGR;
62 static char monPURGE;
63 static char monSTAGE;
64 
65  XrdFrmMonitor();
66  ~XrdFrmMonitor();
67 
68 private:
69 static void fillHeader(XrdXrootdMonHeader *hdr,
70  const char id, int size);
71 static int Send(int mmode, void *buff, int size);
72 
73 static char *Dest1;
74 static int monMode1;
76 static char *Dest2;
77 static int monMode2;
80 static int isEnabled;
81 static char *idRec;
82 static int idLen;
83 static int sidSize;
84 static char *sidName;
85 static int idTime;
86 };
87 #endif
static char * Dest2
Definition: XrdFrmMonitor.hh:76
static int sidSize
Definition: XrdFrmMonitor.hh:83
static int monMode2
Definition: XrdFrmMonitor.hh:77
static void Defaults(char *dest1, int m1, char *dest2, int m2, int iTime)
static int monMode1
Definition: XrdFrmMonitor.hh:74
static kXR_unt32 Map(char code, const char *uname, const char *path)
Definition: XrdNetMsg.hh:48
static int Init(const char *iHost, const char *iProg, const char *iName)
static int idTime
Definition: XrdFrmMonitor.hh:85
static kXR_int32 startTime
Definition: XrdFrmMonitor.hh:79
Definition: XrdFrmMonitor.hh:47
static char monPURGE
Definition: XrdFrmMonitor.hh:62
static int idLen
Definition: XrdFrmMonitor.hh:82
static char * idRec
Definition: XrdFrmMonitor.hh:81
static XrdNetMsg * InetDest2
Definition: XrdFrmMonitor.hh:78
static char * sidName
Definition: XrdFrmMonitor.hh:84
static void fillHeader(XrdXrootdMonHeader *hdr, const char id, int size)
static char monMIGR
Definition: XrdFrmMonitor.hh:61
unsigned int kXR_unt32
Definition: XPtypes.hh:90
static int isEnabled
Definition: XrdFrmMonitor.hh:80
Definition: XrdXrootdMonData.hh:39
static void Ident()
int kXR_int32
Definition: XPtypes.hh:89
static XrdNetMsg * InetDest1
Definition: XrdFrmMonitor.hh:75
static int Send(int mmode, void *buff, int size)
static char monSTAGE
Definition: XrdFrmMonitor.hh:63
static char * Dest1
Definition: XrdFrmMonitor.hh:73