Mac Developer Library

Developer

IOStreamShared.h Reference

Options
Deployment Target:

On This Page

IOStreamShared.h Reference

IOStream definitions shared between kernel and user space.

Included Headers

  • <sys/cdefs.h>

  • <IOKit/IOTypes.h>

Data Types

See the Overview section above for header-level documentation.

  • Declaration

    Objective-C

    typedef UInt32 IOStreamBufferID;

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • Declaration

    Objective-C

    struct IOStreamBufferQueue { UInt32 entryCount; volatile UInt32 headIndex; volatile UInt32 tailIndex; UInt32 reserved; IOStreamBufferQueueEntry queue[0]; };

    Fields

    entryCount

    The number of queue entries in the queue.

    headIndex

    The index of the next queue slot that will be filled in by the queue writer.

    tailIndex

    The index of the next queue slot that can be read by the queue reader.

    reserved

    Reserved for future use.

    queue

    The array of queue entries.

    Availability

    Available in OS X v10.6 and later.

  • Declaration

    Objective-C

    struct IOStreamBufferQueueEntry { IOStreamBufferID bufferID; UInt32 dataOffset; UInt32 dataLength; UInt32 controlOffset; UInt32 controlLength; UInt32 reserved[3]; };

    Fields

    bufferID

    The ID of the buffer passed in this queue entry.

    dataLength

    The length of the valid data in the buffer.

    reserved

    Reserved for future use.

    Availability

    Available in OS X v10.6 and later.

Constants

See the Overview section above for header-level documentation.

  • Declaration

    Objective-C

    enum { kIOStreamOptionOpenExclusive = 0x00010000, kIOStreamOptionOpenShared = 0x00020000 };

    Import Statement

  • Port types used with IOConnectSetNotificationPort().

    Declaration

    Objective-C

    enum { kIOStreamPortTypeOutput, kIOStreamPortTypeInput };

    Constants

    • kIOStreamPortTypeOutput

      kIOStreamPortTypeOutput

      Available in OS X v10.5 and later.

    • kIOStreamPortTypeInput

      kIOStreamPortTypeInput

      Available in OS X v10.5 and later.

    Import Statement

  • Memory types used with IOConnectMapMemory().

    Declaration

    Objective-C

    enum { kIOStreamMemoryTypeOutputQueue = 0x10000000, kIOStreamMemoryTypeInputQueue = 0x20000000, kIOStreamMemoryTypeBufferData = 0x30000000, kIOStreamMemoryTypeBufferControl = 0x40000000, kIOStreamBufferIDMask = 0x0FFFFFFF, kIOStreamMemoryTypeMask = 0xF0000000 };

    Constants

    • kIOStreamMemoryTypeOutputQueue

      kIOStreamMemoryTypeOutputQueue

      Available in OS X v10.5 and later.

    • kIOStreamMemoryTypeInputQueue

      kIOStreamMemoryTypeInputQueue

      Available in OS X v10.5 and later.

    • kIOStreamMemoryTypeBufferData

      kIOStreamMemoryTypeBufferData

      Available in OS X v10.5 and later.

    • kIOStreamMemoryTypeBufferControl

      kIOStreamMemoryTypeBufferControl

      Available in OS X v10.5 and later.

    • kIOStreamBufferIDMask

      kIOStreamBufferIDMask

      Available in OS X v10.5 and later.

    • kIOStreamMemoryTypeMask

      kIOStreamMemoryTypeMask

      Available in OS X v10.5 and later.

    Import Statement

  • Client method numbers used with IOConnectMethod...() functions.

    Declaration

    Objective-C

    enum { kIOStreamMethodOpen, kIOStreamMethodClose, kIOStreamMethodStart, kIOStreamMethodStop, kIOStreamMethodSuspend, kIOStreamMethodGetMode, kIOStreamMethodSetMode, kIOStreamMethodGetBufferCount };

    Constants

    • kIOStreamMethodOpen

      kIOStreamMethodOpen

      Available in OS X v10.5 and later.

    • kIOStreamMethodClose

      kIOStreamMethodClose

      Available in OS X v10.5 and later.

    • kIOStreamMethodStart

      kIOStreamMethodStart

      Available in OS X v10.5 and later.

    • kIOStreamMethodStop

      kIOStreamMethodStop

      Available in OS X v10.5 and later.

    • kIOStreamMethodSuspend

      kIOStreamMethodSuspend

      Available in OS X v10.5 and later.

    • kIOStreamMethodGetMode

      kIOStreamMethodGetMode

      Available in OS X v10.5 and later.

    • kIOStreamMethodSetMode

      kIOStreamMethodSetMode

      Available in OS X v10.5 and later.

    Import Statement

  • Client trap numbers used with IOConnectTrap..() functions.

    Declaration

    Objective-C

    enum { kIOStreamEnqueueInputTrap, kIOStreamEnqueueInputSyncTrap };

    Constants

    • kIOStreamEnqueueInputTrap

      kIOStreamEnqueueInputTrap

      Available in OS X v10.5 and later.

    • kIOStreamEnqueueInputSyncTrap

      kIOStreamEnqueueInputSyncTrap

      Available in OS X v10.5 and later.

    Import Statement