00001 //--------------------------------------------------------------- 00002 // Go4 Release Package v2.10-5 (build 21005) 00003 // 03-Nov-2005 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at DVEE department, GSI 00007 //--------------------------------------------------------------- 00008 // 00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI 00010 // Planckstr. 1, 64291 Darmstadt, Germany 00011 //Contact: http://go4.gsi.de 00012 //---------------------------------------------------------------- 00013 //This software can be used under the license agreements as stated 00014 //in Go4License.txt file which is part of the distribution. 00015 //---------------------------------------------------------------- 00016 /********************************************************************* 00017 * Copyright: 00018 * GSI, Gesellschaft fuer Schwerionenforschung mbH 00019 * Planckstr. 1 00020 * D-64291 Darmstadt 00021 * Germany 00022 * created 1. 3.1996 by Horst Goeringer 00023 ********************************************************************* 00024 * rawclin.h 00025 * structures and definitions needed for rawserv clients only 00026 * new version 00027 ********************************************************************* 00028 * 3. 2.1998, H.G.: add iFileSize to srawRetrList 00029 * 17. 1.2001, H.G.: add srawAPIFile for API clients 00030 * 22. 1.2001, H.G.: pad OS names with trailing blanks 00031 * 7. 2.2001, H.G.: in srawAPIFile: srawObjAttr added 00032 * 18. 7.2001, H.G.: add mover node name to srawRetrList 00033 * 24. 8.2001, H.G.: add stage flag to srawRetrList 00034 * 5. 8.2002, H.G.: srawAPIClient: replace iSockServ by iSockMaster 00035 * and iSockMover, add cNodeMover 00036 * 14.10.2002, H.G.: ported to Lynx 00037 * 27. 1.2003, H.G.: structure srawCliActionComm added 00038 * 3. 2.2003, H.G.: add master number to srawRetrList 00039 * 14. 2.2003, H.G.: srawCliActionComm: iDebug -> iReqMaster 00040 * 17. 2.2003, H.G.: srawCliActionComm: add tape infos 00041 * new statics iPortMaster, iPortMover 00042 * 18. 2.2003, H.G.: rename sTapeFileList->srawTapeFileList 00043 * 10. 4.2003, H.G.: add iFileType to srawRetrList 00044 * 11. 6.2003, H.G.: srawCliActionComm: new iAltQuery, iMaxQuery 00045 * 5.12.2003, H.G.: srawCliActionComm: new iFilesIgnore 00046 * 23. 2.2004, H.G.: srawCliActionComm: new iObjArchiveDB, 00047 * iObjStaged -> iObjStageDB 00048 * srawRetrList: new iArchiveFS, iStage -> iStageFS 00049 * 4. 3.2004, H.G.: srawRetrList: new cArchiveDate, cOwner 00050 ********************************************************************* 00051 * */ 00052 00053 static int iPortMaster = PORT_MASTER; /* port number master server */ 00054 static int iPortMover = PORT_MOVER; /* port number data mover */ 00055 static int iMB = 1024000; /* 1 MB */ 00056 00057 /* definitions for command interface */ 00058 #define MAX_CMDPARM 20 /* max number of command parameters */ 00059 #define MAX_CMDPARM_LEN 256 /* max length of command parameters */ 00060 00061 typedef struct /* list of tape file names and sizes */ 00062 { 00063 char cFileName[MAX_TAPE_FILE+1]; 00064 unsigned long iFileSize; 00065 long iBufferSize; 00066 void *pNext; 00067 } srawTapeFileList; 00068 00069 /* communication buffer passed to client action routines */ 00070 typedef struct 00071 { 00072 int iAction; /* client action according to ACTION */ 00073 int iSocket; /* socket id for connection to server */ 00074 int iPort; /* port number master server */ 00075 char cNode[MAX_NODE]; /* node name requested master server */ 00076 int iReqMaster; /* no. of requested master server */ 00077 srawComm sComm; /* communication structure client/server */ 00078 int iTapeFile; /* =0: disk file, =1: tape file, =2: tape filelist */ 00079 int iScanTape; /* =1: scan input tape before archive */ 00080 char *pcTape; /* logical tape volume name */ 00081 char *pcFile; /* specified file name on disk or tape */ 00082 int *piBuffer; /* ptr to query data area */ 00083 int *piDataMover; /* ptr to data mover list */ 00084 int *piObjBuf; /* buffer containing object list of TSM */ 00085 int *piFileList;/* buffer containing list of files to be archived */ 00086 int iBuffers; /* no. of filelist buffers in chain */ 00087 int iObjSelect; /* no. of TSM objects selected */ 00088 int iObjStageDB; /* no. of TSM objects in StagePool */ 00089 int iObjArchiveDB; /* no. of objects in ArchivePool */ 00090 int iPurge; /* no. of files to be removed from filelist */ 00091 int iStatus; /* output: status for caller */ 00092 int iAltQuery; /* query alternate master */ 00093 int iMaxQuery; /* max no. of queries per buffer */ 00094 int iFilesIgnore; /* 1st files in list to ignore */ 00095 char cMsg[STATUS_LEN]; /* message in case of error */ 00096 } srawCliActionComm; 00097 00098 typedef struct /* info for file list */ 00099 { 00100 char cFile[MAX_FILE]; /* full file name on client side */ 00101 } srawArchList; 00102 00103 typedef struct /* info for TSM object list */ 00104 { 00105 char cNamell[MAX_OBJ_LL]; /* object low level name */ 00106 unsigned int iObjHigh; /* upper four bytes object Id */ 00107 unsigned int iObjLow; /* lower four bytes object Id */ 00108 unsigned int iRestoHigh; /* upper four bytes restore order */ 00109 unsigned int iRestoLow; /* lower four bytes restore order */ 00110 int iFileType; /* fixed record or stream file */ 00111 int iBufsizeFile; /* record length */ 00112 unsigned long iFileSize; /* size of file in bytes */ 00113 int iMaster; /* running no. of master server (historical order) */ 00114 int iStageFS; /* > 0: in StagePool, no. of StageFS */ 00115 char cNodeMover[MAX_NODE]; /* node name data mover if staged */ 00116 int iArchiveFS; /* > 0: in ArchivePool, no. of ArchiveFS */ 00117 char cArchiveDate[MAX_DATE]; /* creation date in ArchivePool */ 00118 char cOwner[MAX_OWNER]; /* account name of archiving user */ 00119 } srawRetrList; 00120 00121 typedef struct /* API file control block */ 00122 { 00123 int iFileId; /* API file identifier for server connection */ 00124 int iFlags; /* from open */ 00125 int iMode; /* from open */ 00126 char cNodeMaster[MAX_NODE]; /* node name of master server */ 00127 int iSockMaster; /* socket for connection to master */ 00128 char cNodeMover[MAX_NODE]; /* node name of data mover */ 00129 int iSockMover; /* socket for connection to mover */ 00130 int iSeekMode; 00131 int iOffset; 00132 int iBufsizeAct; 00133 int iBufsizeServ; /* not yet used */ 00134 int iBufsizeServD; /* not yet used */ 00135 int iBufnoServ; /* no. of buffers transfered from/to server */ 00136 int iDataServ; /* no. of bytes transfered from/to server */ 00137 srawComm sCommAPI; /* communication buffer for API procedures */ 00138 srawComm sCommServ; /* copy for server in net format */ 00139 srawObjAttr sQueryAPI; /* query information */ 00140 } srawAPIFile; 00141 00142 /* client operating system */ 00143 static char *pcOS; 00144 #ifdef _AIX 00145 static char cOS[MAX_OS] = "AIX4 "; 00146 #endif 00147 #ifdef Linux 00148 static char cOS[MAX_OS] = "Linux2 "; 00149 #endif 00150 #ifdef Lynx 00151 static char cOS[MAX_OS] = "Lynx "; 00152 #endif 00153 #ifdef VMS 00154 static char cOS[MAX_OS] = "VMS7 "; 00155 #endif 00156 00157 00158 00159 //----------------------------END OF GO4 SOURCE FILE ---------------------