#include <IOKit/storage/IOCDTypes.h>

IOKit/storage/IOCDTypes.h Kernel.framework

(enable 8-bit struct packing)
includes: IOKit/IOTypes.h, Kernel/libkern/OSByteOrder.h
19 typedefs · 11 structs · 10 macros · 6 enums · 5 functions

structCDMSF

size 3, align 1
UInt8minute
UInt8second
UInt8frame

typedefCDMSF

typedef struct CDMSF CDMSF;

macrokCDMCNMaxLength

#define kCDMCNMaxLength 13

macrokCDISRCMaxLength

#define kCDISRCMaxLength 12

typedefCDMCN

typedef char CDMCN [kCDMCNMaxLength + 1]

typedefCDISRC

typedef char CDISRC[kCDISRCMaxLength + 1]

macrokCDAudioStatusUnsupported

#define kCDAudioStatusUnsupported 0x00

macrokCDAudioStatusActive

#define kCDAudioStatusActive 0x11

macrokCDAudioStatusPaused

#define kCDAudioStatusPaused 0x12

macrokCDAudioStatusSuccess

#define kCDAudioStatusSuccess 0x13

macrokCDAudioStatusFailure

#define kCDAudioStatusFailure 0x14

macrokCDAudioStatusNone

#define kCDAudioStatusNone 0x15

structCDAudioStatus

size 9, align 1
UInt8status
unnamed struct at Kernel/IOKit/storage/IOCDTypes.h:76:5position
CDMSFtime
unnamed struct at Kernel/IOKit/storage/IOCDTypes.h:79:9track
UInt8index
UInt8number
CDMSFtime

typedefCDAudioStatus

typedef struct CDAudioStatus CDAudioStatus;

structCDTOCDescriptor

size 11, align 1
UInt8session
UInt8:4control
UInt8:4adr
UInt8tno
UInt8point
CDMSFaddress
UInt8zero
CDMSFp

typedefCDTOCDescriptor

typedef struct CDTOCDescriptor CDTOCDescriptor;

structCDTOC

size 4, align 1
UInt16length
UInt8sessionFirst
UInt8sessionLast
CDTOCDescriptor[0]descriptors

typedefCDTOC

typedef struct CDTOC CDTOC;

functionCDTOCGetDescriptorCount

static inline UInt32 CDTOCGetDescriptorCount(CDTOC * toc)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu SDK Kernel.framework IOKit/storage/IOCDTypes.h (inline)
Returns the number of track descriptors in the given CD table of contents, computed from the TOC's big-endian length field; returns 0 if the length describes less than a full CDTOC header.

functionCDConvertMSFToLBA

static inline UInt32 CDConvertMSFToLBA(CDMSF msf)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu SDK Kernel.framework IOKit/storage/IOCDTypes.h (inline)
Converts a minute:second:frame address to a logical block address: ((minute * 60 + second) * 75) + frame - 150, the 150-frame (two second) lead-in offset making MSF 00:02:00 equal LBA 0.

functionCDConvertMSFToClippedLBA

static inline UInt32 CDConvertMSFToClippedLBA(CDMSF msf)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu SDK Kernel.framework IOKit/storage/IOCDTypes.h (inline)
Converts a minute:second:frame address to a logical block address in the manner of CDConvertMSFToLBA, but returns 0 for addresses within the initial two-second lead-in (minute 0, second <= 1), clipping what would be negative block numbers.

functionCDConvertLBAToMSF

static inline CDMSF CDConvertLBAToMSF(UInt32 lba)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu SDK Kernel.framework IOKit/storage/IOCDTypes.h (inline)
Converts a logical block address to a minute:second:frame address, adding the 150-frame lead-in offset (LBA 0 becomes MSF 00:02:00).

functionCDConvertTrackNumberToMSF

static inline CDMSF CDConvertTrackNumberToMSF(UInt8 track, CDTOC * toc)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu SDK Kernel.framework IOKit/storage/IOCDTypes.h (inline)
Returns the starting minute:second:frame address of the given track, found by searching the TOC descriptors for one with point equal to track and adr 1. Returns 0xFF:0xFF:0xFF if the track is not present. The CDTOC is assumed complete, with no descriptors clipped by an undersized buffer.

enumCDSectorArea

underlying type unsigned int
kCDSectorAreaSync128
kCDSectorAreaHeader32
kCDSectorAreaSubHeader64
kCDSectorAreaUser16
kCDSectorAreaAuxiliary8
kCDSectorAreaErrorFlags2
kCDSectorAreaSubChannel1
kCDSectorAreaSubChannelQ4

typedefCDSectorArea

typedef enum CDSectorArea CDSectorArea;

enumCDSectorType

underlying type unsigned int
kCDSectorTypeUnknown0
kCDSectorTypeCDDA1
kCDSectorTypeMode12
kCDSectorTypeMode23
kCDSectorTypeMode2Form14
kCDSectorTypeMode2Form25
kCDSectorTypeCount6

typedefCDSectorType

typedef enum CDSectorType CDSectorType;

enumCDSectorSize

underlying type unsigned int
kCDSectorSizeCDDA2352
kCDSectorSizeMode12048
kCDSectorSizeMode22336
kCDSectorSizeMode2Form12048
kCDSectorSizeMode2Form22328
kCDSectorSizeWhole2352

typedefCDSectorSize

