Technical data

SunOS 5.5 Ioctl Requests cdio(7I)
contiguous ascending order.
/
definition of read toc header structure
/
struct cdrom_tochdr {
unsigned char cdth_trk0; /starting track/
unsigned char cdth_trk1; /ending track/
};
CDROMREADTOCENTRY
This ioctl() command returns the information of a specified track.
The third argument of the function call is a pointer to the type
struct cdrom_tocentry. The caller needs to supply the track
number and the address format. This command will return a 4-bit
adr field, a 4-bit ctrl field, the starting address in MSF format or
LBA format, and the data mode if the track is a data track. The ctrl
field specifies whether the track is data or audio.
/
definition of read toc entry structure
/
struct cdrom_tocentry {
unsigned char cdte_track;
unsigned char cdte_adr :4;
unsigned char cdte_ctrl :4;
unsigned char cdte_format;
union {
struct {
unsigned char minute;
unsigned char second;
unsigned char frame;
} msf;
int lba;
} cdte_addr;
unsigned char cdte_datamode;
};
To get the information from the leadout track, the following value
is appropriate for cdte_track the field:
CDROM_LEADOUT Leadout track
To get the information from the data track, the following value is
appropriate for cdte_ctrl the field:
CDROM_DATA_TRACK Data track
The following values are appropriate for the cdte_adr field:
modified 26 Jan 1995 7I-55