xrootd
XrdFrcRequest.hh
Go to the documentation of this file.
00001 #ifndef __FRCREQUEST_H__
00002 #define __FRCREQUEST_H__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                      X r d F r c R e q u e s t . 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-AC02-76-SFO0515 with the Department of Energy              */
00011 /*                                                                            */
00012 /* This file is part of the XRootD software suite.                            */
00013 /*                                                                            */
00014 /* XRootD is free software: you can redistribute it and/or modify it under    */
00015 /* the terms of the GNU Lesser General Public License as published by the     */
00016 /* Free Software Foundation, either version 3 of the License, or (at your     */
00017 /* option) any later version.                                                 */
00018 /*                                                                            */
00019 /* XRootD is distributed in the hope that it will be useful, but WITHOUT      */
00020 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      */
00021 /* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public       */
00022 /* License for more details.                                                  */
00023 /*                                                                            */
00024 /* You should have received a copy of the GNU Lesser General Public License   */
00025 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file  */
00026 /* COPYING (GPL license).  If not, see <http://www.gnu.org/licenses/>.        */
00027 /*                                                                            */
00028 /* The copyright holder's institutional names and contributor's names may not */
00029 /* be used to endorse or promote products derived from this software without  */
00030 /* specific prior written permission of the institution or contributor.       */
00031 /******************************************************************************/
00032 
00033 class XrdFrcRequest
00034 {
00035 public:
00036 
00037 char      LFN[3072];    // Logical File Name ('\0' optional opaque)
00038 char      User[256];    // User trace identifier
00039 char      ID[40];       // Request ID
00040 char      Notify[512];  // Notification path
00041 char      Reserved[88];
00042 char      iName[32];    // Instance name
00043 char      csValue[64];  // Checksum value (dependent on csType).
00044 long long addTOD;       // Time added to queue
00045 int       This;         // Offset to this request
00046 int       Next;         // Offset to next request
00047 int       Options;      // Processing options (see below)
00048 short     LFO;          // Offset to lfn in url if LFN is a url (o/w 0)
00049 short     Opaque;       // Offset to '?' in LFN if exists, 0 o/w
00050 char      Reserved2;
00051 char      csType;       // Checksum type
00052 char      OPc;          // Original Operation Request code (debugging)
00053 char      Prty;         // Request priority
00054 
00055 // Flags set in options
00056 //
00057 static const int msgFail  = 0x00000001;
00058 static const int msgSucc  = 0x00000002;
00059 static const int makeRW   = 0x00000004;
00060 static const int Migrate  = 0x00000010;
00061 static const int Purge    = 0x00000020;
00062 static const int Register = 0x00000040;
00063 
00064 // Checksum types (not all of which are supported)
00065 //
00066 static const int csNone   = 0;
00067 static const int csSHA1   = 1;
00068 static const int csSHA2   = 2;
00069 static const int csSHA3   = 3;
00070 static const int csAdler32= 4;
00071 static const int csMD5    = 5;
00072 static const int csCRC32  = 6;
00073 
00074 // These define valid priorities
00075 //
00076 static const int maxPrty  = 2;
00077 static const int maxPQE   = 3;
00078 
00079 // The following define what can be listed from the queue
00080 //
00081 enum Item {getOBJ = 0, getLFN, getOBJCGI, getLFNCGI, getMODE, getNOTE, getOP,
00082            getPRTY,    getQWT, getRID,    getTOD,    getUSER, getLast};
00083 
00084 // These define possible queues along with the "nil" queue
00085 //
00086 static const int     stgQ = 0;  // Stage    queue
00087 static const int     migQ = 1;  // Migrate  queue
00088 static const int     getQ = 2;  // Copy in  queue
00089 static const int     putQ = 3;  // Copy out queue
00090 static const int     nilQ = 4;  // Empty    queue
00091 static const int     numQ = 5;
00092 static const int     outQ = 1;  // Used as a mask only
00093 };
00094 #endif