-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLDDEF.H
More file actions
413 lines (390 loc) · 14.1 KB
/
LDDEF.H
File metadata and controls
413 lines (390 loc) · 14.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
//**********************************************************************//
// //
// These sources for LDdriver are based on the sources provided in the //
// LD V9.7 kit as provided by Jur van den Burg on digiater.nl. //
// VMS Software, Inc (VSI) has put its changes to these sources in the //
// public domain. //
// //
// The original license statement for LD 9.7 reads as follows: //
// //
// LDdriver is freeware. It may be freely downloaded and used. The //
// sources are available in the kit, and support is limited. In case of //
// problems report them and they may get fixed. We are not responsible //
// for any malfunction or data loss caused by this software. //
// //
//**********************************************************************//
/*** MODULE $LDDEF ***/
#ifndef __LDDEF_LOADED
#define __LDDEF_LOADED 1
#pragma __nostandard /* This file uses non-ANSI-Standard features */
#pragma __member_alignment __save
#pragma __nomember_alignment
#ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */
#pragma __required_pointer_size __save /* Save the previously-defined required ptr size */
#pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */
#endif
#ifdef __cplusplus
extern "C" {
#define __unknown_params ...
#define __optional_params ...
#else
#define __unknown_params
#define __optional_params ...
#endif
#ifndef __struct
#if !defined(__VAXC)
#define __struct struct
#else
#define __struct variant_struct
#endif
#endif
#ifndef __union
#if !defined(__VAXC)
#define __union union
#else
#define __union variant_union
#endif
#endif
#include <sbkdef.h>
#define IO$_LD_CONTROL 20
#define LDIO$K_CONNECT 0
#define LDIO$K_DISCONNECT 1
#define LDIO$K_ENABLE_TRACE 2
#define LDIO$K_DISABLE_TRACE 3
#define LDIO$K_GET_TRACE 4
#define LDIO$K_RESET_TRACE 5
#define LDIO$K_GET_CONNECTION 6
#define LDIO$K_SET_SEED 7
#define LDIO$K_ENABLE_WATCH 8
#define LDIO$K_DISABLE_WATCH 9
#define LDIO$K_GET_WATCH 10
#define LDIO$K_RESUME_WATCH 11
#define LDIO$K_GET_SUSPEND_LIST 12
#define LDIO$K_ENABLE_PROTECT 13
#define LDIO$K_DISABLE_PROTECT 14
#define LDIO$K_SET_ALLOCLASS 15
#define LDIO$K_GET_TRACE_PARAMETERS 16
#define LDIO$K_GET_VERSION 17
#define LDIO$K_GET_METADATA 18
#define LDIO$K_LOAD 19
#define LDIO$K_UNLOAD 20
#define LDIO$M_REPLACE 0x100
#define LDIO$M_ABORT 0x200
#define LDIO$M_INQUIRE 0x400
#define LDIO$M_NOWAIT 0x800
#define LDIO$M_RESET 0x1000
#define LDIO$M_SHARE 0x2000
#define LDIO$M_ACCURATE 0x4000
#define LDIO$M_FDTTRACE 0x8000
#define LDIO$M_LBN 0x10000
#define LDIO$M_OVERRIDE 0x20000
#define LDIO$M_LOCK 0x40000
#define LDIO$M_NOFE 0x80000
#define LDIO$M_INIT 0x100000
#define LDIO$M_TRACE_ALL 0x200000
#define LDIO$M_KEEP 0x400000
#define LDIO$M_LOADONLY 0x800000
#define LDIO$M_NOLOAD 0x1000000
#define LDIO$M_EXTEND 0x2000000
#define LDIO$M_TRUNCATE 0x4000000
#define LDIO$M_ITEMLIST 0x8000000
#ifdef __NEW_STARLET
typedef struct _ldio {
unsigned ldio$v_func : 8;
unsigned ldio$v_replace : 1;
unsigned ldio$v_abort : 1;
unsigned ldio$v_inquire : 1;
unsigned ldio$v_nowait : 1;
unsigned ldio$v_reset : 1;
unsigned ldio$v_share : 1;
unsigned ldio$v_accurate : 1;
unsigned ldio$v_fdttrace : 1;
unsigned ldio$v_lbn : 1;
unsigned ldio$v_override : 1;
unsigned ldio$v_lock : 1;
unsigned ldio$v_nofe : 1;
unsigned ldio$v_init : 1;
unsigned ldio$v_trace_all : 1;
unsigned ldio$v_keep : 1;
unsigned ldio$v_loadonly : 1;
unsigned ldio$v_noload : 1;
unsigned ldio$v_extend : 1;
unsigned ldio$v_truncate : 1;
unsigned ldio$v_itemlist : 1;
unsigned ldio$v_fill_0_ : 4;
} LDIO;
#else /* __OLD_STARLET */
struct ldio {
unsigned ldio$v_func : 8;
unsigned ldio$v_replace : 1;
unsigned ldio$v_abort : 1;
unsigned ldio$v_inquire : 1;
unsigned ldio$v_nowait : 1;
unsigned ldio$v_reset : 1;
unsigned ldio$v_share : 1;
unsigned ldio$v_accurate : 1;
unsigned ldio$v_fdttrace : 1;
unsigned ldio$v_lbn : 1;
unsigned ldio$v_override : 1;
unsigned ldio$v_lock : 1;
unsigned ldio$v_nofe : 1;
unsigned ldio$v_init : 1;
unsigned ldio$v_trace_all : 1;
unsigned ldio$v_keep : 1;
unsigned ldio$v_loadonly : 1;
unsigned ldio$v_noload : 1;
unsigned ldio$v_extend : 1;
unsigned ldio$v_truncate : 1;
unsigned ldio$v_itemlist : 1;
unsigned ldio$v_fill_0_ : 4;
} ;
#endif /* #ifdef __NEW_STARLET */
#define LDITM$K_CHANNEL 1
#define LDITM$K_EXTENDSIZE 2
#define LDITM$K_EXTENDLIMIT 3
#define LDITM$K_DEVICENAME 4
#define LDITM$K_FILEID 5
#define LDITM$K_STARTLBN 6
#define LDITM$K_ENDLBN 7
#define LDITM$K_FLAGS 8
#define LDITM$K_TRACKS 9
#define LDITM$K_CYLINDERS 10
#define LDITM$K_SECTORS 11
#define LDITM$K_MAXBLOCKS 12
#define LDRSN$K_NOTSHARED 1
#define LDRSN$K_NOSHARE 2
#define LDRSN$K_ALLOCLASS 3
#define LDRSN$K_UNITNUMBER 4
#define LDRSN$K_TRACKS 5
#define LDRSN$K_SECTORS 6
#define LDRSN$K_CYLINDERS 7
#define LDRSN$K_MAXBLOCK 8
#define LDRSN$K_NOLBNMAP 9
#define LDRSN$K_STARTLBN 10
#define LDRSN$K_DEVICENAME 11
#define LDRSN$K_NOTREPLACED 12
#define LDRSN$K_RANGEINUSE 13
#define LDRSN$K_FILEIDINUSE 14
#define LDRSN$K_INCMPPROT 15
#define LDRSN$K_INCMPDEVTYPE 16
#define LDTRC$C_LENGTH 88
#define LDTRC$K_LENGTH 88
#ifdef __NEW_STARLET
typedef struct _trace_ent {
unsigned int ldtrc$l_pid;
unsigned int ldtrc$l_lbn;
unsigned int ldtrc$l_bcnt;
unsigned short int ldtrc$w_func;
unsigned short int ldtrc$w_reserved;
unsigned int ldtrc$l_iosb [2];
__union {
unsigned __int64 ldtrc$q_start_time;
unsigned int ldtrc$l_start_time;
} ldtrc$r_stime_union;
__union {
unsigned __int64 ldtrc$q_end_time;
unsigned int ldtrc$l_end_time;
} ldtrc$r_etime_union;
unsigned __int64 ldtrc$q_start_scc;
unsigned __int64 ldtrc$q_end_scc;
unsigned int ldtrc$l_startcpu;
unsigned int ldtrc$l_endcpu;
__union {
unsigned __int64 ldtrc$q_elapsed;
unsigned int ldtrc$l_elapsed;
} ldtrc$r_elapsed_union;
unsigned __int64 ldtrc$q_start_usec;
unsigned __int64 ldtrc$q_end_usec;
} TRACE_ENT;
#if !defined(__VAXC)
#define ldtrc$q_start_time ldtrc$r_stime_union.ldtrc$q_start_time
#define ldtrc$l_start_time ldtrc$r_stime_union.ldtrc$l_start_time
#define ldtrc$q_end_time ldtrc$r_etime_union.ldtrc$q_end_time
#define ldtrc$l_end_time ldtrc$r_etime_union.ldtrc$l_end_time
#define ldtrc$q_elapsed ldtrc$r_elapsed_union.ldtrc$q_elapsed
#define ldtrc$l_elapsed ldtrc$r_elapsed_union.ldtrc$l_elapsed
#endif /* #if !defined(__VAXC) */
#else /* __OLD_STARLET */
typedef struct _trace_ent {
unsigned int ldtrc$l_pid;
unsigned int ldtrc$l_lbn;
unsigned int ldtrc$l_bcnt;
unsigned short int ldtrc$w_func;
unsigned short int ldtrc$w_reserved;
unsigned int ldtrc$l_iosb [2];
__union {
unsigned int ldtrc$q_start_time [2];
unsigned int ldtrc$l_start_time;
} ldtrc$r_stime_union;
__union {
unsigned int ldtrc$q_end_time [2];
unsigned int ldtrc$l_end_time;
} ldtrc$r_etime_union;
unsigned int ldtrc$q_start_scc [2];
unsigned int ldtrc$q_end_scc [2];
unsigned int ldtrc$l_startcpu;
unsigned int ldtrc$l_endcpu;
__union {
unsigned int ldtrc$q_elapsed [2];
unsigned int ldtrc$l_elapsed;
} ldtrc$r_elapsed_union;
unsigned int ldtrc$q_start_usec [2];
unsigned int ldtrc$q_end_usec [2];
} trace_ent;
#if !defined(__VAXC)
#define ldtrc$q_start_time ldtrc$r_stime_union.ldtrc$q_start_time
#define ldtrc$l_start_time ldtrc$r_stime_union.ldtrc$l_start_time
#define ldtrc$q_end_time ldtrc$r_etime_union.ldtrc$q_end_time
#define ldtrc$l_end_time ldtrc$r_etime_union.ldtrc$l_end_time
#define ldtrc$q_elapsed ldtrc$r_elapsed_union.ldtrc$q_elapsed
#define ldtrc$l_elapsed ldtrc$r_elapsed_union.ldtrc$l_elapsed
#endif /* #if !defined(__VAXC) */
#endif /* #ifdef __NEW_STARLET */
#define LDWTC$M_CHARS 0x7F
#define LDWTC$M_NOLBN 0x1
#define LDWTC$M_FILE 0x2
#define LDWTC$M_FILE_CHAN 0x4
#define LDWTC$M_REMOVE_ALL 0x80
#define LDWTC$C_SUSPEND 0
#define LDWTC$C_CRASH 1
#define LDWTC$C_ERROR 2
#define LDWTC$C_OPCOM 3
#define LDWTC$C_MAX 3
#define LDWTC$C_LENGTH 22
#define LDWTC$K_LENGTH 22
#ifdef __cplusplus /* Define structure prototypes */
struct _sbkdef;
#endif /* #ifdef __cplusplus */
#ifdef __NEW_STARLET
typedef struct _watchpt {
unsigned int ldwtc$l_lbn;
__union {
unsigned short int ldwtc$w_flags;
__struct {
__union {
unsigned ldwtc$v_chars : 7;
__struct {
unsigned ldwtc$v_nolbn : 1;
unsigned ldwtc$v_file : 1;
unsigned ldwtc$v_file_chan : 1;
unsigned ldwtc$v_reserved : 4;
unsigned ldwtc$v_remove_all : 1;
} ldwtc$r_flags2;
} ldwtc$r_flags1;
} ldwtc$r_fill_2_;
} ldwtc$r_fill_1_;
unsigned short int ldwtc$w_action;
unsigned short int ldwtc$w_func;
unsigned short int ldwtc$w_retcode;
__union {
unsigned short int ldwtc$w_chan;
struct _sbkdef *ldwtc$a_sbk;
void *ldwtc$a_fcb;
} ldwtc$r_sbk_fcb;
__union {
unsigned short int ldwtc$w_fid [3];
__struct {
unsigned short int ldwtc$w_fid_num;
unsigned short int ldwtc$w_fid_seq;
unsigned short int ldwtc$w_fid_rvn;
} ldwtc$r_fidarea2;
} ldwtc$r_fidarea1;
} WATCHPT;
#if !defined(__VAXC)
#define ldwtc$w_flags ldwtc$r_fill_1_.ldwtc$w_flags
#define ldwtc$v_chars ldwtc$r_fill_1_.ldwtc$r_fill_2_.ldwtc$r_flags1.ldwtc$v_chars
#define ldwtc$v_nolbn ldwtc$r_fill_1_.ldwtc$r_fill_2_.ldwtc$r_flags1.ldwtc$r_flags2.ldwtc$v_nolbn
#define ldwtc$v_file ldwtc$r_fill_1_.ldwtc$r_fill_2_.ldwtc$r_flags1.ldwtc$r_flags2.ldwtc$v_file
#define ldwtc$v_file_chan ldwtc$r_fill_1_.ldwtc$r_fill_2_.ldwtc$r_flags1.ldwtc$r_flags2.ldwtc$v_file_chan
#define ldwtc$v_reserved ldwtc$r_fill_1_.ldwtc$r_fill_2_.ldwtc$r_flags1.ldwtc$r_flags2.ldwtc$v_reserved
#define ldwtc$v_remove_all ldwtc$r_fill_1_.ldwtc$r_fill_2_.ldwtc$r_flags1.ldwtc$r_flags2.ldwtc$v_remove_all
#define ldwtc$w_chan ldwtc$r_sbk_fcb.ldwtc$w_chan
#define ldwtc$a_sbk ldwtc$r_sbk_fcb.ldwtc$a_sbk
#define ldwtc$a_fcb ldwtc$r_sbk_fcb.ldwtc$a_fcb
#define ldwtc$w_fid ldwtc$r_fidarea1.ldwtc$w_fid
#define ldwtc$w_fid_num ldwtc$r_fidarea1.ldwtc$r_fidarea2.ldwtc$w_fid_num
#define ldwtc$w_fid_seq ldwtc$r_fidarea1.ldwtc$r_fidarea2.ldwtc$w_fid_seq
#define ldwtc$w_fid_rvn ldwtc$r_fidarea1.ldwtc$r_fidarea2.ldwtc$w_fid_rvn
#endif /* #if !defined(__VAXC) */
#else /* __OLD_STARLET */
typedef struct _watchpt {
unsigned int ldwtc$l_lbn;
__union {
unsigned short int ldwtc$w_flags;
__struct {
__union {
unsigned ldwtc$v_chars : 7;
__struct {
unsigned ldwtc$v_nolbn : 1;
unsigned ldwtc$v_file : 1;
unsigned ldwtc$v_file_chan : 1;
unsigned ldwtc$v_reserved : 4;
unsigned ldwtc$v_remove_all : 1;
} ldwtc$r_flags2;
} ldwtc$r_flags1;
} ldwtc$r_fill_2_;
} ldwtc$r_fill_1_;
unsigned short int ldwtc$w_action;
unsigned short int ldwtc$w_func;
unsigned short int ldwtc$w_retcode;
__union {
unsigned short int ldwtc$w_chan;
void *ldwtc$a_sbk;
void *ldwtc$a_fcb;
} ldwtc$r_sbk_fcb;
__union {
unsigned short int ldwtc$w_fid [3];
__struct {
unsigned short int ldwtc$w_fid_num;
unsigned short int ldwtc$w_fid_seq;
unsigned short int ldwtc$w_fid_rvn;
} ldwtc$r_fidarea2;
} ldwtc$r_fidarea1;
} watchpt;
#if !defined(__VAXC)
#define ldwtc$w_flags ldwtc$r_fill_1_.ldwtc$w_flags
#define ldwtc$v_chars ldwtc$r_fill_1_.ldwtc$r_fill_2_.ldwtc$r_flags1.ldwtc$v_chars
#define ldwtc$v_nolbn ldwtc$r_fill_1_.ldwtc$r_fill_2_.ldwtc$r_flags1.ldwtc$r_flags2.ldwtc$v_nolbn
#define ldwtc$v_file ldwtc$r_fill_1_.ldwtc$r_fill_2_.ldwtc$r_flags1.ldwtc$r_flags2.ldwtc$v_file
#define ldwtc$v_file_chan ldwtc$r_fill_1_.ldwtc$r_fill_2_.ldwtc$r_flags1.ldwtc$r_flags2.ldwtc$v_file_chan
#define ldwtc$v_reserved ldwtc$r_fill_1_.ldwtc$r_fill_2_.ldwtc$r_flags1.ldwtc$r_flags2.ldwtc$v_reserved
#define ldwtc$v_remove_all ldwtc$r_fill_1_.ldwtc$r_fill_2_.ldwtc$r_flags1.ldwtc$r_flags2.ldwtc$v_remove_all
#define ldwtc$w_chan ldwtc$r_sbk_fcb.ldwtc$w_chan
#define ldwtc$a_sbk ldwtc$r_sbk_fcb.ldwtc$a_sbk
#define ldwtc$a_fcb ldwtc$r_sbk_fcb.ldwtc$a_fcb
#define ldwtc$w_fid ldwtc$r_fidarea1.ldwtc$w_fid
#define ldwtc$w_fid_num ldwtc$r_fidarea1.ldwtc$r_fidarea2.ldwtc$w_fid_num
#define ldwtc$w_fid_seq ldwtc$r_fidarea1.ldwtc$r_fidarea2.ldwtc$w_fid_seq
#define ldwtc$w_fid_rvn ldwtc$r_fidarea1.ldwtc$r_fidarea2.ldwtc$w_fid_rvn
#endif /* #if !defined(__VAXC) */
#endif /* #ifdef __NEW_STARLET */
#define LDSUSP$C_LENGTH 16
#define LDSUSP$K_LENGTH 16
#ifdef __NEW_STARLET
typedef struct _suspend_list {
unsigned int ldsusp$l_pid;
unsigned int ldsusp$l_lbn;
unsigned short int ldsusp$w_flags;
unsigned short int ldsusp$w_action;
unsigned short int ldsusp$w_func;
unsigned short int ldsusp$w_retcode;
} SUSPEND_LIST;
#else /* __OLD_STARLET */
typedef struct _suspend_list {
unsigned int ldsusp$l_pid;
unsigned int ldsusp$l_lbn;
unsigned short int ldsusp$w_flags;
unsigned short int ldsusp$w_action;
unsigned short int ldsusp$w_func;
unsigned short int ldsusp$w_retcode;
} suspend_list;
#endif /* #ifdef __NEW_STARLET */
#pragma __member_alignment __restore
#ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */
#pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */
#endif
#ifdef __cplusplus
}
#endif
#pragma __standard
#endif /* __LDDEF_LOADED */