Diff of /src/ioctl.h [104348] .. [d040ac] Maximize Restore

  Switch to unified view

a/src/ioctl.h b/src/ioctl.h
1
/*****************************************************************************
1
/*****************************************************************************
2
 * ioctl.h: DVD ioctl replacement function
2
 * ioctl.h: DVD ioctl replacement function
3
 *****************************************************************************
3
 *****************************************************************************
4
 * Copyright (C) 1999-2001 VideoLAN
4
 * Copyright (C) 1999-2001 VideoLAN
5
 * $Id$
5
 * $Id: ioctl.h,v 1.1 2001/12/22 00:08:13 sam Exp $
6
 *
6
 *
7
 * Authors: Sam Hocevar <sam@zoy.org>
7
 * Authors: Samuel Hocevar <sam@zoy.org>
8
 *
8
 *
9
 * This program is free software; you can redistribute it and/or modify
9
 * This program is free software; you can redistribute it and/or modify
10
 * it under the terms of the GNU General Public License as published by
10
 * it under the terms of the GNU General Public License as published by
11
 * the Free Software Foundation; either version 2 of the License, or
11
 * the Free Software Foundation; either version 2 of the License, or
12
 * (at your option) any later version.
12
 * (at your option) any later version.
...
...
20
 * along with this program; if not, write to the Free Software
20
 * along with this program; if not, write to the Free Software
21
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
21
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22
 *****************************************************************************/
22
 *****************************************************************************/
23
23
24
int ioctl_ReadCopyright     ( int, int, int * );
24
int ioctl_ReadCopyright     ( int, int, int * );
25
int ioctl_ReadDiscKey       ( int, int *, uint8_t * );
25
int ioctl_ReadDiscKey       ( int, int *, u8 * );
26
int ioctl_ReadTitleKey      ( int, int *, int, uint8_t * );
26
int ioctl_ReadTitleKey      ( int, int *, int, u8 * );
27
int ioctl_ReportAgid        ( int, int * );
27
int ioctl_ReportAgid        ( int, int * );
28
int ioctl_ReportChallenge   ( int, int *, uint8_t * );
28
int ioctl_ReportChallenge   ( int, int *, u8 * );
29
int ioctl_ReportKey1        ( int, int *, uint8_t * );
29
int ioctl_ReportKey1        ( int, int *, u8 * );
30
int ioctl_ReportASF         ( int, int *, int * );
30
int ioctl_ReportASF         ( int, int *, int * );
31
int ioctl_InvalidateAgid    ( int, int * );
31
int ioctl_InvalidateAgid    ( int, int * );
32
int ioctl_SendChallenge     ( int, int *, uint8_t * );
32
int ioctl_SendChallenge     ( int, int *, u8 * );
33
int ioctl_SendKey2          ( int, int *, uint8_t * );
33
int ioctl_SendKey2          ( int, int *, u8 * );
34
int ioctl_ReportRPC         ( int, int *, int *, int * );
35
int ioctl_SendRPC           ( int, int );
36
34
37
#define DVD_KEY_SIZE 5
35
#define DVD_KEY_SIZE 5
38
#define DVD_CHALLENGE_SIZE 10
36
#define DVD_CHALLENGE_SIZE 10
39
#define DVD_DISCKEY_SIZE 2048
37
#define DVD_DISCKEY_SIZE 2048
40
38
...
...
42
 * Common macro, BeOS specific
40
 * Common macro, BeOS specific
43
 *****************************************************************************/
41
 *****************************************************************************/
44
#if defined( SYS_BEOS )
42
#if defined( SYS_BEOS )
45
#define INIT_RDC( TYPE, SIZE ) \
43
#define INIT_RDC( TYPE, SIZE ) \
46
    raw_device_command rdc; \
44
    raw_device_command rdc; \
47
    uint8_t p_buffer[ (SIZE)+1 ]; \
45
    u8 p_buffer[ (SIZE) ]; \
48
    memset( &rdc, 0, sizeof( raw_device_command ) ); \
46
    memset( &rdc, 0, sizeof( raw_device_command ) ); \
49
    rdc.data = (char *)p_buffer; \
47
    rdc.data = (char *)p_buffer; \
50
    rdc.data_length = (SIZE); \
48
    rdc.data_length = (SIZE); \
51
    BeInitRDC( &rdc, (TYPE) );
49
    BeInitRDC( &rdc, (TYPE) );
52
#endif
50
#endif
...
...
55
 * Common macro, HP-UX specific
