annotate libmpdvdkit2/bsdi_dvd.h @ 7130:a27a786e98f9

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