Mercurial > mplayer.hg
annotate libmpdvdkit2/ioctl.h @ 9011:3c50bffd7beb
more ?'s
author | arpi |
---|---|
date | Sun, 19 Jan 2003 01:17:15 +0000 |
parents | 0211de3039eb |
children | f0f0f176d298 |
rev | line source |
---|---|
7027 | 1 /***************************************************************************** |
2 * ioctl.h: DVD ioctl replacement function | |
3 ***************************************************************************** | |
4 * Copyright (C) 1999-2001 VideoLAN | |
5 * $Id$ | |
6 * | |
7 * Authors: Samuel Hocevar <sam@zoy.org> | |
8 * | |
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 | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. | |
22 *****************************************************************************/ | |
23 | |
24 int ioctl_ReadCopyright ( int, int, int * ); | |
25 int ioctl_ReadDiscKey ( int, int *, u8 * ); | |
26 int ioctl_ReadTitleKey ( int, int *, int, u8 * ); | |
27 int ioctl_ReportAgid ( int, int * ); | |
28 int ioctl_ReportChallenge ( int, int *, u8 * ); | |
29 int ioctl_ReportKey1 ( int, int *, u8 * ); | |
30 int ioctl_ReportASF ( int, int *, int * ); | |
31 int ioctl_InvalidateAgid ( int, int * ); | |
32 int ioctl_SendChallenge ( int, int *, u8 * ); | |
33 int ioctl_SendKey2 ( int, int *, u8 * ); | |
34 | |
35 #define DVD_KEY_SIZE 5 | |
36 #define DVD_CHALLENGE_SIZE 10 | |
37 #define DVD_DISCKEY_SIZE 2048 | |
38 | |
39 /***************************************************************************** | |
40 * Common macro, BeOS specific | |
41 *****************************************************************************/ | |
42 #if defined( SYS_BEOS ) | |
43 #define INIT_RDC( TYPE, SIZE ) \ | |
44 raw_device_command rdc; \ | |
45 u8 p_buffer[ (SIZE) ]; \ | |
46 memset( &rdc, 0, sizeof( raw_device_command ) ); \ | |
47 rdc.data = (char *)p_buffer; \ | |
48 rdc.data_length = (SIZE); \ | |
49 BeInitRDC( &rdc, (TYPE) ); | |
50 #endif | |
51 | |
52 /***************************************************************************** | |
53 * Common macro, HP-UX specific | |
54 *****************************************************************************/ | |
55 #if defined( HPUX_SCTL_IO ) | |
56 #define INIT_SCTL_IO( TYPE, SIZE ) \ | |
57 struct sctl_io sctl_io; \ | |
58 u8 p_buffer[ (SIZE) ]; \ | |
59 memset( &sctl_io, 0, sizeof( sctl_io ) ); \ | |
60 sctl_io.data = (void *)p_buffer; \ | |
61 sctl_io.data_length = (SIZE); \ | |
62 HPUXInitSCTL( &sctl_io, (TYPE) ); | |
63 #endif | |
64 | |
65 /***************************************************************************** | |
66 * Common macro, Solaris specific | |
67 *****************************************************************************/ | |
68 #if defined( SOLARIS_USCSI ) | |
69 #define USCSI_TIMEOUT( SC, TO ) ( (SC)->uscsi_timeout = (TO) ) | |
70 #define USCSI_RESID( SC ) ( (SC)->uscsi_resid ) | |
71 #define INIT_USCSI( TYPE, SIZE ) \ | |
72 struct uscsi_cmd sc; \ | |
73 union scsi_cdb rs_cdb; \ | |
74 u8 p_buffer[ (SIZE) ]; \ | |
75 memset( &sc, 0, sizeof( struct uscsi_cmd ) ); \ | |
76 sc.uscsi_cdb = (caddr_t)&rs_cdb; \ | |
77 sc.uscsi_bufaddr = p_buffer; \ | |
78 sc.uscsi_buflen = (SIZE); \ | |
79 SolarisInitUSCSI( &sc, (TYPE) ); | |
80 #endif | |
81 | |
82 /***************************************************************************** | |
83 * Common macro, Darwin specific | |
84 *****************************************************************************/ | |
85 #if defined( DARWIN_DVD_IOCTL ) | |
86 #define INIT_DVDIOCTL( DKDVD_TYPE, BUFFER_TYPE, FORMAT ) \ | |
87 DKDVD_TYPE dvd; \ | |
88 BUFFER_TYPE dvdbs; \ | |
89 memset( &dvd, 0, sizeof(dvd) ); \ | |
90 memset( &dvdbs, 0, sizeof(dvdbs) ); \ | |
91 dvd.format = FORMAT; \ | |
92 dvd.buffer = &dvdbs; \ | |
93 dvd.bufferLength = sizeof(dvdbs); | |
94 #endif | |
95 | |
96 /***************************************************************************** | |
97 * Common macro, win32 (ASPI) specific | |
98 *****************************************************************************/ | |
99 #if defined( WIN32 ) | |
100 #define INIT_SSC( TYPE, SIZE ) \ | |
101 struct SRB_ExecSCSICmd ssc; \ | |
102 u8 p_buffer[ (SIZE) ]; \ | |
103 memset( &ssc, 0, sizeof( struct SRB_ExecSCSICmd ) ); \ | |
104 ssc.SRB_BufPointer = (char *)p_buffer; \ | |
105 ssc.SRB_BufLen = (SIZE); \ | |
106 WinInitSSC( &ssc, (TYPE) ); | |
107 #endif | |
108 | |
109 /***************************************************************************** | |
110 * Common macro, QNX specific | |
111 *****************************************************************************/ | |
112 #if defined( __QNXNTO__ ) | |
113 #define INIT_CPT( TYPE, SIZE ) \ | |
114 CAM_PASS_THRU * p_cpt; \ | |
115 uint8_t * p_buffer; \ | |
116 int structSize = sizeof( CAM_PASS_THRU ) + (SIZE); \ | |
117 p_cpt = (CAM_PASS_THRU *) malloc ( structSize ); \ | |
118 p_buffer = (uint8_t *) p_cpt + sizeof( CAM_PASS_THRU ); \ | |
119 memset( p_cpt, 0, structSize ); \ | |
120 p_cpt->cam_data_ptr = sizeof( CAM_PASS_THRU ); \ | |
121 p_cpt->cam_dxfer_len = (SIZE); \ | |
122 QNXInitCPT( p_cpt, (TYPE) ); | |
123 #endif | |
124 | |
125 /***************************************************************************** | |
126 * Common macro, OS2 specific | |
127 *****************************************************************************/ | |
128 #if defined( SYS_OS2 ) | |
129 #define INIT_SSC( TYPE, SIZE ) \ | |
130 struct OS2_ExecSCSICmd sdc; \ | |
131 u8 p_buffer[ (SIZE) ]; \ | |
132 unsigned long ulParamLen; \ | |
133 unsigned long ulDataLen; \ | |
134 memset( &sdc, 0, sizeof( OS2_ExecSCSICmd ) ); \ | |
135 memset( &p_buffer, 0, SIZE ); \ | |
136 sdc.data_length = (SIZE); \ | |
137 ulParamLen = sizeof(sdc); \ | |
138 OS2InitSDC( &sdc, (TYPE) ) | |
139 #endif | |
140 | |
141 /***************************************************************************** | |
142 * Additional types, OpenBSD specific | |
143 *****************************************************************************/ | |
144 #if defined( HAVE_OPENBSD_DVD_STRUCT ) | |
145 typedef union dvd_struct dvd_struct; | |
146 typedef union dvd_authinfo dvd_authinfo; | |
147 #endif | |
148 | |
149 /***************************************************************************** | |
150 * Various DVD I/O tables | |
151 *****************************************************************************/ | |
152 #if defined( SYS_BEOS ) || defined( WIN32 ) || defined ( SOLARIS_USCSI ) || defined ( HPUX_SCTL_IO ) || defined ( __QNXNTO__ ) || defined ( SYS_OS2 ) | |
153 /* The generic packet command opcodes for CD/DVD Logical Units, | |
154 * From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */ | |
155 # define GPCMD_READ_DVD_STRUCTURE 0xad | |
156 # define GPCMD_REPORT_KEY 0xa4 | |
157 # define GPCMD_SEND_KEY 0xa3 | |
158 /* DVD struct types */ | |
159 # define DVD_STRUCT_PHYSICAL 0x00 | |
160 # define DVD_STRUCT_COPYRIGHT 0x01 | |
161 # define DVD_STRUCT_DISCKEY 0x02 | |
162 # define DVD_STRUCT_BCA 0x03 | |
163 # define DVD_STRUCT_MANUFACT 0x04 | |
164 /* Key formats */ | |
165 # define DVD_REPORT_AGID 0x00 | |
166 # define DVD_REPORT_CHALLENGE 0x01 | |
167 # define DVD_SEND_CHALLENGE 0x01 | |
168 # define DVD_REPORT_KEY1 0x02 | |
169 # define DVD_SEND_KEY2 0x03 | |
170 # define DVD_REPORT_TITLE_KEY 0x04 | |
171 # define DVD_REPORT_ASF 0x05 | |
172 # define DVD_SEND_RPC 0x06 | |
173 # define DVD_REPORT_RPC 0x08 | |
174 # define DVD_INVALIDATE_AGID 0x3f | |
175 #endif | |
176 | |
177 /***************************************************************************** | |
178 * win32 ioctl specific | |
179 *****************************************************************************/ | |
180 #if defined( WIN32 ) | |
181 | |
182 #define WIN32_LEAN_AND_MEAN | |
183 #include <windows.h> | |
184 | |
185 #define IOCTL_DVD_START_SESSION CTL_CODE(FILE_DEVICE_DVD, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS) | |
186 #define IOCTL_DVD_READ_KEY CTL_CODE(FILE_DEVICE_DVD, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS) | |
187 #define IOCTL_DVD_SEND_KEY CTL_CODE(FILE_DEVICE_DVD, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS) | |
188 #define IOCTL_DVD_END_SESSION CTL_CODE(FILE_DEVICE_DVD, 0x0403, METHOD_BUFFERED, FILE_READ_ACCESS) | |
189 #define IOCTL_DVD_GET_REGION CTL_CODE(FILE_DEVICE_DVD, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS) | |
190 #define IOCTL_DVD_SEND_KEY2 CTL_CODE(FILE_DEVICE_DVD, 0x0406, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
191 #define IOCTL_DVD_READ_STRUCTURE CTL_CODE(FILE_DEVICE_DVD, 0x0450, METHOD_BUFFERED, FILE_READ_ACCESS) |
7027 | 192 #define IOCTL_SCSI_PASS_THROUGH_DIRECT CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) |
193 | |
194 #define DVD_CHALLENGE_KEY_LENGTH (12 + sizeof(DVD_COPY_PROTECT_KEY)) | |
195 #define DVD_BUS_KEY_LENGTH (8 + sizeof(DVD_COPY_PROTECT_KEY)) | |
196 #define DVD_TITLE_KEY_LENGTH (8 + sizeof(DVD_COPY_PROTECT_KEY)) | |
197 #define DVD_DISK_KEY_LENGTH (2048 + sizeof(DVD_COPY_PROTECT_KEY)) | |
198 #define DVD_ASF_LENGTH (sizeof(DVD_ASF) + sizeof(DVD_COPY_PROTECT_KEY)) | |
199 #define DVD_REGION_LENGTH (sizeof(DVD_REGION)) | |
200 | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
201 #define DVD_COPYRIGHT_MASK 0x00000040 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
202 #define DVD_NOT_COPYRIGHTED 0x00000000 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
203 #define DVD_COPYRIGHTED 0x00000040 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
204 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
205 #define DVD_SECTOR_PROTECT_MASK 0x00000020 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
206 #define DVD_SECTOR_NOT_PROTECTED 0x00000000 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
207 #define DVD_SECTOR_PROTECTED 0x00000020 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
208 |
7027 | 209 #define SCSI_IOCTL_DATA_OUT 0 |
210 #define SCSI_IOCTL_DATA_IN 1 | |
211 | |
212 typedef ULONG DVD_SESSION_ID, *PDVD_SESSION_ID; | |
213 | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
214 typedef enum DVD_STRUCTURE_FORMAT { |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
215 DvdPhysicalDescriptor, |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
216 DvdCopyrightDescriptor, |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
217 DvdDiskKeyDescriptor, |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
218 DvdBCADescriptor, |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
219 DvdManufacturerDescriptor, |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
220 DvdMaxDescriptor |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
221 } DVD_STRUCTURE_FORMAT, *PDVD_STRUCTURE_FORMAT; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
222 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
223 typedef struct DVD_READ_STRUCTURE { |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
224 LARGE_INTEGER BlockByteOffset; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
225 DVD_STRUCTURE_FORMAT Format; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
226 DVD_SESSION_ID SessionId; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
227 UCHAR LayerNumber; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
228 } DVD_READ_STRUCTURE, *PDVD_READ_STRUCTURE; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
229 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
230 typedef struct _DVD_COPYRIGHT_DESCRIPTOR { |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
231 UCHAR CopyrightProtectionType; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
232 UCHAR RegionManagementInformation; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
233 USHORT Reserved; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
234 } DVD_COPYRIGHT_DESCRIPTOR, *PDVD_COPYRIGHT_DESCRIPTOR; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
235 |
7027 | 236 typedef enum |
237 { | |
238 DvdChallengeKey = 0x01, | |
239 DvdBusKey1, | |
240 DvdBusKey2, | |
241 DvdTitleKey, | |
242 DvdAsf, | |
243 DvdSetRpcKey = 0x6, | |
244 DvdGetRpcKey = 0x8, | |
245 DvdDiskKey = 0x80, | |
246 DvdInvalidateAGID = 0x3f | |
247 } DVD_KEY_TYPE; | |
248 | |
249 typedef struct _DVD_COPY_PROTECT_KEY | |
250 { | |
251 ULONG KeyLength; | |
252 DVD_SESSION_ID SessionId; | |
253 DVD_KEY_TYPE KeyType; | |
254 ULONG KeyFlags; | |
255 union | |
256 { | |
257 struct | |
258 { | |
259 ULONG FileHandle; | |
260 ULONG Reserved; // used for NT alignment | |
261 }; | |
262 LARGE_INTEGER TitleOffset; | |
263 } Parameters; | |
264 UCHAR KeyData[0]; | |
265 } DVD_COPY_PROTECT_KEY, *PDVD_COPY_PROTECT_KEY; | |
266 | |
267 typedef struct _DVD_ASF | |
268 { | |
269 UCHAR Reserved0[3]; | |
270 UCHAR SuccessFlag:1; | |
271 UCHAR Reserved1:7; | |
272 } DVD_ASF, * PDVD_ASF; | |
273 | |
274 typedef struct _DVD_REGION { | |
275 UCHAR CopySystem; | |
276 UCHAR RegionData; | |
277 UCHAR SystemRegion; | |
278 UCHAR ResetCount; | |
279 } DVD_REGION, *PDVD_REGION; | |
280 | |
281 typedef struct _SCSI_PASS_THROUGH_DIRECT | |
282 { | |
283 USHORT Length; | |
284 UCHAR ScsiStatus; | |
285 UCHAR PathId; | |
286 UCHAR TargetId; | |
287 UCHAR Lun; | |
288 UCHAR CdbLength; | |
289 UCHAR SenseInfoLength; | |
290 UCHAR DataIn; | |
291 ULONG DataTransferLength; | |
292 ULONG TimeOutValue; | |
293 PVOID DataBuffer; | |
294 ULONG SenseInfoOffset; | |
295 UCHAR Cdb[16]; | |
296 } SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT; | |
297 | |
298 /***************************************************************************** | |
299 * win32 aspi specific | |
300 *****************************************************************************/ | |
301 | |
302 #define WIN2K ( GetVersion() < 0x80000000 ) | |
303 #define ASPI_HAID 0 | |
304 #define ASPI_TARGET 0 | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
305 #define DTYPE_CDROM 0x05 |
7027 | 306 |
307 #define SENSE_LEN 0x0E | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
308 #define SC_GET_DEV_TYPE 0x01 |
7027 | 309 #define SC_EXEC_SCSI_CMD 0x02 |
310 #define SC_GET_DISK_INFO 0x06 | |
311 #define SS_COMP 0x01 | |
312 #define SS_PENDING 0x00 | |
313 #define SS_NO_ADAPTERS 0xE8 | |
314 #define SRB_DIR_IN 0x08 | |
315 #define SRB_DIR_OUT 0x10 | |
316 #define SRB_EVENT_NOTIFY 0x40 | |
317 | |
318 struct w32_aspidev | |
319 { | |
320 long hASPI; | |
321 short i_sid; | |
322 int i_blocks; | |
323 long (*lpSendCommand)( void* ); | |
324 }; | |
325 | |
326 #pragma pack(1) | |
327 | |
328 struct SRB_GetDiskInfo | |
329 { | |
330 unsigned char SRB_Cmd; | |
331 unsigned char SRB_Status; | |
332 unsigned char SRB_HaId; | |
333 unsigned char SRB_Flags; | |
334 unsigned long SRB_Hdr_Rsvd; | |
335 unsigned char SRB_Target; | |
336 unsigned char SRB_Lun; | |
337 unsigned char SRB_DriveFlags; | |
338 unsigned char SRB_Int13HDriveInfo; | |
339 unsigned char SRB_Heads; | |
340 unsigned char SRB_Sectors; | |
341 unsigned char SRB_Rsvd1[22]; | |
342 }; | |
343 | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
344 struct SRB_GDEVBlock |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
345 { |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
346 unsigned char SRB_Cmd; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
347 unsigned char SRB_Status; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
348 unsigned char SRB_HaId; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
349 unsigned char SRB_Flags; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
350 unsigned long SRB_Hdr_Rsvd; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
351 unsigned char SRB_Target; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
352 unsigned char SRB_Lun; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
353 unsigned char SRB_DeviceType; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
354 unsigned char SRB_Rsvd1; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
355 }; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
356 |
7027 | 357 struct SRB_ExecSCSICmd |
358 { | |
359 unsigned char SRB_Cmd; | |
360 unsigned char SRB_Status; | |
361 unsigned char SRB_HaId; | |
362 unsigned char SRB_Flags; | |
363 unsigned long SRB_Hdr_Rsvd; | |
364 unsigned char SRB_Target; | |
365 unsigned char SRB_Lun; | |
366 unsigned short SRB_Rsvd1; | |
367 unsigned long SRB_BufLen; | |
368 unsigned char *SRB_BufPointer; | |
369 unsigned char SRB_SenseLen; | |
370 unsigned char SRB_CDBLen; | |
371 unsigned char SRB_HaStat; | |
372 unsigned char SRB_TargStat; | |
373 unsigned long *SRB_PostProc; | |
374 unsigned char SRB_Rsvd2[20]; | |
375 unsigned char CDBByte[16]; | |
376 unsigned char SenseArea[SENSE_LEN+2]; | |
377 }; | |
378 | |
379 #pragma pack() | |
380 | |
381 #endif | |
382 | |
383 /***************************************************************************** | |
384 * OS2 ioctl specific | |
385 *****************************************************************************/ | |
386 #if defined( SYS_OS2 ) | |
387 | |
388 #define CDROMDISK_EXECMD 0x7A | |
389 | |
390 #define EX_DIRECTION_IN 0x01 | |
391 #define EX_PLAYING_CHK 0x02 | |
392 | |
393 #pragma pack(1) | |
394 | |
395 struct OS2_ExecSCSICmd | |
396 { | |
397 unsigned long id_code; // 'CD01' | |
398 unsigned short data_length; // length of the Data Packet | |
399 unsigned short cmd_length; // length of the Command Buffer | |
400 unsigned short flags; // flags | |
401 unsigned char command[16]; // Command Buffer for SCSI command | |
402 | |
403 } OS2_ExecSCSICmd; | |
404 | |
405 #pragma pack() | |
406 | |
407 #endif |