udftools

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros | Typedefs | Functions
ide-pc.h File Reference
`#include <sys/types.h>`
Include dependency graph for ide-pc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | cdrom_inquiry
struct | cdrom_discinfo
struct | cdrom_trackinfo
struct | cdrom_buffercapacity
struct | cdrom_reccapacity
struct | cdrom_header
struct | mode_header
struct | read_error_recovery_params
struct | cdrom_cacheparams
struct | cdrom_writeparams
struct | cdrom_capabilities

## Macros
#define | INQ_WORM 4
#define | INQ_CDROM 5
#define | DS_EMPTY 0 /* Empty disk */
#define | DS_APPENDABLE 1 /* Incomplete disk (appendable) */
#define | DS_COMPLETE 2 /* Complete disk (closed/no B0 pointer) */
#define | SS_EMPTY 0 /* Empty session */
#define | SS_APPENDABLE 1 /* Incomplete session */
#define | SS_COMPLETE 3 /* Complete session (needs DS_COMPLETE) */
#define | PGCTL_CURRENT_VALUES 0
#define | PGCTL_CHANGE_MASK 1
#define | PGCTL_DEFAULT_VALUES 2
#define | PGCTL_SAVED_VALUES 3
#define | GPMODE_READ_ERROR_RECOV_PAGE 0x01
#define | GPMODE_CACHE_PAGE 0x08
#define | MS_NONE 0 /* No B0 pointer. Next session not allowed*/
#define | MS_FINAL 1 /* B0 = FF:FF:FF. Next session not allowed*/
#define | MS_MULTI 3 /* B0 = Next PA. Next session allowed */
#define | DB_RAW 0 /* 2352 bytes of raw data */
#define | DB_RAW_PQ 1 /* 2368 bytes (raw data + P/Q Subchannel) */
#define | DB_RAW_PW 2 /* 2448 bytes (raw data + P-W Subchannel) */
#define | DB_RAW_PW_R 3 /* 2448 bytes (raw data + P-W raw Subchannel)*/
#define | DB_RES_4 4 /* - Reserved */
#define | DB_RES_5 5 /* - Reserved */
#define | DB_RES_6 6 /* - Reserved */
#define | DB_VU_7 7 /* - Vendor specific */
#define | DB_ROM_MODE1 8 /* 2048 bytes Mode 1 (ISO/IEC 10149) */
#define | DB_ROM_MODE2 9 /* 2336 bytes Mode 2 (ISO/IEC 10149) */
#define | DB_XA_F1 10 /* 2048 bytes Mode 2? (CD-ROM XA form 1) */
#define | DB_XA_F1_8H 11 /* 2056 bytes Mode 2 (CD-ROM XA form 1) + 8 header bytes */
#define | DB_XA_F2 12 /* 2324 bytes Mode 2 (CD-ROM XA form 2) */
#define | DB_XA_MODE2_MIX 13 /* 2332 bytes Mode 2 (CD-ROM XA 1/2+subhdr) */
#define | DB_RES_14 14 /* - Reserved */
#define | DB_VU_15 15 /* - Vendor specific */
#define | CAPS_LT_CADDY 0
#define | CAPS_LT_TRAY 1
#define | BLANK_DISC 0x00 /* Erase the entire disc */
#define | BLANK_MINIMAL 0x01 /* Erase the PMA, 1st session TOC, pregap */
#define | BLANK_TRACK 0x02 /* Erase an incomplete track */
#define | BLANK_UNRESERVE 0x03 /* Unreserve a track */
#define | BLANK_TAIL 0x04 /* Erase the tail of a track: input trackno required */
#define | BLANK_UNCLOSE 0x05 /* Unclose the last session */
#define | BLANK_SESSION 0x06 /* Erase the last session */
#define | DS_OPERATIONAL 0
#define | DS_NO_DISC 1
#define | DS_TRAY_OPEN 2
#define | DS_NOT_READY 3
#define | SSU_STOP 0
#define | SSU_STOP_EJECT 1
#define | SSU_START 2
#define | SSU_LOAD_START 3

