ntddcdvd.h revision af062818b47340eef15700d2f0211576ba3506ee
/*
* DDK information for DVD
*
* Copyright (C) 2004 Uwe Bonnes
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __NTDDCDVD_H
#define __NTDDCDVD_H
/* definitions taken from libdvdcss, modified to reflect Windows names and data types in places */
#define IOCTL_DVD_BASE FILE_DEVICE_DVD
#define IOCTL_DVD_SET_READ_AHEAD CTL_CODE(IOCTL_DVD_BASE, 0x0404, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_DVD_SEND_KEY2 CTL_CODE(IOCTL_DVD_BASE, 0x0406, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_DVD_READ_STRUCTURE CTL_CODE(IOCTL_DVD_BASE, 0x0450, METHOD_BUFFERED, FILE_READ_ACCESS)
typedef enum {
DvdChallengeKey = 0x01,
DvdSetRpcKey = 0x6,
DvdGetRpcKey = 0x8,
DvdDiskKey = 0x80,
DvdInvalidateAGID = 0x3f
} DVD_KEY_TYPE;
typedef struct _DVD_COPY_PROTECT_KEY {
union {
struct {
} s;
} Parameters;
typedef struct _DVD_RPC_KEY {
} DVD_RPC_KEY, * PDVD_RPC_KEY;
typedef struct _DVD_ASF {
typedef struct _DVD_REGION
{
} DVD_REGION, * PDVD_REGION;
typedef enum _DVD_STRUCTURE_FORMAT
{
typedef struct _DVD_READ_STRUCTURE {
/* Contains an offset to the logical block address of the descriptor to be retrieved. */
/* 0:Physical descriptor, 1:Copyright descriptor, 2:Disk key descriptor
3:BCA descriptor, 4:Manufacturer descriptor, 5:Max descriptor
*/
/* Session ID, that is obtained by IOCTL_DVD_START_SESSION */
/* From 0 to 4 */
typedef struct _DVD_LAYER_DESCRIPTOR
{
/* 0:DVD-ROM, 1:DVD-RAM, 2:DVD-R, 3:DVD-RW, 9:DVD-RW */
/* The physical size of the media. 0:120 mm, 1:80 mm. */
/* 1:Read-only layer, 2:Recordable layer, 4:Rewritable layer */
/* 0:parallel track path, 1:opposite track path */
/* 0:one layers, 1:two layers, and so on */
/* 0:0.267 µm/bit, 1:0.293 µm/bit, 2:0.409 to 0.435 µm/bit, 4:0.280 to 0.291 µm/bit, 8:0.353 µm/bit */
/* Must be either 0x30000:DVD-ROM or DVD-R/-RW or 0x31000:DVD-RAM or DVD+RW */
/* 0 indicates no BCA data */
typedef struct _DVD_COPYRIGHT_DESCRIPTOR
{
typedef struct _DVD_DISK_KEY_DESCRIPTOR
{
typedef struct _DVD_BCA_DESCRIPTOR
{
typedef struct _DVD_MANUFACTURER_DESCRIPTOR
{
#define DVD_KEY_SIZE 5
#define DVD_CHALLENGE_SIZE 10
#define DVD_DISCKEY_SIZE 2048
#define DVD_SECTOR_PROTECTED 0x00000020
#endif /* __NTDDCDVD_H */