GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
rawclin.h
Go to the documentation of this file.
1/*********************************************************************
2 * Copyright:
3 * GSI, Gesellschaft fuer Schwerionenforschung mbH
4 * Planckstr. 1
5 * D-64291 Darmstadt
6 * Germany
7 * created 1. 3.1996 by Horst Goeringer
8 *********************************************************************
9 * rawclin.h
10 * structures and definitions needed for rawserv clients only
11 *********************************************************************
12 * 3. 2.1998, H.G.: add iFileSize to srawRetrList
13 * 17. 1.2001, H.G.: add srawAPIFile for API clients
14 * 22. 1.2001, H.G.: pad OS names with trailing blanks
15 * 7. 2.2001, H.G.: in srawAPIFile: srawObjAttr added
16 * 18. 7.2001, H.G.: add mover node name to srawRetrList
17 * 24. 8.2001, H.G.: add stage flag to srawRetrList
18 * 5. 8.2002, H.G.: srawAPIClient: replace iSockServ by iSockMaster
19 * and iSockMover, add cNodeMover
20 * 14.10.2002, H.G.: ported to Lynx
21 * 27. 1.2003, H.G.: structure srawCliActionComm added
22 * 3. 2.2003, H.G.: add master number to srawRetrList
23 * 14. 2.2003, H.G.: srawCliActionComm: iDebug -> iReqMaster
24 * 17. 2.2003, H.G.: srawCliActionComm: add tape infos
25 * new statics iPortMaster, iPortMover
26 * 18. 2.2003, H.G.: rename sTapeFileList->srawTapeFileList
27 * 10. 4.2003, H.G.: add iFileType to srawRetrList
28 * 11. 6.2003, H.G.: srawCliActionComm: new iAltQuery, iMaxQuery
29 * 5.12.2003, H.G.: srawCliActionComm: new iFilesIgnore
30 * 23. 2.2004, H.G.: srawCliActionComm: new iObjArchiveDB,
31 * iObjStaged -> iObjStageDB
32 * srawRetrList: new iArchiveFS, iStage -> iStageFS
33 * 4. 3.2004, H.G.: srawRetrList: new cArchiveDate, cOwner
34 * 20. 8.2004, H.G.: srawAPIFile: new iAction, iBufsizeServD->iMassSto
35 * 15.12.2004, H.G.: srawAPIFile: iBufsizeServ->iOpMode
36 * 13. 3.2006, H.G.: declare iPortMaster, iPortMover in sources
37 * 9.10.2006, H.G.: srawCliActionComm: new iATLServer
38 * 8. 2.2007, H.G.: srawRetrList: iMaster -> iATLServer
39 * 19. 3.2008, H.G.: srawRetrList: cNodeMover -> cMoverStage,
40 * iArchiveFS -> iCacheFS
41 * new: cMoverCache, iRestoHighHigh, iRestoHighLow,
42 * iRestoLowHigh
43 * 8. 4.2008, H.G.: declare and set cPathPrefix,cDataFSHigh
44 * declare iPathPrefix, iDataFSHigh
45 * 8. 5.2008, H.G.: move static declaration [p]cOS -> rawcommn.h
46 * 9. 5.2008, H.G.: remove srawArchList
47 * (replaced by srawFileList in rawcommn.h)
48 * 2. 6.2008, H.G.: replace long->int if 64bit client (ifdef SYSTEM64)
49 * server still 32 bit
50 * 3. 9.2008, H.G.: move cDataFSHigh, iDataFSHigh -> rawcommn.h
51 * 16.10.2008, H.G.: srawRetrList: add iPoolId
52 * 14.11.2008, H.G.: indicate display mode in srawAPIFile.iOpMode
53 * 12. 2.2009, H.G.: add structure srawCopyCache to srawAPIFile
54 * 13.11.2009, H.G.: srawRetrList: enhance for recursive/parallel stage:
55 * add cNamehl, iFileSize2, iFileSet
56 * enlarge cNamell (MAX_OBJ_LL -> MAX_OBJ_LL_N) and
57 * cNamehl (MAX_OBJ_HL -> MAX_OBJ_HL_N)
58 * 18.12.2009, H.G.: MAX_OBJ_HL_N -> MAX_OBJ_HL,
59 * MAX_OBJ_LL_N -> MAX_OBJ_LL
60 * 13. 9.2010, H.G.: srawCliActionComm: new iOS64
61 * srawRetrList: 'long' iFileSize -> 2* 'int'
62 * 15. 9.2010, H.G.: discard flag SYSTEM64,
63 * srawTapeFileList: iFileSize 'long' -> 'int'
64 *********************************************************************
65 * */
66
67static int iMB = 1024000; /* 1 MB */
68static char cPathPrefix[16] = "@PATH:"; /* for filelist */
69static int iPathPrefix = 0; /* >0: path for files in filelist */
70
71/* definitions for command interface */
72#define MAX_CMDPARM 20 /* max number of command parameters */
73#define MAX_CMDPARM_LEN 256 /* max length of command parameters */
74
75typedef struct /* list of tape file names and sizes */
76{
78 unsigned int iFileSize; /* file size (byte), clitape: 4 byte okay */
80 void *pNext;
82
83/* communication buffer passed to client action routines */
84typedef struct
85{
86 int iAction; /* client action according to ACTION */
87 int iSocket; /* socket id for connection to server */
88 int iPort; /* port number entry server */
89 char cNode[MAX_NODE]; /* node name requested entry server */
90 int iReqMaster; /* used for requested ATL server */
91 srawComm sComm; /* communication structure client/server */
92 int iTapeFile; /* =0: disk file, =1: tape file, =2: tape filelist */
93 int iScanTape; /* =1: scan input tape before archive */
94 char *pcTape; /* logical tape volume name */
95 char *pcFile; /* specified file name on disk or tape */
96 int *piBuffer; /* ptr to query data area */
97 int *piDataMover; /* ptr to data mover list */
98 int *piObjBuf; /* buffer containing object list of TSM */
99 int *piFileList;/* buffer containing list of files to be archived */
100 int iBuffers; /* no. of filelist buffers in chain */
101 int iObjSelect; /* no. of TSM objects selected */
102 int iObjStageDB; /* no. of TSM objects in StagePool */
103 int iObjArchiveDB; /* no. of objects in ArchivePool */
104 int iPurge; /* no. of files to be removed from filelist */
105 int iStatus; /* output: status for caller */
106 int iAltQuery; /* query alternate entry server (not used) */
107 int iMaxQuery; /* max no. of queries per buffer */
108 int iFilesIgnore; /* 1st files in list to ignore */
109 int iATLServer; /* =1 aixtsm1, =2 gsitsma, =0 both */
110 char cMsg[STATUS_LEN]; /* message in case of error */
111 int iOS64; /* =0: 4 byte filesize, =1: 8 byte filesize */
113
114typedef struct /* info for TSM object list */
115{
116 int iFileSet; /* no. of file set (handled parallel) */
117 char cNamehl[MAX_OBJ_HL]; /* object high level name */
118 char cNamell[MAX_OBJ_LL]; /* object low level name */
119 unsigned int iObjHigh; /* upper four bytes object Id */
120 unsigned int iObjLow; /* lower four bytes object Id */
121 unsigned int iRestoHigh; /* top four bytes restore order */
122 unsigned int iRestoHighHigh; /* hi_hi four bytes restore order */
123 unsigned int iRestoHighLow; /* hi_lo four bytes restore order */
124 unsigned int iRestoLowHigh; /* lo_hi four bytes restore order */
125 unsigned int iRestoLow; /* lo_lo four bytes restore order */
126 int iFileType; /* fixed record or stream file */
127 int iBufsizeFile; /* record length */
128 unsigned int iFileSize; /* file size (byte), overlaid with 'long' */
129 unsigned int iFileSize2; /* both in total 8 byte */
130 int iATLServer; /* ATL server: =1: aixtsm1, =2: gsitsma */
131 int iPoolId;/* from query: RC poolId (staged), WC poolId (cached) */
132 char cMoverStage[MAX_NODE]; /* node name data mover if staged */
133 int iStageFS; /* > 0: in StagePool, no. of StageFS */
134 char cMoverCache[MAX_NODE]; /* name data mover if in write cache */
135 int iCacheFS; /* > 0: in write cache, no. of writeCacheFS */
136 char cArchiveDate[MAX_DATE]; /* creation date in ArchivePool */
137 char cOwner[MAX_OWNER]; /* account name of archiving user */
139
140typedef struct /* API file control block */
141{
142 int iFileId; /* API file identifier for server connection */
143 int iFlags; /* from open */
144 int iMode; /* from open */
145 char cNodeMaster[MAX_NODE]; /* node name of entry server */
146 int iSockMaster; /* socket for connection to entry server */
147 char cNodeMover[MAX_NODE]; /* node name of data mover */
148 int iSockMover; /* socket for connection to mover */
153 /* =0: 'normal' RFIO mode
154 =1: use rfio_endfile/rfio_newfile (GSI extension)
155 =2: display only, no remote file open (GSI extension) */
156 int iAction; /* =1: read from server, =2 write to server */
157 int iMassSto; /* =1: connect to GSI mass storage (ArchivePool)
158 =2: connect to GSI mass storage (DAQPool)
159 =0: connect to RFIO read/write server */
160 int iBufnoServ; /* no. of buffers transfered from/to server */
161 int iDataServ; /* no. of bytes transfered from/to server */
162 srawComm sCommAPI; /* communication buffer for API procedures */
163 srawComm sCommServ; /* copy for server in net format */
164 srawObjAttr sQueryAPI; /* query information */
166 /* info on DAQ data stream copy in net format */
168
static int iPathPrefix
Definition rawclin.h:69
static char cPathPrefix[16]
Definition rawclin.h:68
static int iMB
Definition rawclin.h:67
#define MAX_NODE
Definition rawcommn.h:225
#define MAX_OBJ_LL
Definition rawcommn.h:266
#define MAX_OBJ_HL
Definition rawcommn.h:265
#define MAX_DATE
Definition rawcommn.h:278
#define STATUS_LEN
Definition rawcommn.h:284
#define MAX_TAPE_FILE
Definition rawcommn.h:257
#define MAX_OWNER
Definition rawcommn.h:235
char cNodeMaster[MAX_NODE]
Definition rawclin.h:145
int iOffset
Definition rawclin.h:150
srawComm sCommAPI
Definition rawclin.h:162
srawObjAttr sQueryAPI
Definition rawclin.h:164
int iSeekMode
Definition rawclin.h:149
char cNodeMover[MAX_NODE]
Definition rawclin.h:147
int iSockMaster
Definition rawclin.h:146
int iMassSto
Definition rawclin.h:157
srawComm sCommServ
Definition rawclin.h:163
int iDataServ
Definition rawclin.h:161
int iSockMover
Definition rawclin.h:148
int iFileId
Definition rawclin.h:142
int iAction
Definition rawclin.h:156
int iOpMode
Definition rawclin.h:152
int iBufnoServ
Definition rawclin.h:160
int iBufsizeAct
Definition rawclin.h:151
srawCopyCache sCopyCacheServ
Definition rawclin.h:165
char cNode[MAX_NODE]
Definition rawclin.h:89
int * piDataMover
Definition rawclin.h:97
char cMsg[STATUS_LEN]
Definition rawclin.h:110
srawComm sComm
Definition rawclin.h:91
char cMoverStage[MAX_NODE]
Definition rawclin.h:132
int iFileType
Definition rawclin.h:126
unsigned int iRestoLowHigh
Definition rawclin.h:124
int iBufsizeFile
Definition rawclin.h:127
char cNamell[MAX_OBJ_LL]
Definition rawclin.h:118
unsigned int iRestoHighLow
Definition rawclin.h:123
char cMoverCache[MAX_NODE]
Definition rawclin.h:134
int iATLServer
Definition rawclin.h:130
unsigned int iObjLow
Definition rawclin.h:120
unsigned int iRestoHigh
Definition rawclin.h:121
char cOwner[MAX_OWNER]
Definition rawclin.h:137
unsigned int iObjHigh
Definition rawclin.h:119
char cArchiveDate[MAX_DATE]
Definition rawclin.h:136
unsigned int iRestoLow
Definition rawclin.h:125
unsigned int iFileSize2
Definition rawclin.h:129
unsigned int iRestoHighHigh
Definition rawclin.h:122
char cNamehl[MAX_OBJ_HL]
Definition rawclin.h:117
unsigned int iFileSize
Definition rawclin.h:128
unsigned int iFileSize
Definition rawclin.h:78
char cFileName[MAX_TAPE_FILE+1]
Definition rawclin.h:77