## Typedefs
typedef struct mode_header | mode_hdr

## Functions
void | fail (char *fmt,...)
struct request_sense * | get_sense_data ()
char * | get_sense_string (void)
int | blank (int fd, int type, int track)
int | format (int fd, int session_grow, int size)
int | close_track_session (int fd, int close_track, int track)
int | synchronize_cache (int fd)
int | test_unit_ready (int fd)
int | getDriveState (int fd)
int | inquiry (int fd, struct cdrom_inquiry *inq)
int | mediumRemoval (int fd, int allow)
int | read_discinfo (int fd, struct cdrom_discinfo *di)
int | read_trackinfo (int fd, struct cdrom_trackinfo *ti, int track)
int | read_buffercapacity (int fd, struct cdrom_buffercapacity *bufcap)
int | read_reccapacity (int fd, struct cdrom_reccapacity *rc)
int | read_header (int fd, struct cdrom_header *hd, u_int block)
int | reserve_track (int fd, int size)
int | startStopUnit (int fd, int ssu_action)
int | readCD (int fd, int sectortype, int lba, int nblocks, unsigned char *buf)
int | writeCD (int fd, int lba, int nblocks, unsigned char *buf)
int | mode_sense (int fd, u_char **buffer, u_char **mode, u_char pageno, int pgctl)
int | mode_select (int fd, u_char *buffer)
int | verify (int fd, int sectortype, int lba, int nblocks, char *buf)
int | set_cdspeed (int fd, int readspeed, int writespeed)
int | get_writeparams (int fd, u_char **buffer, struct cdrom_writeparams **wp, int pgctl)
int | set_writeparams (int fd, u_char *buffer, struct cdrom_writeparams *wp)
int | get_capabilities (int fd, u_char **buffer, struct cdrom_capabilities **cap, int pgctl)

## Macro Definition Documentation

#define BLANK_DISC 0x00 /* Erase the entire disc */

Definition at line 307 of file ide-pc.h.

#define BLANK_MINIMAL 0x01 /* Erase the PMA, 1st session TOC, pregap */

Definition at line 308 of file ide-pc.h.

#define BLANK_SESSION 0x06 /* Erase the last session */

Definition at line 313 of file ide-pc.h.

#define BLANK_TAIL 0x04 /* Erase the tail of a track: input trackno required */

Definition at line 311 of file ide-pc.h.

#define BLANK_TRACK 0x02 /* Erase an incomplete track */

Definition at line 309 of file ide-pc.h.

#define BLANK_UNCLOSE 0x05 /* Unclose the last session */

Definition at line 312 of file ide-pc.h.

#define BLANK_UNRESERVE 0x03 /* Unreserve a track */

Definition at line 310 of file ide-pc.h.

#define CAPS_LT_CADDY 0

Definition at line 279 of file ide-pc.h.

#define CAPS_LT_TRAY 1

Definition at line 280 of file ide-pc.h.

#define DB_RAW 0 /* 2352 bytes of raw data */

Definition at line 198 of file ide-pc.h.

#define DB_RAW_PQ 1 /* 2368 bytes (raw data + P/Q Subchannel) */

Definition at line 199 of file ide-pc.h.

#define DB_RAW_PW 2 /* 2448 bytes (raw data + P-W Subchannel) */

Definition at line 200 of file ide-pc.h.

#define DB_RAW_PW_R 3 /* 2448 bytes (raw data + P-W raw Subchannel)*/

Definition at line 201 of file ide-pc.h.

#define DB_RES_14 14 /* - Reserved */

Definition at line 212 of file ide-pc.h.

#define DB_RES_4 4 /* - Reserved */

Definition at line 202 of file ide-pc.h.

#define DB_RES_5 5 /* - Reserved */

Definition at line 203 of file ide-pc.h.

#define DB_RES_6 6 /* - Reserved */

Definition at line 204 of file ide-pc.h.