typedef enum CDSectorSize CDSectorSize;

enum(anonymous)

underlying type unsigned int
kCDMediaTypeUnknown256
kCDMediaTypeROM258CD-ROM
kCDMediaTypeR260CD-R
kCDMediaTypeRW261CD-RW
kCDMediaTypeMin256
kCDMediaTypeMax511

typedefCDMediaType

typedef UInt32 CDMediaType

macrokCDSpeedMin

#define kCDSpeedMin 0x00B0

macrokCDSpeedMax

#define kCDSpeedMax 0xFFFF

typedefCDTOCFormat

Read Table Of Contents Format Types
typedef UInt8 CDTOCFormat

enum(anonymous)

underlying type unsigned int
kCDTOCFormatTOC2CDTOC
kCDTOCFormatPMA3CDPMA
kCDTOCFormatATIP4CDATIP
kCDTOCFormatTEXT5CDTEXT

structCDPMADescriptor

Read Table Of Contents Format 0x03
size 11, align 1
UInt8reserved
UInt8:4control
UInt8:4adr
UInt8tno
UInt8point
CDMSFaddress
UInt8zero
CDMSFp

typedefCDPMADescriptor

typedef struct CDPMADescriptor CDPMADescriptor

structCDPMA

size 4, align 1
UInt16dataLength
UInt8reserved
UInt8reserved2
CDPMADescriptor[0]descriptors

typedefCDPMA

typedef struct CDPMA CDPMA

structCDATIP

Read Table Of Contents Format 0x04
size 28, align 1
UInt16dataLength
UInt8[2]reserved
UInt8:3referenceSpeed
UInt8:1reserved3
UInt8:3indicativeTargetWritingPower
UInt8:1reserved2
UInt8:6reserved5
UInt8:1unrestrictedUse
UInt8:1reserved4
UInt8:1a3Valid
UInt8:1a2Valid
UInt8:1a1Valid
UInt8:3discSubType
UInt8:1discType
UInt8:1reserved6
UInt8reserved7
CDMSFstartTimeOfLeadIn
UInt8reserved8
CDMSFlastPossibleStartTimeOfLeadOut
UInt8reserved9
UInt8[3]a1
UInt8reserved10
UInt8[3]a2
UInt8reserved11
UInt8[3]a3
UInt8reserved12

typedefCDATIP

typedef struct CDATIP CDATIP

structCDTEXTDescriptor

Read Table Of Contents Format 0x05
size 18, align 1
UInt8packType
UInt8trackNumber
UInt8sequenceNumber
UInt8:4characterPosition
UInt8:3blockNumber
UInt8:1doubleByteCharacterCode
UInt8[12]textData
UInt8[2]reserved

typedefCDTEXTDescriptor

typedef struct CDTEXTDescriptor CDTEXTDescriptor

structCDTEXT

size 4, align 1
UInt16dataLength
UInt8reserved
UInt8reserved2
CDTEXTDescriptor[0]descriptors

typedefCDTEXT

typedef struct CDTEXT CDTEXT

structCDDiscInfo

Read Disc Information Format
size 34, align 1
UInt16dataLength
UInt8:2discStatus
UInt8:2stateOfLastSession
UInt8:1erasable
UInt8:3reserved
UInt8numberOfFirstTrack
UInt8numberOfSessionsLSB
UInt8firstTrackNumberInLastSessionLSB
UInt8lastTrackNumberInLastSessionLSB
UInt8:5reserved3
UInt8:1unrestrictedUse
UInt8:1discBarCodeValid
UInt8:1discIdentificationValid
UInt8discType
UInt8numberOfSessionsMSB
UInt8firstTrackNumberInLastSessionMSB
UInt8lastTrackNumberInLastSessionMSB
UInt32discIdentification
UInt8reserved7
CDMSFlastSessionLeadInStartTime
UInt8reserved8
CDMSFlastPossibleStartTimeOfLeadOut
UInt8[8]discBarCode
UInt8reserved9
UInt8numberOfOPCTableEntries
UInt8[0]opcTableEntries

typedefCDDiscInfo

typedef struct CDDiscInfo CDDiscInfo

typedefCDTrackInfoAddressType

Read Track Information Address Types
typedef UInt8 CDTrackInfoAddressType

enum(anonymous)

underlying type unsigned int
kCDTrackInfoAddressTypeLBA0
kCDTrackInfoAddressTypeTrackNumber1
kCDTrackInfoAddressTypeSessionNumber2

structCDTrackInfo

Read Track Information Format
size 36, align 1
UInt16dataLength
UInt8trackNumberLSB
UInt8sessionNumberLSB
UInt8reserved
UInt8:4trackMode
UInt8:1copy
UInt8:1damage
UInt8:2reserved3
UInt8:4dataMode
UInt8:1fixedPacket
UInt8:1packet
UInt8:1blank
UInt8:1reservedTrack
UInt8:1nextWritableAddressValid
UInt8:1lastRecordedAddressValid
UInt8:6reserved5
UInt32trackStartAddress
UInt32nextWritableAddress
UInt32freeBlocks
UInt32fixedPacketSize
UInt32trackSize
UInt32lastRecordedAddress
UInt8trackNumberMSB
UInt8sessionNumberMSB
UInt8reserved6
UInt8reserved7

typedefCDTrackInfo

typedef struct CDTrackInfo CDTrackInfo