53
 * Common macro, HP-UX specific
56
 *****************************************************************************/
54
 *****************************************************************************/
57
#if defined( HPUX_SCTL_IO )
55
#if defined( HPUX_SCTL_IO )
58
#define INIT_SCTL_IO( TYPE, SIZE ) \
56
#define INIT_SCTL_IO( TYPE, SIZE ) \
59
    struct sctl_io sctl_io; \
57
    struct sctl_io sctl_io; \
60
    uint8_t p_buffer[ (SIZE)+1 ]; \
58
    u8 p_buffer[ (SIZE) ]; \
61
    memset( &sctl_io, 0, sizeof( sctl_io ) ); \
59
    memset( &sctl_io, 0, sizeof( sctl_io ) ); \
62
    sctl_io.data = (void *)p_buffer; \
60
    sctl_io.data = (void *)p_buffer; \
63
    sctl_io.data_length = (SIZE); \
61
    sctl_io.data_length = (SIZE); \
64
    HPUXInitSCTL( &sctl_io, (TYPE) );
62
    HPUXInitSCTL( &sctl_io, (TYPE) );
65
#endif
63
#endif
...
...
71
#define USCSI_TIMEOUT( SC, TO ) ( (SC)->uscsi_timeout = (TO) )
69
#define USCSI_TIMEOUT( SC, TO ) ( (SC)->uscsi_timeout = (TO) )
72
#define USCSI_RESID( SC )       ( (SC)->uscsi_resid )
70
#define USCSI_RESID( SC )       ( (SC)->uscsi_resid )
73
#define INIT_USCSI( TYPE, SIZE ) \
71
#define INIT_USCSI( TYPE, SIZE ) \
74
    struct uscsi_cmd sc; \
72
    struct uscsi_cmd sc; \
75
    union scsi_cdb rs_cdb; \
73
    union scsi_cdb rs_cdb; \
76
    uint8_t p_buffer[ (SIZE)+1 ]; \
74
    u8 p_buffer[ (SIZE) ]; \
77
    memset( &sc, 0, sizeof( struct uscsi_cmd ) ); \
75
    memset( &sc, 0, sizeof( struct uscsi_cmd ) ); \
78
    sc.uscsi_cdb = (caddr_t)&rs_cdb; \
76
    sc.uscsi_cdb = (caddr_t)&rs_cdb; \
79
    sc.uscsi_bufaddr = (caddr_t)p_buffer; \
77
    sc.uscsi_bufaddr = p_buffer; \
80
    sc.uscsi_buflen = (SIZE); \
78
    sc.uscsi_buflen = (SIZE); \
81
    SolarisInitUSCSI( &sc, (TYPE) );
79
    SolarisInitUSCSI( &sc, (TYPE) );
82
#endif
80
#endif
83
81
84
/*****************************************************************************
82
/*****************************************************************************
85
 * Common macro, Darwin specific
83
 * Common macro, Darwin specific
86
 *****************************************************************************/
84
 *****************************************************************************/
87
#if defined( DARWIN_DVD_IOCTL )
85
#if defined( SYS_DARWIN )
88
#define INIT_DVDIOCTL( DKDVD_TYPE, BUFFER_TYPE, FORMAT ) \
86
#define INIT_DVDIOCTL( SIZE ) \
89
    DKDVD_TYPE dvd; \
87
    dvdioctl_data_t dvdioctl; \
90
    BUFFER_TYPE dvdbs; \
88
    u8 p_buffer[ (SIZE) ]; \
91
    memset( &dvd, 0, sizeof(dvd) ); \
89
    dvdioctl.p_buffer = p_buffer; \
92
    memset( &dvdbs, 0, sizeof(dvdbs) ); \
90
    dvdioctl.i_size = (SIZE); \
93
    dvd.format = FORMAT; \
91
    dvdioctl.i_keyclass = kCSS_CSS2_CPRM; \
94
    dvd.buffer = &dvdbs; \
92
    memset( p_buffer, 0, (SIZE) );
95
    dvd.bufferLength = sizeof(dvdbs);
96
#endif
93
#endif
97
94
98
/*****************************************************************************
95
/*****************************************************************************
99
 * Common macro, win32 specific
96
 * Common macro, win32 (ASPI) specific
100
 *****************************************************************************/
97
 *****************************************************************************/
101
#if defined( WIN32 )
98
#if defined( WIN32 )
102
#define INIT_SPTD( TYPE, SIZE ) \
103
    DWORD tmp; \