#define DB_ROM_MODE1 8 /* 2048 bytes Mode 1 (ISO/IEC 10149) */

Definition at line 206 of file ide-pc.h.

#define DB_ROM_MODE2 9 /* 2336 bytes Mode 2 (ISO/IEC 10149) */

Definition at line 207 of file ide-pc.h.

#define DB_VU_15 15 /* - Vendor specific */

Definition at line 213 of file ide-pc.h.

#define DB_VU_7 7 /* - Vendor specific */

Definition at line 205 of file ide-pc.h.

#define DB_XA_F1 10 /* 2048 bytes Mode 2? (CD-ROM XA form 1) */

Definition at line 208 of file ide-pc.h.

#define DB_XA_F1_8H 11 /* 2056 bytes Mode 2 (CD-ROM XA form 1) + 8 header bytes */

Definition at line 209 of file ide-pc.h.

#define DB_XA_F2 12 /* 2324 bytes Mode 2 (CD-ROM XA form 2) */

Definition at line 210 of file ide-pc.h.

#define DB_XA_MODE2_MIX 13 /* 2332 bytes Mode 2 (CD-ROM XA 1/2+subhdr) */

Definition at line 211 of file ide-pc.h.

#define DS_APPENDABLE 1 /* Incomplete disk (appendable) */

Definition at line 66 of file ide-pc.h.

#define DS_COMPLETE 2 /* Complete disk (closed/no B0 pointer) */

Definition at line 67 of file ide-pc.h.

#define DS_EMPTY 0 /* Empty disk */

Definition at line 65 of file ide-pc.h.

#define DS_NO_DISC 1

Definition at line 332 of file ide-pc.h.

#define DS_NOT_READY 3

Definition at line 334 of file ide-pc.h.

#define DS_OPERATIONAL 0

Definition at line 331 of file ide-pc.h.

#define DS_TRAY_OPEN 2

Definition at line 333 of file ide-pc.h.

#define GPMODE_CACHE_PAGE 0x08

Definition at line 161 of file ide-pc.h.

#define GPMODE_READ_ERROR_RECOV_PAGE 0x01

Definition at line 149 of file ide-pc.h.

#define INQ_CDROM 5

Definition at line 27 of file ide-pc.h.

#define INQ_WORM 4

Definition at line 26 of file ide-pc.h.

#define MS_FINAL 1 /* B0 = FF:FF:FF. Next session not allowed*/

Definition at line 194 of file ide-pc.h.

#define MS_MULTI 3 /* B0 = Next PA. Next session allowed */

Definition at line 195 of file ide-pc.h.

#define MS_NONE 0 /* No B0 pointer. Next session not allowed*/

Definition at line 193 of file ide-pc.h.

#define PGCTL_CHANGE_MASK 1

Definition at line 137 of file ide-pc.h.

#define PGCTL_CURRENT_VALUES 0

Definition at line 136 of file ide-pc.h.

#define PGCTL_DEFAULT_VALUES 2

Definition at line 138 of file ide-pc.h.

#define PGCTL_SAVED_VALUES 3

Definition at line 139 of file ide-pc.h.

#define SS_APPENDABLE 1 /* Incomplete session */

Definition at line 70 of file ide-pc.h.

#define SS_COMPLETE 3 /* Complete session (needs DS_COMPLETE) */

Definition at line 71 of file ide-pc.h.

#define SS_EMPTY 0 /* Empty session */

Definition at line 69 of file ide-pc.h.

#define SSU_LOAD_START 3

Definition at line 349 of file ide-pc.h.

#define SSU_START 2

Definition at line 348 of file ide-pc.h.

#define SSU_STOP 0

Definition at line 346 of file ide-pc.h.

#define SSU_STOP_EJECT 1

Definition at line 347 of file ide-pc.h.

## Typedef Documentation

typedef struct mode_header mode_hdr

## Function Documentation

int blank | ( | int | fd,
|  | int | type,
|  | int | track
| ) |  |

Definition at line 77 of file ide-pc.c.

