]> git.sesse.net Git - vlc/blob - extras/libdvdcss/css.h
*) changed includes from
[vlc] / extras / libdvdcss / css.h
1 /*****************************************************************************
2  * css.h: Structures for DVD authentification and unscrambling
3  *****************************************************************************
4  * Copyright (C) 1999-2001 VideoLAN
5  * $Id: css.h,v 1.6 2001/10/13 15:34:21 stef Exp $
6  *
7  * Author: Stéphane Borel <stef@via.ecp.fr>
8  *
9  * based on:
10  *  - css-auth by Derek Fawcus <derek@spider.com>
11  *  - DVD CSS ioctls example program by Andrew T. Veliath <andrewtv@usa.net>
12  *  - DeCSSPlus by Ethan Hawke
13  *  - The Divide and conquer attack by Frank A. Stevenson <frank@funcom.com>
14  *
15  * This program is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License as published by
17  * the Free Software Foundation; either version 2 of the License, or
18  * (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with this program; if not, write to the Free Software
27  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
28  *****************************************************************************/
29 #define KEY_SIZE 5
30
31 typedef u8 dvd_key_t[KEY_SIZE];
32
33 typedef struct disc_s
34 {
35     u8              p_challenge[2*KEY_SIZE];
36     dvd_key_t       p_key1;
37     dvd_key_t       p_key2;
38     dvd_key_t       p_key_check;
39     u8              i_varient;
40     u8              p_disc_key[2048];
41 } disc_t;
42
43 typedef struct dvd_title_s
44 {
45     int                 i_startlb;
46     dvd_key_t           p_key;
47     struct dvd_title_s *p_next;
48 } dvd_title_t;
49
50 typedef struct css_s
51 {
52     int             i_agid;
53     disc_t          disc;
54     dvd_key_t       p_title_key;
55 } css_t;
56
57 /*****************************************************************************
58  * Prototypes in css.c
59  *****************************************************************************/
60 struct css_s;
61
62 int   CSSTest             ( dvdcss_handle );
63 int   CSSAuth             ( dvdcss_handle );
64 int   CSSGetDiscKey       ( dvdcss_handle );
65 int   CSSGetTitleKey      ( dvdcss_handle, int );
66 int   CSSDescrambleSector ( u8 * , u8 * );
67