104
    SCSI_PASS_THROUGH_DIRECT sptd; \
105
    uint8_t p_buffer[ (SIZE) ]; \
106
    memset( &sptd, 0, sizeof( SCSI_PASS_THROUGH_DIRECT ) ); \
107
    sptd.Length = sizeof( SCSI_PASS_THROUGH_DIRECT ); \
108
    sptd.DataBuffer = p_buffer; \
109
    sptd.DataTransferLength = (SIZE); \
110
    WinInitSPTD( &sptd, (TYPE) );
111
#define SEND_SPTD( DEV, SPTD, TMP ) \
112
    (DeviceIoControl( (HANDLE)(DEV), IOCTL_SCSI_PASS_THROUGH_DIRECT, \
113
                      (SPTD), sizeof( SCSI_PASS_THROUGH_DIRECT ), \
114
                      (SPTD), sizeof( SCSI_PASS_THROUGH_DIRECT ), \
115
                      (TMP), NULL ) ? 0 : -1)
116
#define INIT_SSC( TYPE, SIZE ) \
99
#define INIT_SSC( TYPE, SIZE ) \
117
    struct SRB_ExecSCSICmd ssc; \
100
    struct SRB_ExecSCSICmd ssc; \
118
    uint8_t p_buffer[ (SIZE)+1 ]; \
101
    u8 p_buffer[ (SIZE) ]; \
119
    memset( &ssc, 0, sizeof( struct SRB_ExecSCSICmd ) ); \
102
    memset( &ssc, 0, sizeof( struct SRB_ExecSCSICmd ) ); \
120
    ssc.SRB_BufPointer = (char *)p_buffer; \
103
    ssc.SRB_BufPointer = (char *)p_buffer; \
121
    ssc.SRB_BufLen = (SIZE); \
104
    ssc.SRB_BufLen = (SIZE); \
122
    WinInitSSC( &ssc, (TYPE) );
105
    WinInitSSC( &ssc, (TYPE) );
123
#endif
106
#endif
124
107
125
/*****************************************************************************
108
/*****************************************************************************
126
 * Common macro, QNX specific
127
 *****************************************************************************/
128
#if defined( __QNXNTO__ )
129
#define INIT_CPT( TYPE, SIZE ) \
130
    CAM_PASS_THRU * p_cpt; \
131
    uint8_t * p_buffer; \
132
    int structSize = sizeof( CAM_PASS_THRU ) + (SIZE); \
133
    p_cpt = (CAM_PASS_THRU *) malloc ( structSize ); \
134
    p_buffer = (uint8_t *) p_cpt + sizeof( CAM_PASS_THRU ); \
135
    memset( p_cpt, 0, structSize ); \
136
      p_cpt->cam_data_ptr = sizeof( CAM_PASS_THRU ); \
137
      p_cpt->cam_dxfer_len = (SIZE); \
138
    QNXInitCPT( p_cpt, (TYPE) );
139
#endif
140
141
/*****************************************************************************
142
 * Common macro, OS2 specific
143
 *****************************************************************************/
144
#if defined( SYS_OS2 )
145
#define INIT_SSC( TYPE, SIZE ) \
146
    struct OS2_ExecSCSICmd sdc; \
147
    uint8_t p_buffer[ (SIZE)+1 ]; \
148
    unsigned long ulParamLen; \
149
    unsigned long ulDataLen; \
150
    memset( &sdc, 0, sizeof( OS2_ExecSCSICmd ) ); \
151
    memset( &p_buffer, 0, SIZE ); \
152
    sdc.data_length = (SIZE); \
153
    ulParamLen = sizeof(sdc); \
154
    OS2InitSDC( &sdc, (TYPE) )
155
#endif
156
157
/*****************************************************************************
158
 * Additional types, OpenBSD specific
109
 * Additional types, OpenBSD specific
159
 *****************************************************************************/
110
 *****************************************************************************/
160
#if defined( HAVE_OPENBSD_DVD_STRUCT )
111
#if defined( HAVE_OPENBSD_DVD_STRUCT )
161
typedef union dvd_struct dvd_struct;
112
typedef union dvd_struct dvd_struct;
162
typedef union dvd_authinfo dvd_authinfo;
113
typedef union dvd_authinfo dvd_authinfo;
163
#endif
114
#endif
164
115
165
/*****************************************************************************
116
/*****************************************************************************
166
 * Various DVD I/O tables
117
 * Various DVD I/O tables
167
 *****************************************************************************/
