annotate libdvdcss/bsdi_dvd.h @ 21189:40bb3d20a10b

Move osdep/mplayer.rc handling to the osdep Makefile.
author diego
date Sat, 25 Nov 2006 09:49:18 +0000
parents e68f255d7d64
children b015cbd37591
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 * $Id$
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
3 */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
4
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
5 #ifndef _DVD_H_
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
6 #define _DVD_H_
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
7
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
8 #include <sys/cdefs.h>
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
9 #include <machine/endian.h>
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
10 #include <sys/ioctl.h>
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
11
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
12 __BEGIN_DECLS
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
13 int dvd_cdrom_ioctl(int, unsigned long, void *);
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
14 int cdrom_blocksize(int, int);
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
15 void dvd_cdrom_debug(int);
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
16 __END_DECLS
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
17
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
18 #define ioctl(a,b,c) dvd_cdrom_ioctl((a),(b),(c))
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
19
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
20 typedef unsigned char __u8;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
21 typedef unsigned short __u16;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
22 typedef unsigned int __u32;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
23
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
24 #define DVD_READ_STRUCT 0x5390 /* Read structure */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
25 #define DVD_WRITE_STRUCT 0x5391 /* Write structure */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
26 #define DVD_AUTH 0x5392 /* Authentication */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
27
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
28 #define DVD_STRUCT_PHYSICAL 0x00
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
29 #define DVD_STRUCT_COPYRIGHT 0x01
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
30 #define DVD_STRUCT_DISCKEY 0x02
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
31 #define DVD_STRUCT_BCA 0x03
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
32 #define DVD_STRUCT_MANUFACT 0x04
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
33
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
34 struct dvd_layer {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
35 __u8 book_version : 4;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
36 __u8 book_type : 4;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
37 __u8 min_rate : 4;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
38 __u8 disc_size : 4;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
39 __u8 layer_type : 4;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
40 __u8 track_path : 1;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
41 __u8 nlayers : 2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
42 __u8 track_density : 4;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
43 __u8 linear_density : 4;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
44 __u8 bca : 1;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
45 __u32 start_sector;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
46 __u32 end_sector;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
47 __u32 end_sector_l0;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
48 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
49
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
50 struct dvd_physical {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
51 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
52 __u8 layer_num;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
53 struct dvd_layer layer[4];
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
54 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
55
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
56 struct dvd_copyright {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
57 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
58
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
59 __u8 layer_num;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
60 __u8 cpst;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
61 __u8 rmi;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
62 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
63
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
64 struct dvd_disckey {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
65 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
66
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
67 unsigned agid : 2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
68 __u8 value[2048];
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
69 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
70
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
71 struct dvd_bca {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
72 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
73
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
74 int len;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
75 __u8 value[188];
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
76 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
77
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
78 struct dvd_manufact {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
79 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
80
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
81 __u8 layer_num;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
82 int len;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
83 __u8 value[2048];
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
84 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
85
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
86 typedef union {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
87 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
88
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
89 struct dvd_physical physical;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
90 struct dvd_copyright copyright;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
91 struct dvd_disckey disckey;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
92 struct dvd_bca bca;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
93 struct dvd_manufact manufact;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
94 } dvd_struct;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
95
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
96 /*
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
97 * DVD authentication ioctl
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
98 */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
99
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
100 /* Authentication states */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
101 #define DVD_LU_SEND_AGID 0
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
102 #define DVD_HOST_SEND_CHALLENGE 1
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
103 #define DVD_LU_SEND_KEY1 2
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
104 #define DVD_LU_SEND_CHALLENGE 3
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
105 #define DVD_HOST_SEND_KEY2 4
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
106
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
107 /* Termination states */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
108 #define DVD_AUTH_ESTABLISHED 5
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
109 #define DVD_AUTH_FAILURE 6
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
110
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
111 /* Other functions */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
112 #define DVD_LU_SEND_TITLE_KEY 7
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
113 #define DVD_LU_SEND_ASF 8
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
114 #define DVD_INVALIDATE_AGID 9
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
115 #define DVD_LU_SEND_RPC_STATE 10
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
116 #define DVD_HOST_SEND_RPC_STATE 11
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
117
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
118 /* State data */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
119 typedef __u8 dvd_key[5]; /* 40-bit value, MSB is first elem. */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
120 typedef __u8 dvd_challenge[10]; /* 80-bit value, MSB is first elem. */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
121
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
122 struct dvd_lu_send_agid {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
123 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
124 unsigned agid : 2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
125 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
126
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
127 struct dvd_host_send_challenge {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
128 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
129 unsigned agid : 2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
130
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
131 dvd_challenge chal;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
132 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
133
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
134 struct dvd_send_key {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
135 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
136 unsigned agid : 2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
137
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
138 dvd_key key;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
139 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
140
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
141 struct dvd_lu_send_challenge {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
142 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
143 unsigned agid : 2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
144
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
145 dvd_challenge chal;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
146 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
147
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
148 #define DVD_CPM_NO_COPYRIGHT 0
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
149 #define DVD_CPM_COPYRIGHTED 1
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
150
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
151 #define DVD_CP_SEC_NONE 0
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
152 #define DVD_CP_SEC_EXIST 1
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
153
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
154 #define DVD_CGMS_UNRESTRICTED 0
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
155 #define DVD_CGMS_SINGLE 2
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
156 #define DVD_CGMS_RESTRICTED 3
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
157
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
158 struct dvd_lu_send_title_key {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
159 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
160 unsigned agid : 2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
161
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
162 dvd_key title_key;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
163 int lba;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
164 unsigned cpm : 1;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
165 unsigned cp_sec : 1;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
166 unsigned cgms : 2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
167 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
168
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
169 struct dvd_lu_send_asf {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
170 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
171 unsigned agid : 2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
172
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
173 unsigned asf : 1;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
174 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
175
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
176 struct dvd_host_send_rpcstate {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
177 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
178 __u8 pdrc;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
179 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
180
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
181 struct dvd_lu_send_rpcstate {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
182 __u8 type : 2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
183 __u8 vra : 3;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
184 __u8 ucca : 3;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
185 __u8 region_mask;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
186 __u8 rpc_scheme;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
187 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
188
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
189 typedef union {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
190 __u8 type;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
191
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
192 struct dvd_lu_send_agid lsa;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
193 struct dvd_host_send_challenge hsc;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
194 struct dvd_send_key lsk;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
195 struct dvd_lu_send_challenge lsc;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
196 struct dvd_send_key hsk;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
197 struct dvd_lu_send_title_key lstk;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
198 struct dvd_lu_send_asf lsasf;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
199 struct dvd_host_send_rpcstate hrpcs;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
200 struct dvd_lu_send_rpcstate lrpcs;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
201 } dvd_authinfo;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
202
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
203
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
204 typedef struct {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
205 __u16 report_key_length;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
206 __u8 reserved1;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
207 __u8 reserved2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
208 #if BYTE_ORDER == BIG_ENDIAN
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
209 __u8 type_code : 2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
210 __u8 vra : 3;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
211 __u8 ucca : 3;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
212 #elif BYTE_ORDER == LITTLE_ENDIAN
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
213 __u8 ucca : 3;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
214 __u8 vra : 3;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
215 __u8 type_code : 2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
216 #endif
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
217 __u8 region_mask;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
218 __u8 rpc_scheme;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
219 __u8 reserved3;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
220 } rpc_state_t;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
221
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
222 /*
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
223 * Stuff for the CDROM ioctls
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
224 */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
225
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
226 #define CDROMREADTOCHDR 0x5305 /* Read TOC header (cdrom_tochdr) */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
227 #define CDROMREADTOCENTRY 0x5306 /* Read TOC entry (cdrom_tocentry) */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
228 #define CDROMEJECT 0x5309 /* Ejects the cdrom media */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
229 #define CDROMCLOSETRAY 0x5319 /* Reverse of CDROMEJECT */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
230 #define CDROM_DRIVE_STATUS 0x5326 /* Get tray position, etc. */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
231 #define CDROM_DISC_STATUS 0x5327 /* Get disc type, etc. */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
232 #define CDROMREADMODE2 0x530c /* Read CDROM mode 2 data (2336 Bytes) */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
233 #define CDROMREADMODE1 0x530d /* Read CDROM mode 1 data (2048 Bytes) */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
234 #define CDROMREADRAW 0x5314 /* read data in raw mode (2352 bytes) */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
235
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
236 #define CD_MINS 74 /* max. minutes per CD, not really a limit */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
237 #define CD_SECS 60 /* seconds per minute */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
238 #define CD_FRAMES 75 /* frames per second */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
239 #define CD_MSF_OFFSET 150 /* MSF numbering offset of first frame */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
240
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
241 #define CD_HEAD_SIZE 4 /* header (address) bytes per raw data frame */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
242 #define CD_SYNC_SIZE 12 /* 12 sync bytes per raw data frame */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
243 #define CD_FRAMESIZE 2048 /* bytes per frame, "cooked" mode */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
244 #define CD_FRAMESIZE_RAW 2352 /* bytes per frame, "raw" mode */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
245 #define CD_FRAMESIZE_RAW0 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE) /*2336*/
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
246 #define CD_FRAMESIZE_RAW1 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE) /*2340*/
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
247
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
248 /* CD-ROM address types (cdrom_tocentry.cdte_format) */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
249 #define CDROM_LBA 0x01 /* logical block: first frame is #0 */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
250 #define CDROM_MSF 0x02 /* minute-second-frame: binary. not bcd here!*/
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
251
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
252 /* bit to tell whether track is data or audio (cdrom_tocentry.cdte_ctrl) */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
253 #define CDROM_DATA_TRACK 0x04
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
254
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
255 /* The leadout track is always 0xAA, regardless of # of tracks on disc */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
256 #define CDROM_LEADOUT 0xAA
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
257
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
258 /* drive status returned by CDROM_DRIVE_STATUS ioctl */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
259 #define CDS_NO_INFO 0 /* if not implemented */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
260 #define CDS_NO_DISC 1
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
261 #define CDS_TRAY_OPEN 2
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
262 #define CDS_DRIVE_NOT_READY 3
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
263 #define CDS_DISC_OK 4
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
264
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
265 /*
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
266 * Return values for CDROM_DISC_STATUS ioctl.
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
267 * Can also return CDS_NO_INFO and CDS_NO_DISC from above
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
268 */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
269 #define CDS_AUDIO 100
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
270 #define CDS_DATA_1 101
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
271 #define CDS_DATA_2 102
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
272 #define CDS_XA_2_1 103
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
273 #define CDS_XA_2_2 104
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
274 #define CDS_MIXED 105
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
275
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
276 /* For compile compatibility only - we don't support changers */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
277 #define CDSL_NONE ((int) (~0U>>1)-1)
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
278 #define CDSL_CURRENT ((int) (~0U>>1))
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
279
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
280 struct cdrom_msf
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
281 {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
282 __u8 cdmsf_min0; /* start minute */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
283 __u8 cdmsf_sec0; /* start second */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
284 __u8 cdmsf_frame0; /* start frame */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
285 __u8 cdmsf_min1; /* end minute */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
286 __u8 cdmsf_sec1; /* end second */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
287 __u8 cdmsf_frame1; /* end frame */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
288 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
289
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
290 struct cdrom_tochdr
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
291 {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
292 __u8 cdth_trk0; /* start track */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
293 __u8 cdth_trk1; /* end track */
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
294 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
295
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
296 struct cdrom_msf0
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
297 {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
298 __u8 minute;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
299 __u8 second;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
300 __u8 frame;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
301 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
302
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
303 union cdrom_addr
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
304 {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
305 struct cdrom_msf0 msf;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
306 int lba;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
307 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
308
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
309 struct cdrom_tocentry
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
310 {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
311 __u8 cdte_track;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
312 __u8 cdte_adr :4;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
313 __u8 cdte_ctrl :4;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
314 __u8 cdte_format;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
315 union cdrom_addr cdte_addr;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
316 __u8 cdte_datamode;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
317 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
318
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
319 struct modesel_head
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
320 {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
321 __u8 reserved1;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
322 __u8 medium;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
323 __u8 reserved2;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
324 __u8 block_desc_length;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
325 __u8 density;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
326 __u8 number_of_blocks_hi;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
327 __u8 number_of_blocks_med;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
328 __u8 number_of_blocks_lo;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
329 __u8 reserved3;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
330 __u8 block_length_hi;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
331 __u8 block_length_med;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
332 __u8 block_length_lo;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
333 };
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
334
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
335 typedef struct
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
336 {
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
337 int data;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
338 int audio;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
339 int cdi;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
340 int xa;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
341 int error;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
342 } tracktype;
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
343
e68f255d7d64 Move libdvdcss into its own subdirectory.
diego
parents:
diff changeset
344 #endif /* _DVD_H_ */