annotate libdvdcss/ioctl.h @ 35980:613cb10f919c

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