118
 *****************************************************************************/
168
#if defined( SYS_BEOS ) || defined( WIN32 ) || defined ( SOLARIS_USCSI ) || defined ( HPUX_SCTL_IO ) || defined ( __QNXNTO__ ) || defined ( SYS_OS2 )
119
#if defined( SYS_BEOS ) || defined( WIN32 ) || defined ( SOLARIS_USCSI ) || defined ( HPUX_SCTL_IO )
169
    /* The generic packet command opcodes for CD/DVD Logical Units,
120
    /* The generic packet command opcodes for CD/DVD Logical Units,
170
     * From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */
121
     * From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */
171
#   define GPCMD_READ_DVD_STRUCTURE 0xad
122
#   define GPCMD_READ_DVD_STRUCTURE 0xad
172
#   define GPCMD_REPORT_KEY         0xa4
123
#   define GPCMD_REPORT_KEY         0xa4
173
#   define GPCMD_SEND_KEY           0xa3
124
#   define GPCMD_SEND_KEY           0xa3
...
...
200
151
201
#define IOCTL_DVD_START_SESSION         CTL_CODE(FILE_DEVICE_DVD, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS)
152
#define IOCTL_DVD_START_SESSION         CTL_CODE(FILE_DEVICE_DVD, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS)
202
#define IOCTL_DVD_READ_KEY              CTL_CODE(FILE_DEVICE_DVD, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS)
153
#define IOCTL_DVD_READ_KEY              CTL_CODE(FILE_DEVICE_DVD, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS)
203
#define IOCTL_DVD_SEND_KEY              CTL_CODE(FILE_DEVICE_DVD, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS)
154
#define IOCTL_DVD_SEND_KEY              CTL_CODE(FILE_DEVICE_DVD, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS)
204
#define IOCTL_DVD_END_SESSION           CTL_CODE(FILE_DEVICE_DVD, 0x0403, METHOD_BUFFERED, FILE_READ_ACCESS)
155
#define IOCTL_DVD_END_SESSION           CTL_CODE(FILE_DEVICE_DVD, 0x0403, METHOD_BUFFERED, FILE_READ_ACCESS)
205
#define IOCTL_DVD_GET_REGION            CTL_CODE(FILE_DEVICE_DVD, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS)
156
206
#define IOCTL_DVD_SEND_KEY2             CTL_CODE(FILE_DEVICE_DVD, 0x0406, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
207
#define IOCTL_DVD_READ_STRUCTURE        CTL_CODE(FILE_DEVICE_DVD, 0x0450, METHOD_BUFFERED, FILE_READ_ACCESS)
208
#define IOCTL_SCSI_PASS_THROUGH_DIRECT  CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
157
#define IOCTL_SCSI_PASS_THROUGH_DIRECT  CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
209
158
210
#define DVD_CHALLENGE_KEY_LENGTH        (12 + sizeof(DVD_COPY_PROTECT_KEY))
159
#define DVD_CHALLENGE_KEY_LENGTH        (12 + sizeof(DVD_COPY_PROTECT_KEY))
211
#define DVD_BUS_KEY_LENGTH              (8 + sizeof(DVD_COPY_PROTECT_KEY))
160
#define DVD_BUS_KEY_LENGTH              (8 + sizeof(DVD_COPY_PROTECT_KEY))
212
#define DVD_TITLE_KEY_LENGTH            (8 + sizeof(DVD_COPY_PROTECT_KEY))
213
#define DVD_DISK_KEY_LENGTH             (2048 + sizeof(DVD_COPY_PROTECT_KEY))
161
#define DVD_DISK_KEY_LENGTH             (2048 + sizeof(DVD_COPY_PROTECT_KEY))
214
#define DVD_RPC_KEY_LENGTH              (sizeof(DVD_RPC_KEY) + sizeof(DVD_COPY_PROTECT_KEY))
215
#define DVD_ASF_LENGTH                  (sizeof(DVD_ASF) + sizeof(DVD_COPY_PROTECT_KEY))
162
#define DVD_ASF_LENGTH                  (sizeof(DVD_ASF) + sizeof(DVD_COPY_PROTECT_KEY))
216
217
#define DVD_COPYRIGHT_MASK              0x00000040
218
#define DVD_NOT_COPYRIGHTED             0x00000000
219
#define DVD_COPYRIGHTED                 0x00000040
220
221
#define DVD_SECTOR_PROTECT_MASK         0x00000020
222
#define DVD_SECTOR_NOT_PROTECTED        0x00000000
223
#define DVD_SECTOR_PROTECTED            0x00000020
224
163
225
#define SCSI_IOCTL_DATA_OUT             0
164
#define SCSI_IOCTL_DATA_OUT             0
226
#define SCSI_IOCTL_DATA_IN              1
165
#define SCSI_IOCTL_DATA_IN              1
227
166
228
typedef ULONG DVD_SESSION_ID, *PDVD_SESSION_ID;
167
typedef ULONG DVD_SESSION_ID, *PDVD_SESSION_ID;
229
230
typedef enum DVD_STRUCTURE_FORMAT {
231
    DvdPhysicalDescriptor,
232
    DvdCopyrightDescriptor,
233
    DvdDiskKeyDescriptor,
234
    DvdBCADescriptor,
235
    DvdManufacturerDescriptor,
236
    DvdMaxDescriptor
237
} DVD_STRUCTURE_FORMAT, *PDVD_STRUCTURE_FORMAT;
238
239
typedef struct DVD_READ_STRUCTURE {
240
    LARGE_INTEGER BlockByteOffset;
241
    DVD_STRUCTURE_FORMAT Format;
242
    DVD_SESSION_ID SessionId;
243
    UCHAR LayerNumber;
244
} DVD_READ_STRUCTURE, *PDVD_READ_STRUCTURE;
245
246
typedef struct DVD_COPYRIGHT_DESCRIPTOR {
247
    UCHAR CopyrightProtectionType;
248
    UCHAR RegionManagementInformation;
249
    USHORT Reserved;
250
} DVD_COPYRIGHT_DESCRIPTOR, *PDVD_COPYRIGHT_DESCRIPTOR;
251
168
252
typedef enum
169
typedef enum
253
{
170
{
254
    DvdChallengeKey = 0x01,
171
    DvdChallengeKey = 0x01,
255
    DvdBusKey1,
172
    DvdBusKey1,
...
...
260
    DvdGetRpcKey = 0x8,
177
    DvdGetRpcKey = 0x8,
261
    DvdDiskKey = 0x80,
178
    DvdDiskKey = 0x80,
262
    DvdInvalidateAGID = 0x3f
179
    DvdInvalidateAGID = 0x3f
263
} DVD_KEY_TYPE;
180
} DVD_KEY_TYPE;
264
181
265
typedef struct DVD_COPY_PROTECT_KEY
182
typedef struct _DVD_COPY_PROTECT_KEY
266
{
183
{
267
    ULONG KeyLength;
184
    ULONG KeyLength;
268
    DVD_SESSION_ID SessionId;
185
    DVD_SESSION_ID SessionId;
269
    DVD_KEY_TYPE KeyType;
186
    DVD_KEY_TYPE KeyType;
270
    ULONG KeyFlags;
187
    ULONG KeyFlags;
...
...
278
        LARGE_INTEGER TitleOffset;
195
        LARGE_INTEGER TitleOffset;
279
    } Parameters;
196
    } Parameters;
