-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathscsi.h
39 lines (32 loc) · 1.08 KB
/
scsi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2017 Jannik Vogel
// Licensed under GPLv3 or any later version.
// Refer to the LICENSE.txt file included.
#ifndef __SCSI_H__
#define __SCSI_H__
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
extern const size_t SectorSize;
typedef struct {
unsigned int l0;
unsigned int l1;
} LayerSizes;
typedef enum {
#define MODE_LOCKED 0
Locked = 0,
#define MODE_XTREME 1
XTreme = 1,
#define MODE_WXRIPPER 2
WxRipper = 2
} LockedState;
int setlockingmode(LockedState state);
int getlayersizes(LayerSizes* layersizes);
int setstreaming();
bool readblock(uint8_t* buffer, unsigned int offset, unsigned int size);
int getfeaturelist(unsigned char* buffer, size_t buffer_size);
int read_dvd_structure(uint8_t* buffer, size_t buffer_size, uint32_t block, uint8_t layer, uint8_t format, uint16_t size, uint8_t unk, uint8_t vendor);
int getpfi(uint8_t layer, uint8_t* buffer, size_t buffer_size);
int getdmi(uint8_t* buffer, size_t buffer_size);
int getss(unsigned char index, unsigned char* buffer, size_t buffer_size);
int inquiry(uint8_t* buffer, size_t buffer_size);
#endif