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-AC03-76-SFO0515 with the Department of Energy */
11 /******************************************************************************/
12 
13 #include <inttypes.h>
14 #include <time.h>
15 #include <netinet/in.h>
16 #include <sys/types.h>
17 
18 #include "XrdNet/XrdNetPeer.hh"
20 #include "XProtocol/XPtypes.hh"
21 
22 #define XROOTD_MON_INFO 1
23 #define XROOTD_MON_STAGE 2
24 #define XROOTD_MON_MIGR 4
25 #define XROOTD_MON_PURGE 8
26 
28 {
29 public:
30 
31 static void Defaults(char *dest1, int m1, char *dest2, int m2,
32  int iTime);
33 
34 static void Ident();
35 
36 static int Init(const char *iHost, const char *iProg,
37  const char *iName);
38 
39 static kXR_unt32 Map(char code, const char *uname, const char *path);
40 
41 static char monMIGR;
42 static char monPURGE;
43 static char monSTAGE;
44 
45  XrdFrmMonitor();
46  ~XrdFrmMonitor();
47 
48 private:
49 static void fillHeader(XrdXrootdMonHeader *hdr,
50  const char id, int size);
51 static int Send(int mmode, void *buff, int size);
52 
53 static char *Dest1;
54 static int monMode1;
55 static int monFD1;
56 static struct sockaddr InetAddr1;
57 static char *Dest2;
58 static int monFD2;
59 static int monMode2;
60 static struct sockaddr InetAddr2;
62 static int isEnabled;
63 static char *idRec;
64 static int idLen;
65 static int sidSize;
66 static char *sidName;
67 static int idTime;
68 };
69 #endif