Skip to content
Commit 3ec8d757 authored by Ole André Vadla Ravnås's avatar Ole André Vadla Ravnås Committed by Jakub Kicinski
Browse files

CDC-NCM: add support for Apple's private interface



Available on iOS/iPadOS >= 17, where this new interface is used by
developer tools using the new RemoteXPC protocol.

This private interface lacks a status endpoint, presumably because there
isn't a physical cable that can be unplugged, nor any speed changes to
be notified about.

Note that NCM interfaces are not exposed until a mode switch is
requested, which macOS does automatically.

The mode switch can be performed like this:

        uint8_t status;
        libusb_control_transfer(device_handle,
                LIBUSB_RECIPIENT_DEVICE | LIBUSB_REQUEST_TYPE_VENDOR |
                LIBUSB_ENDPOINT_IN,
                82, /* bRequest */
                0,  /* wValue   */
                3,  /* wIndex   */
                &status,
                sizeof(status),
                0);

Newer versions of usbmuxd do this automatically.

Co-developed-by: default avatarHåvard Sørbø <havard@hsorbo.no>
Signed-off-by: default avatarHåvard Sørbø <havard@hsorbo.no>
Signed-off-by: default avatarOle André Vadla Ravnås <oleavr@frida.re>
Link: https://lore.kernel.org/r/20240607074117.31322-1-oleavr@frida.re


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6fc1b322
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment