xrootd
XrdFrmMonitor.hh
Go to the documentation of this file.
00001 #ifndef __XRDFRMMONITOR__
00002 #define __XRDFRMMONITOR__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                      X r d F r m M o n i t o r . h h                       */
00006 /*                                                                            */
00007 /* (c) 2010 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*                            All Rights Reserved                             */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC03-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012 
00013 #include <inttypes.h>
00014 #include <time.h>
00015 #include <netinet/in.h>
00016 #include <sys/types.h>
00017 
00018 #include "XrdNet/XrdNetPeer.hh"
00019 #include "XrdXrootd/XrdXrootdMonData.hh"
00020 #include "XProtocol/XPtypes.hh"
00021   
00022 /******************************************************************************/
00023 /*                            X r d M o n i t o r                             */
00024 /******************************************************************************/
00025 
00026 #define XROOTD_MON_INFO     1
00027 #define XROOTD_MON_STAGE    2
00028 
00029 class XrdFrmMonitor
00030 {
00031 public:
00032 
00033 static void              Defaults(char *dest1, int m1, char *dest2, int m2);
00034 
00035 static int               Init();
00036 
00037 static kXR_unt32         Map(const char code,const char *uname,const char *path);
00038 
00039 static char              monSTAGE;
00040 
00041                          XrdFrmMonitor();
00042                         ~XrdFrmMonitor(); 
00043 
00044 private:
00045 static void              fillHeader(XrdXrootdMonHeader *hdr,
00046                                     const char id, int size);
00047 static int               Send(int mmode, void *buff, int size);
00048 
00049 static char              *Dest1;
00050 static int                monMode1;
00051 static int                monFD1;
00052 static struct sockaddr    InetAddr1;
00053 static char              *Dest2;
00054 static int                monFD2;
00055 static int                monMode2;
00056 static struct sockaddr    InetAddr2;
00057 static kXR_int32          startTime;
00058 static int                isEnabled;
00059 };
00060 #endif