int close_track_session | ( | int | fd,
|  | int | close_track,
|  | int | track
| ) |  |

Definition at line 90 of file ide-pc.c.

void fail | ( | char * | fmt,
|  |  | ...
| ) |  |

Definition at line 43 of file ide-pc.c.

int format | ( | int | fd,
|  | int | session_grow,
|  | int | size
| ) |  |

Definition at line 102 of file ide-pc.c.

int get_capabilities | ( | int | fd,
|  | u_char ** | buffer,
|  | struct cdrom_capabilities ** | cap,
|  | int | pgctl
| ) |  |

Definition at line 509 of file ide-pc.c.

struct request_sense* get_sense_data | ( |  | ) |

Definition at line 52 of file ide-pc.c.

char* get_sense_string | ( | void |  | ) |

Definition at line 58 of file ide-pc.c.

int get_writeparams | ( | int | fd,
|  | u_char ** | buffer,
|  | struct cdrom_writeparams ** | wp,
|  | int | pgctl
| ) |  |

Definition at line 486 of file ide-pc.c.

int getDriveState | ( | int | fd | ) |

Definition at line 164 of file ide-pc.c.

int inquiry | ( | int | fd,
|  | struct cdrom_inquiry * | inq
| ) |  |

Definition at line 189 of file ide-pc.c.

int mediumRemoval | ( | int | fd,
|  | int | allow
| ) |  |

Definition at line 203 of file ide-pc.c.

int mode_select | ( | int | fd,
|  | u_char * | buffer
| ) |  |

Definition at line 400 of file ide-pc.c.

int mode_sense | ( | int | fd,
|  | u_char ** | buffer,
|  | u_char ** | mode,
|  | u_char | pageno,
|  | int | pgctl
| ) |  |

Definition at line 416 of file ide-pc.c.

int read_buffercapacity | ( | int | fd,
|  | struct cdrom_buffercapacity * | bufcap
| ) |  |

Definition at line 231 of file ide-pc.c.

int read_discinfo | ( | int | fd,
|  | struct cdrom_discinfo * | di
| ) |  |

Definition at line 270 of file ide-pc.c.

int read_header | ( | int | fd,
|  | struct cdrom_header * | hd,
|  | u_int | block
| ) |  |

Definition at line 290 of file ide-pc.c.

int read_reccapacity | ( | int | fd,
|  | struct cdrom_reccapacity * | rc
| ) |  |

Definition at line 215 of file ide-pc.c.

int read_trackinfo | ( | int | fd,
|  | struct cdrom_trackinfo * | ti,
|  | int | track
| ) |  |

Definition at line 308 of file ide-pc.c.

int readCD | ( | int | fd,
|  | int | sectortype,
|  | int | lba,
|  | int | nblocks,
|  | unsigned char * | buf
| ) |  |

Definition at line 332 of file ide-pc.c.

int reserve_track | ( | int | fd,
|  | int | size
| ) |  |

Definition at line 248 of file ide-pc.c.

int set_cdspeed | ( | int | fd,
|  | int | readspeed,
|  | int | writespeed
| ) |  |

Definition at line 130 of file ide-pc.c.

int set_writeparams | ( | int | fd,
|  | u_char * | buffer,
|  | struct cdrom_writeparams * | wp
| ) |  |

Definition at line 495 of file ide-pc.c.

int startStopUnit | ( | int | fd,
|  | int | ssu_action
| ) |  |

Definition at line 259 of file ide-pc.c.

int synchronize_cache | ( | int | fd | ) |

Definition at line 143 of file ide-pc.c.

int test_unit_ready | ( | int | fd | ) |

Definition at line 153 of file ide-pc.c.

int verify | ( | int | fd,
|  | int | sectortype,
|  | int | lba,
|  | int | nblocks,
|  | char * | buf
| ) |  |

int writeCD | ( | int | fd,
|  | int | lba,
|  | int | nblocks,
|  | unsigned char * | buf
| ) |  |

Definition at line 349 of file ide-pc.c.