Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef _LINUX_CDROM_H
     13 #define _LINUX_CDROM_H
     14 
     15 #include <asm/byteorder.h>
     16 
     17 #define EDRIVE_CANT_DO_THIS EOPNOTSUPP
     18 
     19 #define CDROMPAUSE 0x5301
     20 #define CDROMRESUME 0x5302
     21 #define CDROMPLAYMSF 0x5303
     22 #define CDROMPLAYTRKIND 0x5304
     23 #define CDROMREADTOCHDR 0x5305
     24 #define CDROMREADTOCENTRY 0x5306
     25 #define CDROMSTOP 0x5307
     26 #define CDROMSTART 0x5308
     27 #define CDROMEJECT 0x5309
     28 #define CDROMVOLCTRL 0x530a
     29 #define CDROMSUBCHNL 0x530b
     30 #define CDROMREADMODE2 0x530c
     31 #define CDROMREADMODE1 0x530d
     32 #define CDROMREADAUDIO 0x530e
     33 #define CDROMEJECT_SW 0x530f
     34 #define CDROMMULTISESSION 0x5310
     35 #define CDROM_GET_MCN 0x5311
     36 #define CDROM_GET_UPC CDROM_GET_MCN
     37 #define CDROMRESET 0x5312
     38 #define CDROMVOLREAD 0x5313
     39 #define CDROMREADRAW 0x5314
     40 
     41 #define CDROMREADCOOKED 0x5315
     42 #define CDROMSEEK 0x5316
     43 
     44 #define CDROMPLAYBLK 0x5317
     45 
     46 #define CDROMREADALL 0x5318
     47 
     48 #define CDROMGETSPINDOWN 0x531d
     49 #define CDROMSETSPINDOWN 0x531e
     50 
     51 #define CDROMCLOSETRAY 0x5319
     52 #define CDROM_SET_OPTIONS 0x5320
     53 #define CDROM_CLEAR_OPTIONS 0x5321
     54 #define CDROM_SELECT_SPEED 0x5322
     55 #define CDROM_SELECT_DISC 0x5323
     56 #define CDROM_MEDIA_CHANGED 0x5325
     57 #define CDROM_DRIVE_STATUS 0x5326
     58 #define CDROM_DISC_STATUS 0x5327
     59 #define CDROM_CHANGER_NSLOTS 0x5328
     60 #define CDROM_LOCKDOOR 0x5329
     61 #define CDROM_DEBUG 0x5330
     62 #define CDROM_GET_CAPABILITY 0x5331
     63 
     64 #define CDROMAUDIOBUFSIZ 0x5382
     65 
     66 #define DVD_READ_STRUCT 0x5390
     67 #define DVD_WRITE_STRUCT 0x5391
     68 #define DVD_AUTH 0x5392
     69 
     70 #define CDROM_SEND_PACKET 0x5393
     71 #define CDROM_NEXT_WRITABLE 0x5394
     72 #define CDROM_LAST_WRITTEN 0x5395
     73 
     74 struct cdrom_msf0
     75 {
     76  __u8 minute;
     77  __u8 second;
     78  __u8 frame;
     79 };
     80 
     81 union cdrom_addr
     82 {
     83  struct cdrom_msf0 msf;
     84  int lba;
     85 };
     86 
     87 struct cdrom_msf
     88 {
     89  __u8 cdmsf_min0;
     90  __u8 cdmsf_sec0;
     91  __u8 cdmsf_frame0;
     92  __u8 cdmsf_min1;
     93  __u8 cdmsf_sec1;
     94  __u8 cdmsf_frame1;
     95 };
     96 
     97 struct cdrom_ti
     98 {
     99  __u8 cdti_trk0;
    100  __u8 cdti_ind0;
    101  __u8 cdti_trk1;
    102  __u8 cdti_ind1;
    103 };
    104 
    105 struct cdrom_tochdr
    106 {
    107  __u8 cdth_trk0;
    108  __u8 cdth_trk1;
    109 };
    110 
    111 struct cdrom_volctrl
    112 {
    113  __u8 channel0;
    114  __u8 channel1;
    115  __u8 channel2;
    116  __u8 channel3;
    117 };
    118 
    119 struct cdrom_subchnl
    120 {
    121  __u8 cdsc_format;
    122  __u8 cdsc_audiostatus;
    123  __u8 cdsc_adr: 4;
    124  __u8 cdsc_ctrl: 4;
    125  __u8 cdsc_trk;
    126  __u8 cdsc_ind;
    127  union cdrom_addr cdsc_absaddr;
    128  union cdrom_addr cdsc_reladdr;
    129 };
    130 
    131 struct cdrom_tocentry
    132 {
    133  __u8 cdte_track;
    134  __u8 cdte_adr :4;
    135  __u8 cdte_ctrl :4;
    136  __u8 cdte_format;
    137  union cdrom_addr cdte_addr;
    138  __u8 cdte_datamode;
    139 };
    140 
    141 struct cdrom_read
    142 {
    143  int cdread_lba;
    144  char *cdread_bufaddr;
    145  int cdread_buflen;
    146 };
    147 
    148 struct cdrom_read_audio
    149 {
    150  union cdrom_addr addr;
    151  __u8 addr_format;
    152  int nframes;
    153  __u8 __user *buf;
    154 };
    155 
    156 struct cdrom_multisession
    157 {
    158  union cdrom_addr addr;
    159  __u8 xa_flag;
    160  __u8 addr_format;
    161 };
    162 
    163 struct cdrom_mcn
    164 {
    165  __u8 medium_catalog_number[14];
    166 };
    167 
    168 struct cdrom_blk
    169 {
    170  unsigned from;
    171  unsigned short len;
    172 };
    173 
    174 #define CDROM_PACKET_SIZE 12
    175 
    176 #define CGC_DATA_UNKNOWN 0
    177 #define CGC_DATA_WRITE 1
    178 #define CGC_DATA_READ 2
    179 #define CGC_DATA_NONE 3
    180 
    181 struct cdrom_generic_command
    182 {
    183  unsigned char cmd[CDROM_PACKET_SIZE];
    184  unsigned char __user *buffer;
    185  unsigned int buflen;
    186  int stat;
    187  struct request_sense __user *sense;
    188  unsigned char data_direction;
    189  int quiet;
    190  int timeout;
    191  void __user *reserved[1];
    192 };
    193 
    194 #define CD_MINS 74
    195 #define CD_SECS 60
    196 #define CD_FRAMES 75
    197 #define CD_SYNC_SIZE 12
    198 #define CD_MSF_OFFSET 150
    199 #define CD_CHUNK_SIZE 24
    200 #define CD_NUM_OF_CHUNKS 98
    201 #define CD_FRAMESIZE_SUB 96
    202 #define CD_HEAD_SIZE 4
    203 #define CD_SUBHEAD_SIZE 8
    204 #define CD_EDC_SIZE 4
    205 #define CD_ZERO_SIZE 8
    206 #define CD_ECC_SIZE 276
    207 #define CD_FRAMESIZE 2048
    208 #define CD_FRAMESIZE_RAW 2352
    209 #define CD_FRAMESIZE_RAWER 2646
    210 
    211 #define CD_FRAMESIZE_RAW1 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE)
    212 #define CD_FRAMESIZE_RAW0 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE)
    213 
    214 #define CD_XA_HEAD (CD_HEAD_SIZE+CD_SUBHEAD_SIZE)
    215 #define CD_XA_TAIL (CD_EDC_SIZE+CD_ECC_SIZE)
    216 #define CD_XA_SYNC_HEAD (CD_SYNC_SIZE+CD_XA_HEAD)
    217 
    218 #define CDROM_LBA 0x01
    219 #define CDROM_MSF 0x02
    220 
    221 #define CDROM_DATA_TRACK 0x04
    222 
    223 #define CDROM_LEADOUT 0xAA
    224 
    225 #define CDROM_AUDIO_INVALID 0x00
    226 #define CDROM_AUDIO_PLAY 0x11
    227 #define CDROM_AUDIO_PAUSED 0x12
    228 #define CDROM_AUDIO_COMPLETED 0x13
    229 #define CDROM_AUDIO_ERROR 0x14
    230 #define CDROM_AUDIO_NO_STATUS 0x15
    231 
    232 #define CDC_CLOSE_TRAY 0x1
    233 #define CDC_OPEN_TRAY 0x2
    234 #define CDC_LOCK 0x4
    235 #define CDC_SELECT_SPEED 0x8
    236 #define CDC_SELECT_DISC 0x10
    237 #define CDC_MULTI_SESSION 0x20
    238 #define CDC_MCN 0x40
    239 #define CDC_MEDIA_CHANGED 0x80
    240 #define CDC_PLAY_AUDIO 0x100
    241 #define CDC_RESET 0x200
    242 #define CDC_DRIVE_STATUS 0x800
    243 #define CDC_GENERIC_PACKET 0x1000
    244 #define CDC_CD_R 0x2000
    245 #define CDC_CD_RW 0x4000
    246 #define CDC_DVD 0x8000
    247 #define CDC_DVD_R 0x10000
    248 #define CDC_DVD_RAM 0x20000
    249 #define CDC_MO_DRIVE 0x40000
    250 #define CDC_MRW 0x80000
    251 #define CDC_MRW_W 0x100000
    252 #define CDC_RAM 0x200000
    253 
    254 #define CDS_NO_INFO 0
    255 #define CDS_NO_DISC 1
    256 #define CDS_TRAY_OPEN 2
    257 #define CDS_DRIVE_NOT_READY 3
    258 #define CDS_DISC_OK 4
    259 
    260 #define CDS_AUDIO 100
    261 #define CDS_DATA_1 101
    262 #define CDS_DATA_2 102
    263 #define CDS_XA_2_1 103
    264 #define CDS_XA_2_2 104
    265 #define CDS_MIXED 105
    266 
    267 #define CDO_AUTO_CLOSE 0x1
    268 #define CDO_AUTO_EJECT 0x2
    269 #define CDO_USE_FFLAGS 0x4
    270 #define CDO_LOCK 0x8
    271 #define CDO_CHECK_TYPE 0x10
    272 
    273 #define CDSL_NONE ((int) (~0U>>1)-1)
    274 #define CDSL_CURRENT ((int) (~0U>>1))
    275 
    276 #define CD_PART_MAX 64
    277 #define CD_PART_MASK (CD_PART_MAX - 1)
    278 
    279 #define GPCMD_BLANK 0xa1
    280 #define GPCMD_CLOSE_TRACK 0x5b
    281 #define GPCMD_FLUSH_CACHE 0x35
    282 #define GPCMD_FORMAT_UNIT 0x04
    283 #define GPCMD_GET_CONFIGURATION 0x46
    284 #define GPCMD_GET_EVENT_STATUS_NOTIFICATION 0x4a
    285 #define GPCMD_GET_PERFORMANCE 0xac
    286 #define GPCMD_INQUIRY 0x12
    287 #define GPCMD_LOAD_UNLOAD 0xa6
    288 #define GPCMD_MECHANISM_STATUS 0xbd
    289 #define GPCMD_MODE_SELECT_10 0x55
    290 #define GPCMD_MODE_SENSE_10 0x5a
    291 #define GPCMD_PAUSE_RESUME 0x4b
    292 #define GPCMD_PLAY_AUDIO_10 0x45
    293 #define GPCMD_PLAY_AUDIO_MSF 0x47
    294 #define GPCMD_PLAY_AUDIO_TI 0x48
    295 #define GPCMD_PLAY_CD 0xbc
    296 #define GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e
    297 #define GPCMD_READ_10 0x28
    298 #define GPCMD_READ_12 0xa8
    299 #define GPCMD_READ_BUFFER_CAPACITY 0x5c
    300 #define GPCMD_READ_CDVD_CAPACITY 0x25
    301 #define GPCMD_READ_CD 0xbe
    302 #define GPCMD_READ_CD_MSF 0xb9
    303 #define GPCMD_READ_DISC_INFO 0x51
    304 #define GPCMD_READ_DVD_STRUCTURE 0xad
    305 #define GPCMD_READ_FORMAT_CAPACITIES 0x23
    306 #define GPCMD_READ_HEADER 0x44
    307 #define GPCMD_READ_TRACK_RZONE_INFO 0x52
    308 #define GPCMD_READ_SUBCHANNEL 0x42
    309 #define GPCMD_READ_TOC_PMA_ATIP 0x43
    310 #define GPCMD_REPAIR_RZONE_TRACK 0x58
    311 #define GPCMD_REPORT_KEY 0xa4
    312 #define GPCMD_REQUEST_SENSE 0x03
    313 #define GPCMD_RESERVE_RZONE_TRACK 0x53
    314 #define GPCMD_SEND_CUE_SHEET 0x5d
    315 #define GPCMD_SCAN 0xba
    316 #define GPCMD_SEEK 0x2b
    317 #define GPCMD_SEND_DVD_STRUCTURE 0xbf
    318 #define GPCMD_SEND_EVENT 0xa2
    319 #define GPCMD_SEND_KEY 0xa3
    320 #define GPCMD_SEND_OPC 0x54
    321 #define GPCMD_SET_READ_AHEAD 0xa7
    322 #define GPCMD_SET_STREAMING 0xb6
    323 #define GPCMD_START_STOP_UNIT 0x1b
    324 #define GPCMD_STOP_PLAY_SCAN 0x4e
    325 #define GPCMD_TEST_UNIT_READY 0x00
    326 #define GPCMD_VERIFY_10 0x2f
    327 #define GPCMD_WRITE_10 0x2a
    328 #define GPCMD_WRITE_AND_VERIFY_10 0x2e
    329 
    330 #define GPCMD_SET_SPEED 0xbb
    331 
    332 #define GPCMD_PLAYAUDIO_TI 0x48
    333 
    334 #define GPCMD_GET_MEDIA_STATUS 0xda
    335 
    336 #define GPMODE_VENDOR_PAGE 0x00
    337 #define GPMODE_R_W_ERROR_PAGE 0x01
    338 #define GPMODE_WRITE_PARMS_PAGE 0x05
    339 #define GPMODE_WCACHING_PAGE 0x08
    340 #define GPMODE_AUDIO_CTL_PAGE 0x0e
    341 #define GPMODE_POWER_PAGE 0x1a
    342 #define GPMODE_FAULT_FAIL_PAGE 0x1c
    343 #define GPMODE_TO_PROTECT_PAGE 0x1d
    344 #define GPMODE_CAPABILITIES_PAGE 0x2a
    345 #define GPMODE_ALL_PAGES 0x3f
    346 
    347 #define GPMODE_CDROM_PAGE 0x0d
    348 
    349 #define DVD_STRUCT_PHYSICAL 0x00
    350 #define DVD_STRUCT_COPYRIGHT 0x01
    351 #define DVD_STRUCT_DISCKEY 0x02
    352 #define DVD_STRUCT_BCA 0x03
    353 #define DVD_STRUCT_MANUFACT 0x04
    354 
    355 struct dvd_layer {
    356  __u8 book_version : 4;
    357  __u8 book_type : 4;
    358  __u8 min_rate : 4;
    359  __u8 disc_size : 4;
    360  __u8 layer_type : 4;
    361  __u8 track_path : 1;
    362  __u8 nlayers : 2;
    363  __u8 track_density : 4;
    364  __u8 linear_density : 4;
    365  __u8 bca : 1;
    366  __u32 start_sector;
    367  __u32 end_sector;
    368  __u32 end_sector_l0;
    369 };
    370 
    371 #define DVD_LAYERS 4
    372 
    373 struct dvd_physical {
    374  __u8 type;
    375  __u8 layer_num;
    376  struct dvd_layer layer[DVD_LAYERS];
    377 };
    378 
    379 struct dvd_copyright {
    380  __u8 type;
    381 
    382  __u8 layer_num;
    383  __u8 cpst;
    384  __u8 rmi;
    385 };
    386 
    387 struct dvd_disckey {
    388  __u8 type;
    389 
    390  unsigned agid : 2;
    391  __u8 value[2048];
    392 };
    393 
    394 struct dvd_bca {
    395  __u8 type;
    396 
    397  int len;
    398  __u8 value[188];
    399 };
    400 
    401 struct dvd_manufact {
    402  __u8 type;
    403 
    404  __u8 layer_num;
    405  int len;
    406  __u8 value[2048];
    407 };
    408 
    409 typedef union {
    410  __u8 type;
    411 
    412  struct dvd_physical physical;
    413  struct dvd_copyright copyright;
    414  struct dvd_disckey disckey;
    415  struct dvd_bca bca;
    416  struct dvd_manufact manufact;
    417 } dvd_struct;
    418 
    419 #define DVD_LU_SEND_AGID 0
    420 #define DVD_HOST_SEND_CHALLENGE 1
    421 #define DVD_LU_SEND_KEY1 2
    422 #define DVD_LU_SEND_CHALLENGE 3
    423 #define DVD_HOST_SEND_KEY2 4
    424 
    425 #define DVD_AUTH_ESTABLISHED 5
    426 #define DVD_AUTH_FAILURE 6
    427 
    428 #define DVD_LU_SEND_TITLE_KEY 7
    429 #define DVD_LU_SEND_ASF 8
    430 #define DVD_INVALIDATE_AGID 9
    431 #define DVD_LU_SEND_RPC_STATE 10
    432 #define DVD_HOST_SEND_RPC_STATE 11
    433 
    434 typedef __u8 dvd_key[5];
    435 typedef __u8 dvd_challenge[10];
    436 
    437 struct dvd_lu_send_agid {
    438  __u8 type;
    439  unsigned agid : 2;
    440 };
    441 
    442 struct dvd_host_send_challenge {
    443  __u8 type;
    444  unsigned agid : 2;
    445 
    446  dvd_challenge chal;
    447 };
    448 
    449 struct dvd_send_key {
    450  __u8 type;
    451  unsigned agid : 2;
    452 
    453  dvd_key key;
    454 };
    455 
    456 struct dvd_lu_send_challenge {
    457  __u8 type;
    458  unsigned agid : 2;
    459 
    460  dvd_challenge chal;
    461 };
    462 
    463 #define DVD_CPM_NO_COPYRIGHT 0
    464 #define DVD_CPM_COPYRIGHTED 1
    465 
    466 #define DVD_CP_SEC_NONE 0
    467 #define DVD_CP_SEC_EXIST 1
    468 
    469 #define DVD_CGMS_UNRESTRICTED 0
    470 #define DVD_CGMS_SINGLE 2
    471 #define DVD_CGMS_RESTRICTED 3
    472 
    473 struct dvd_lu_send_title_key {
    474  __u8 type;
    475  unsigned agid : 2;
    476 
    477  dvd_key title_key;
    478  int lba;
    479  unsigned cpm : 1;
    480  unsigned cp_sec : 1;
    481  unsigned cgms : 2;
    482 };
    483 
    484 struct dvd_lu_send_asf {
    485  __u8 type;
    486  unsigned agid : 2;
    487 
    488  unsigned asf : 1;
    489 };
    490 
    491 struct dvd_host_send_rpcstate {
    492  __u8 type;
    493  __u8 pdrc;
    494 };
    495 
    496 struct dvd_lu_send_rpcstate {
    497  __u8 type : 2;
    498  __u8 vra : 3;
    499  __u8 ucca : 3;
    500  __u8 region_mask;
    501  __u8 rpc_scheme;
    502 };
    503 
    504 typedef union {
    505  __u8 type;
    506 
    507  struct dvd_lu_send_agid lsa;
    508  struct dvd_host_send_challenge hsc;
    509  struct dvd_send_key lsk;
    510  struct dvd_lu_send_challenge lsc;
    511  struct dvd_send_key hsk;
    512  struct dvd_lu_send_title_key lstk;
    513  struct dvd_lu_send_asf lsasf;
    514  struct dvd_host_send_rpcstate hrpcs;
    515  struct dvd_lu_send_rpcstate lrpcs;
    516 } dvd_authinfo;
    517 
    518 struct request_sense {
    519 #ifdef __BIG_ENDIAN_BITFIELD
    520  __u8 valid : 1;
    521  __u8 error_code : 7;
    522 #elif defined(__LITTLE_ENDIAN_BITFIELD)
    523  __u8 error_code : 7;
    524  __u8 valid : 1;
    525 #endif
    526  __u8 segment_number;
    527 #ifdef __BIG_ENDIAN_BITFIELD
    528  __u8 reserved1 : 2;
    529  __u8 ili : 1;
    530  __u8 reserved2 : 1;
    531  __u8 sense_key : 4;
    532 #elif defined(__LITTLE_ENDIAN_BITFIELD)
    533  __u8 sense_key : 4;
    534  __u8 reserved2 : 1;
    535  __u8 ili : 1;
    536  __u8 reserved1 : 2;
    537 #endif
    538  __u8 information[4];
    539  __u8 add_sense_len;
    540  __u8 command_info[4];
    541  __u8 asc;
    542  __u8 ascq;
    543  __u8 fruc;
    544  __u8 sks[3];
    545  __u8 asb[46];
    546 };
    547 
    548 #define CDF_RWRT 0x0020
    549 #define CDF_HWDM 0x0024
    550 #define CDF_MRW 0x0028
    551 
    552 #define CDM_MRW_NOTMRW 0
    553 #define CDM_MRW_BGFORMAT_INACTIVE 1
    554 #define CDM_MRW_BGFORMAT_ACTIVE 2
    555 #define CDM_MRW_BGFORMAT_COMPLETE 3
    556 
    557 #define MRW_LBA_DMA 0
    558 #define MRW_LBA_GAA 1
    559 
    560 #define MRW_MODE_PC_PRE1 0x2c
    561 #define MRW_MODE_PC 0x03
    562 
    563 struct mrw_feature_desc {
    564  __u16 feature_code;
    565 #ifdef __BIG_ENDIAN_BITFIELD
    566  __u8 reserved1 : 2;
    567  __u8 feature_version : 4;
    568  __u8 persistent : 1;
    569  __u8 curr : 1;
    570 #elif defined(__LITTLE_ENDIAN_BITFIELD)
    571  __u8 curr : 1;
    572  __u8 persistent : 1;
    573  __u8 feature_version : 4;
    574  __u8 reserved1 : 2;
    575 #endif
    576  __u8 add_len;
    577 #ifdef __BIG_ENDIAN_BITFIELD
    578  __u8 reserved2 : 7;
    579  __u8 write : 1;
    580 #elif defined(__LITTLE_ENDIAN_BITFIELD)
    581  __u8 write : 1;
    582  __u8 reserved2 : 7;
    583 #endif
    584  __u8 reserved3;
    585  __u8 reserved4;
    586  __u8 reserved5;
    587 };
    588 
    589 struct rwrt_feature_desc {
    590  __u16 feature_code;
    591 #ifdef __BIG_ENDIAN_BITFIELD
    592  __u8 reserved1 : 2;
    593  __u8 feature_version : 4;
    594  __u8 persistent : 1;
    595  __u8 curr : 1;
    596 #elif defined(__LITTLE_ENDIAN_BITFIELD)
    597  __u8 curr : 1;
    598  __u8 persistent : 1;
    599  __u8 feature_version : 4;
    600  __u8 reserved1 : 2;
    601 #endif
    602  __u8 add_len;
    603  __u32 last_lba;
    604  __u32 block_size;
    605  __u16 blocking;
    606 #ifdef __BIG_ENDIAN_BITFIELD
    607  __u8 reserved2 : 7;
    608  __u8 page_present : 1;
    609 #elif defined(__LITTLE_ENDIAN_BITFIELD)
    610  __u8 page_present : 1;
    611  __u8 reserved2 : 7;
    612 #endif
    613  __u8 reserved3;
    614 };
    615 
    616 typedef struct {
    617  __u16 disc_information_length;
    618 #ifdef __BIG_ENDIAN_BITFIELD
    619  __u8 reserved1 : 3;
    620  __u8 erasable : 1;
    621  __u8 border_status : 2;
    622  __u8 disc_status : 2;
    623 #elif defined(__LITTLE_ENDIAN_BITFIELD)
    624  __u8 disc_status : 2;
    625  __u8 border_status : 2;
    626  __u8 erasable : 1;
    627  __u8 reserved1 : 3;
    628 #else
    629 #error "Please fix <asm/byteorder.h>"
    630 #endif
    631  __u8 n_first_track;
    632  __u8 n_sessions_lsb;
    633  __u8 first_track_lsb;
    634  __u8 last_track_lsb;
    635 #ifdef __BIG_ENDIAN_BITFIELD
    636  __u8 did_v : 1;
    637  __u8 dbc_v : 1;
    638  __u8 uru : 1;
    639  __u8 reserved2 : 2;
    640  __u8 dbit : 1;
    641  __u8 mrw_status : 2;
    642 #elif defined(__LITTLE_ENDIAN_BITFIELD)
    643  __u8 mrw_status : 2;
    644  __u8 dbit : 1;
    645  __u8 reserved2 : 2;
    646  __u8 uru : 1;
    647  __u8 dbc_v : 1;
    648  __u8 did_v : 1;
    649 #endif
    650  __u8 disc_type;
    651  __u8 n_sessions_msb;
    652  __u8 first_track_msb;
    653  __u8 last_track_msb;
    654  __u32 disc_id;
    655  __u32 lead_in;
    656  __u32 lead_out;
    657  __u8 disc_bar_code[8];
    658  __u8 reserved3;
    659  __u8 n_opc;
    660 } disc_information;
    661 
    662 typedef struct {
    663  __u16 track_information_length;
    664  __u8 track_lsb;
    665  __u8 session_lsb;
    666  __u8 reserved1;
    667 #ifdef __BIG_ENDIAN_BITFIELD
    668  __u8 reserved2 : 2;
    669  __u8 damage : 1;
    670  __u8 copy : 1;
    671  __u8 track_mode : 4;
    672  __u8 rt : 1;
    673  __u8 blank : 1;
    674  __u8 packet : 1;
    675  __u8 fp : 1;
    676  __u8 data_mode : 4;
    677  __u8 reserved3 : 6;
    678  __u8 lra_v : 1;
    679  __u8 nwa_v : 1;
    680 #elif defined(__LITTLE_ENDIAN_BITFIELD)
    681  __u8 track_mode : 4;
    682  __u8 copy : 1;
    683  __u8 damage : 1;
    684  __u8 reserved2 : 2;
    685  __u8 data_mode : 4;
    686  __u8 fp : 1;
    687  __u8 packet : 1;
    688  __u8 blank : 1;
    689  __u8 rt : 1;
    690  __u8 nwa_v : 1;
    691  __u8 lra_v : 1;
    692  __u8 reserved3 : 6;
    693 #endif
    694  __u32 track_start;
    695  __u32 next_writable;
    696  __u32 free_blocks;
    697  __u32 fixed_packet_size;
    698  __u32 track_size;
    699  __u32 last_rec_address;
    700 } track_information;
    701 
    702 struct feature_header {
    703  __u32 data_len;
    704  __u8 reserved1;
    705  __u8 reserved2;
    706  __u16 curr_profile;
    707 };
    708 
    709 struct mode_page_header {
    710  __u16 mode_data_length;
    711  __u8 medium_type;
    712  __u8 reserved1;
    713  __u8 reserved2;
    714  __u8 reserved3;
    715  __u16 desc_length;
    716 };
    717 
    718 #endif
    719