280
    UCHAR KeyData[0];
197
    UCHAR KeyData[0];
281
} DVD_COPY_PROTECT_KEY, *PDVD_COPY_PROTECT_KEY;
198
} DVD_COPY_PROTECT_KEY, *PDVD_COPY_PROTECT_KEY;
282
199
283
typedef struct DVD_ASF
200
typedef struct _DVD_ASF
284
{
201
{
285
    UCHAR Reserved0[3];
202
    UCHAR Reserved0[3];
286
    UCHAR SuccessFlag:1;
203
    UCHAR SuccessFlag:1;
287
    UCHAR Reserved1:7;
204
    UCHAR Reserved1:7;
288
} DVD_ASF, * PDVD_ASF;
205
} DVD_ASF, * PDVD_ASF;
289
206
290
typedef struct DVD_RPC_KEY
291
{
292
    UCHAR UserResetsAvailable:3;
293
    UCHAR ManufacturerResetsAvailable:3;
294
    UCHAR TypeCode:2;
295
    UCHAR RegionMask;
296
    UCHAR RpcScheme;
297
    UCHAR Reserved2[1];
298
} DVD_RPC_KEY, * PDVD_RPC_KEY;
299
300
typedef struct SCSI_PASS_THROUGH_DIRECT
207
typedef struct _SCSI_PASS_THROUGH_DIRECT
301
{
208
{
302
    USHORT Length;
209
    USHORT Length;
303
    UCHAR ScsiStatus;
210
    UCHAR ScsiStatus;
304
    UCHAR PathId;
211
    UCHAR PathId;
305
    UCHAR TargetId;
212
    UCHAR TargetId;
...
...
316
223
317
/*****************************************************************************
224
/*****************************************************************************
318
 * win32 aspi specific
225
 * win32 aspi specific
319
 *****************************************************************************/
226
 *****************************************************************************/
320
227
321
typedef DWORD (CALLBACK *GETASPI32SUPPORTINFO)(VOID);
322
typedef DWORD (CALLBACK *SENDASPI32COMMAND)(LPVOID);
323
324
#define WIN2K               ( GetVersion() < 0x80000000 )
228
#define WIN2K               ( GetVersion() < 0x80000000 )
325
#define ASPI_HAID           0
229
#define ASPI_HAID           0
326
#define ASPI_TARGET         0
230
#define ASPI_TARGET         0
327
#define DTYPE_CDROM         0x05
328
231
329
#define SENSE_LEN           0x0E
232
#define SENSE_LEN           0x0E
330
#define SC_GET_DEV_TYPE     0x01
331
#define SC_EXEC_SCSI_CMD    0x02
233
#define SC_EXEC_SCSI_CMD    0x02
332
#define SC_GET_DISK_INFO    0x06
234
#define SC_GET_DISK_INFO    0x06
333
#define SS_COMP             0x01
235
#define SS_COMP             0x01
334
#define SS_PENDING          0x00
236
#define SS_PENDING          0x00
335
#define SS_NO_ADAPTERS      0xE8
237
#define SS_NO_ADAPTERS      0xE8
...
...
340
struct w32_aspidev
242
struct w32_aspidev
341
{
243
{
342
    long  hASPI;
244
    long  hASPI;
343
    short i_sid;
245
    short i_sid;
344
    int   i_blocks;
246
    int   i_blocks;
345
    SENDASPI32COMMAND lpSendCommand;
247
    long  (*lpSendCommand)( void* );
346
};
248
};
347
249
348
#pragma pack(1)
250
#pragma pack(1)
349
251
350
struct SRB_GetDiskInfo
252
struct SRB_GetDiskInfo
...
...
359
    unsigned char   SRB_DriveFlags;
261
    unsigned char   SRB_DriveFlags;
360
    unsigned char   SRB_Int13HDriveInfo;
262
    unsigned char   SRB_Int13HDriveInfo;
361
    unsigned char   SRB_Heads;
263
    unsigned char   SRB_Heads;
362
    unsigned char   SRB_Sectors;
264
    unsigned char   SRB_Sectors;
363
    unsigned char   SRB_Rsvd1[22];
265
    unsigned char   SRB_Rsvd1[22];
364
};
365
366
struct SRB_GDEVBlock
367
{
368
    unsigned char SRB_Cmd;
369
    unsigned char SRB_Status;
370
    unsigned char SRB_HaId;
371
    unsigned char SRB_Flags;
372
    unsigned long SRB_Hdr_Rsvd;
373
    unsigned char SRB_Target;
374
    unsigned char SRB_Lun;
375
    unsigned char SRB_DeviceType;
376
    unsigned char SRB_Rsvd1;
377
};
266
};
378
267
379
struct SRB_ExecSCSICmd
268
struct SRB_ExecSCSICmd
380
{
269
{
381
    unsigned char   SRB_Cmd;
270
    unsigned char   SRB_Cmd;
...
...
400
289
401
#pragma pack()
290
#pragma pack()
402
291
403
#endif
292
#endif
404
293
405
/*****************************************************************************
406
 * OS2 ioctl specific
407
 *****************************************************************************/
408
#if defined( SYS_OS2 )
409
410
#define CDROMDISK_EXECMD      0x7A
411
412
#define EX_DIRECTION_IN       0x01
413
#define EX_PLAYING_CHK        0x02
414
415
#pragma pack(1)
416
417
struct OS2_ExecSCSICmd
418
{
419
    unsigned long   id_code;      // 'CD01'
420
    unsigned short  data_length;  // length of the Data Packet
421
    unsigned short  cmd_length;   // length of the Command Buffer
422
    unsigned short  flags;        // flags
423
    unsigned char   command[16];  // Command Buffer for SCSI command
424
425
} OS2_ExecSCSICmd;
426
427
#pragma pack()
428
429
#endif