<!--
{
  "availability" : [
    "DriverKit: 19.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USBDriverKit",
  "identifier" : "/documentation/USBDriverKit/IOUSBHostInterface",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "USBDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUSBHostInterface"
  },
  "title" : "IOUSBHostInterface"
}
-->

# IOUSBHostInterface

A provider object that manages interactions with an interface of the USB device.

```
class IOUSBHostInterface;
```

## Overview

An [`IOUSBHostInterface`](/documentation/USBDriverKit/IOUSBHostInterface) object represents one of the interfaces the USB device supports. When implementing a custom driver, use an [`IOUSBHostInterface`](/documentation/USBDriverKit/IOUSBHostInterface) object to get information about the specific interface and to communicate with the device using that interface.

Typically, you don’t create [`IOUSBHostInterface`](/documentation/USBDriverKit/IOUSBHostInterface) objects directly. During configuration of your driver, you can specify that your driver relies on an [`IOUSBHostInterface`](/documentation/USBDriverKit/IOUSBHostInterface) as its provider, in which case the system creates the object for you automatically during the matching process. Alternatively, if your driver uses an [`IOUSBHostDevice`](/documentation/USBDriverKit/IOUSBHostDevice) object as its provider, you can iterate over all of the device’s interfaces to retrieve the specific [`IOUSBHostInterface`](/documentation/USBDriverKit/IOUSBHostInterface) object you need.

To use a host interface object, call [`Open`](/documentation/USBDriverKit/IOUSBHostInterface/Open) to create a new session between the interface and your driver. After successfully opening your session, you can request information from the interface and set up pipes to communicate with the interface’s endpoints. Remember to close the session you opened in the <doc://com.apple.documentation/documentation/DriverKit/IOService/Stop> method of your driver.

## Topics

### Managing the Device Session

[`Open`](/documentation/USBDriverKit/IOUSBHostInterface/Open)

Opens a session to the host interface.

[`Close`](/documentation/USBDriverKit/IOUSBHostInterface/Close)

Closes the session to the host interface.

### Getting Interface-Related Descriptors

[`CopyConfigurationDescriptor`](/documentation/USBDriverKit/IOUSBHostInterface/CopyConfigurationDescriptor)

Retrieves the parent configuration descriptor for this interface.

[`GetInterfaceDescriptor`](/documentation/USBDriverKit/IOUSBHostInterface/GetInterfaceDescriptor)

Returns the version of the interface descriptor that is associated with the specified configuration.

[`CopyStringDescriptor`](/documentation/USBDriverKit/IOUSBHostInterface/CopyStringDescriptor-83du1)

Returns a descriptor from the device in the specified language.

[`CopyStringDescriptor`](/documentation/USBDriverKit/IOUSBHostInterface/CopyStringDescriptor-8k65j)

Returns a string descriptor from the device.

### Getting an Endpoint Pipe

[`CopyPipe`](/documentation/USBDriverKit/IOUSBHostInterface/CopyPipe)

Returns the pipe for the specified endpoint address.

### Getting the Device

[`CopyDevice`](/documentation/USBDriverKit/IOUSBHostInterface/CopyDevice)

Returns the host device object that contains this interface.

### Requesting Data from the Default Control Endpoint

[`DeviceRequest`](/documentation/USBDriverKit/IOUSBHostInterface/DeviceRequest)

Sends a synchronous request to the device on the default control endpoint.

[`AsyncDeviceRequest`](/documentation/USBDriverKit/IOUSBHostInterface/AsyncDeviceRequest)

Enqueues a request on the default control endpoint of the device.

[`AbortDeviceRequests`](/documentation/USBDriverKit/IOUSBHostInterface/AbortDeviceRequests)

Aborts device requests that you made previously from the current interface client.

### Configuring the Interface

[`GetFrameNumber`](/documentation/USBDriverKit/IOUSBHostInterface/GetFrameNumber)

Gets the current frame number of the USB controller.

[`GetPortStatus`](/documentation/USBDriverKit/IOUSBHostInterface/GetPortStatus)

Gets the current port status.

[`SelectAlternateSetting`](/documentation/USBDriverKit/IOUSBHostInterface/SelectAlternateSetting)

Selects an alternative setting for this interface.

[`GetIdlePolicy`](/documentation/USBDriverKit/IOUSBHostInterface/GetIdlePolicy)

Gets the current idle suspend timeout for the interface.

[`SetIdlePolicy`](/documentation/USBDriverKit/IOUSBHostInterface/SetIdlePolicy)

Sets the desired idle suspend timeout for the interface.

[`tIOUSBHostPortStatus`](/documentation/USBDriverKit/tIOUSBHostPortStatus)

Constants indicating the state of a port.

### Creating Memory Buffers

[`CreateIOBuffer`](/documentation/USBDriverKit/IOUSBHostInterface/CreateIOBuffer)

Allocates a buffer for use during I/O operations.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)