00001 /*****************************************************************************/ 00002 /* */ 00003 /* XrdMonCommon.hh */ 00004 /* */ 00005 /* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */ 00006 /* All Rights Reserved */ 00007 /* Produced by Jacek Becla for Stanford University under contract */ 00008 /* DE-AC02-76SF00515 with the Department of Energy */ 00009 /*****************************************************************************/ 00010 00011 // $Id: XrdMonCommon.hh 24468 2008-06-22 16:47:03Z ganis $ 00012 00013 #ifndef XRDMONCOMMON_HH 00014 #define XRDMONCOMMON_HH 00015 00016 #include "XrdMon/XrdMonTypes.hh" 00017 00018 // common settings for UDP transmitter and receiver 00019 00020 const kXR_int32 MAXPACKETSIZE = 65536; // [bytes], (16 bits for length in hdr) 00021 const kXR_int16 HDRLEN = 8; // [bytes] 00022 const kXR_int16 TRACEELEMLEN = 16; // [bytes] 00023 00024 // size for data inside packet. 2*kXR_int16 is used 00025 // by packet type and number of elements 00026 const kXR_int16 TRACELEN = 16; 00027 00028 extern const char* DEFAULT_HOST; 00029 extern const int DEFAULT_PORT; 00030 00031 const kXR_char PACKET_TYPE_ADMIN = 'A'; 00032 const kXR_char PACKET_TYPE_DICT = 'd'; 00033 const kXR_char PACKET_TYPE_INFO = 'i'; 00034 const kXR_char PACKET_TYPE_STAGE = 's'; 00035 const kXR_char PACKET_TYPE_TRACE = 't'; 00036 const kXR_char PACKET_TYPE_USER = 'u'; 00037 00038 const char XROOTD_MON_RWREQUESTMASK = 0x80; 00039 // why 0x80: anything that is < 0x7f is rwrequest 00040 // 0x7f = 01111111, so !(x & 10000000), 1000 0000=0x80 00041 00042 00043 // increment this each time a protocol changes. 00044 // 1 = (the code without XRDMON_VERSION). 00045 // 2 = changed API: extended to include file size information 00046 // sent from xrootd. Also, all timestamps in GMT instead 00047 // of localtime 00048 // 3 = added current time to the "u" entries at the end 00049 // 4 = added support for staging information ("s" entries) 00050 const kXR_int16 XRDMON_VERSION = 4; 00051 00052 enum AdminCommand { 00053 c_shutdown = 1000 00054 }; 00055 00056 enum { 00057 INVALID_SENDER_ID = 65535 00058 }; 00059 #endif /* XRDMONCOMMON_HH */