^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) ===============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) USB/IP protocol
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) ===============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) PRELIMINARY DRAFT, MAY CONTAIN MISTAKES!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) 28 Jun 2011
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) The USB/IP protocol follows a server/client architecture. The server exports the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) USB devices and the clients imports them. The device driver for the exported
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) USB device runs on the client machine.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) The client may ask for the list of the exported USB devices. To get the list the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) client opens a TCP/IP connection towards the server, and sends an OP_REQ_DEVLIST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) packet on top of the TCP/IP connection (so the actual OP_REQ_DEVLIST may be sent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) in one or more pieces at the low level transport layer). The server sends back
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) the OP_REP_DEVLIST packet which lists the exported USB devices. Finally the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) TCP/IP connection is closed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) virtual host controller usb host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) "client" "server"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) (imports USB devices) (exports USB devices)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) | OP_REQ_DEVLIST |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) | ----------------------------------------------> |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) | OP_REP_DEVLIST |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) | <---------------------------------------------- |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) Once the client knows the list of exported USB devices it may decide to use one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) of them. First the client opens a TCP/IP connection towards the server and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) sends an OP_REQ_IMPORT packet. The server replies with OP_REP_IMPORT. If the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) import was successful the TCP/IP connection remains open and will be used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) to transfer the URB traffic between the client and the server. The client may
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) send two types of packets: the USBIP_CMD_SUBMIT to submit an URB, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) USBIP_CMD_UNLINK to unlink a previously submitted URB. The answers of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) server may be USBIP_RET_SUBMIT and USBIP_RET_UNLINK respectively.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) virtual host controller usb host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) "client" "server"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) (imports USB devices) (exports USB devices)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) | OP_REQ_IMPORT |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) | ----------------------------------------------> |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) | OP_REP_IMPORT |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) | <---------------------------------------------- |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) | USBIP_CMD_SUBMIT(seqnum = n) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) | ----------------------------------------------> |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) | USBIP_RET_SUBMIT(seqnum = n) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) | <---------------------------------------------- |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) | . |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) | : |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) | USBIP_CMD_SUBMIT(seqnum = m) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) | ----------------------------------------------> |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) | USBIP_CMD_SUBMIT(seqnum = m+1) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) | ----------------------------------------------> |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) | USBIP_CMD_SUBMIT(seqnum = m+2) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) | ----------------------------------------------> |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) | USBIP_RET_SUBMIT(seqnum = m) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) | <---------------------------------------------- |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) | USBIP_CMD_SUBMIT(seqnum = m+3) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) | ----------------------------------------------> |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) | USBIP_RET_SUBMIT(seqnum = m+1) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) | <---------------------------------------------- |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) | USBIP_CMD_SUBMIT(seqnum = m+4) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) | ----------------------------------------------> |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) | USBIP_RET_SUBMIT(seqnum = m+2) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) | <---------------------------------------------- |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) | . |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) | : |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) | USBIP_CMD_UNLINK |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) | ----------------------------------------------> |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) | USBIP_RET_UNLINK |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) | <---------------------------------------------- |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) The fields are in network (big endian) byte order meaning that the most significant
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) byte (MSB) is stored at the lowest address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) OP_REQ_DEVLIST:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) Retrieve the list of exported USB devices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) | Offset | Length | Value | Description |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) +===========+========+============+===================================================+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) | 0 | 2 | 0x0100 | Binary-coded decimal USBIP version number: v1.0.0 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) | 2 | 2 | 0x8005 | Command code: Retrieve the list of exported USB |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) | | | | devices. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) | 4 | 4 | 0x00000000 | Status: unused, shall be set to 0 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) OP_REP_DEVLIST:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) Reply with the list of exported USB devices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) | Offset | Length | Value | Description |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) +===========+========+============+===================================================+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) | 0 | 2 | 0x0100 | Binary-coded decimal USBIP version number: v1.0.0.|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) | 2 | 2 | 0x0005 | Reply code: The list of exported USB devices. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) | 4 | 4 | 0x00000000 | Status: 0 for OK |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) | 8 | 4 | n | Number of exported devices: 0 means no exported |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) | | | | devices. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) | 0x0C | | | From now on the exported n devices are described, |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) | | | | if any. If no devices are exported the message |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) | | | | ends with the previous "number of exported |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) | | | | devices" field. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) | | 256 | | path: Path of the device on the host exporting the|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) | | | | USB device, string closed with zero byte, e.g. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) | | | | "/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-2" |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) | | | | The unused bytes shall be filled with zero |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) | | | | bytes. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) | 0x10C | 32 | | busid: Bus ID of the exported device, string |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) | | | | closed with zero byte, e.g. "3-2". The unused |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) | | | | bytes shall be filled with zero bytes. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) | 0x12C | 4 | | busnum |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) | 0x130 | 4 | | devnum |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) | 0x134 | 4 | | speed |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) | 0x138 | 2 | | idVendor |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) | 0x13A | 2 | | idProduct |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) | 0x13C | 2 | | bcdDevice |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) | 0x13E | 1 | | bDeviceClass |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) | 0x13F | 1 | | bDeviceSubClass |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) | 0x140 | 1 | | bDeviceProtocol |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) | 0x141 | 1 | | bConfigurationValue |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) | 0x142 | 1 | | bNumConfigurations |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) | 0x143 | 1 | | bNumInterfaces |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) | 0x144 | | m_0 | From now on each interface is described, all |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) | | | | together bNumInterfaces times, with the |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) | | | | the following 4 fields: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) | | 1 | | bInterfaceClass |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) | 0x145 | 1 | | bInterfaceSubClass |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) | 0x146 | 1 | | bInterfaceProtocol |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) | 0x147 | 1 | | padding byte for alignment, shall be set to zero |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) | 0xC + | | | The second exported USB device starts at i=1 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) | i*0x138 + | | | with the busid field. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) | m_(i-1)*4 | | | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) OP_REQ_IMPORT:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) Request to import (attach) a remote USB device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) | Offset | Length | Value | Description |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) +===========+========+============+===================================================+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) | 0 | 2 | 0x0100 | Binary-coded decimal USBIP version number: v1.0.0 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) | 2 | 2 | 0x8003 | Command code: import a remote USB device. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) | 4 | 4 | 0x00000000 | Status: unused, shall be set to 0 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) | 8 | 32 | | busid: the busid of the exported device on the |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) | | | | remote host. The possible values are taken |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) | | | | from the message field OP_REP_DEVLIST.busid. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) | | | | A string closed with zero, the unused bytes |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) | | | | shall be filled with zeros. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) OP_REP_IMPORT:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) Reply to import (attach) a remote USB device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) | Offset | Length | Value | Description |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) +===========+========+============+===================================================+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) | 0 | 2 | 0x0100 | Binary-coded decimal USBIP version number: v1.0.0 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) | 2 | 2 | 0x0003 | Reply code: Reply to import. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) | 4 | 4 | 0x00000000 | Status: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) | | | | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) | | | | - 0 for OK |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) | | | | - 1 for error |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) | 8 | | | From now on comes the details of the imported |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) | | | | device, if the previous status field was OK (0), |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) | | | | otherwise the reply ends with the status field. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) | | 256 | | path: Path of the device on the host exporting the|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) | | | | USB device, string closed with zero byte, e.g. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) | | | | "/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-2" |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) | | | | The unused bytes shall be filled with zero |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) | | | | bytes. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) | 0x108 | 32 | | busid: Bus ID of the exported device, string |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) | | | | closed with zero byte, e.g. "3-2". The unused |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) | | | | bytes shall be filled with zero bytes. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) | 0x128 | 4 | | busnum |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) | 0x12C | 4 | | devnum |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) | 0x130 | 4 | | speed |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) | 0x134 | 2 | | idVendor |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) | 0x136 | 2 | | idProduct |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) | 0x138 | 2 | | bcdDevice |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) | 0x139 | 1 | | bDeviceClass |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) | 0x13A | 1 | | bDeviceSubClass |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) | 0x13B | 1 | | bDeviceProtocol |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) | 0x13C | 1 | | bConfigurationValue |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) | 0x13D | 1 | | bNumConfigurations |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) | 0x13E | 1 | | bNumInterfaces |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) USBIP_CMD_SUBMIT:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) Submit an URB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) | Offset | Length | Value | Description |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) +===========+========+============+===================================================+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) | 0 | 4 | 0x00000001 | command: Submit an URB |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) | 4 | 4 | | seqnum: the sequence number of the URB to submit |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) | 8 | 4 | | devid |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) | 0xC | 4 | | direction: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) | | | | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) | | | | - 0: USBIP_DIR_OUT |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) | | | | - 1: USBIP_DIR_IN |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) | 0x10 | 4 | | ep: endpoint number, possible values are: 0...15 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) | 0x14 | 4 | | transfer_flags: possible values depend on the |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) | | | | URB transfer type, see below |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) | 0x18 | 4 | | transfer_buffer_length |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) | 0x1C | 4 | | start_frame: specify the selected frame to |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) | | | | transmit an ISO frame, ignored if URB_ISO_ASAP |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) | | | | is specified at transfer_flags |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) | 0x20 | 4 | | number_of_packets: number of ISO packets |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) | 0x24 | 4 | | interval: maximum time for the request on the |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) | | | | server-side host controller |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) | 0x28 | 8 | | setup: data bytes for USB setup, filled with |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) | | | | zeros if not used |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) | 0x30 | | | URB data. For ISO transfers the padding between |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) | | | | each ISO packets is not transmitted. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) +-------------------------+------------+---------+-----------+----------+-------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) | Allowed transfer_flags | value | control | interrupt | bulk | isochronous |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) +=========================+============+=========+===========+==========+=============+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) | URB_SHORT_NOT_OK | 0x00000001 | only in | only in | only in | no |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) +-------------------------+------------+---------+-----------+----------+-------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) | URB_ISO_ASAP | 0x00000002 | no | no | no | yes |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) +-------------------------+------------+---------+-----------+----------+-------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) | URB_NO_TRANSFER_DMA_MAP | 0x00000004 | yes | yes | yes | yes |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) +-------------------------+------------+---------+-----------+----------+-------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) | URB_ZERO_PACKET | 0x00000040 | no | no | only out | no |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) +-------------------------+------------+---------+-----------+----------+-------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) | URB_NO_INTERRUPT | 0x00000080 | yes | yes | yes | yes |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) +-------------------------+------------+---------+-----------+----------+-------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) | URB_FREE_BUFFER | 0x00000100 | yes | yes | yes | yes |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) +-------------------------+------------+---------+-----------+----------+-------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) | URB_DIR_MASK | 0x00000200 | yes | yes | yes | yes |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) +-------------------------+------------+---------+-----------+----------+-------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) USBIP_RET_SUBMIT:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) Reply for submitting an URB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) | Offset | Length | Value | Description |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) +===========+========+============+===================================================+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) | 0 | 4 | 0x00000003 | command |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) | 4 | 4 | | seqnum: URB sequence number |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) | 8 | 4 | | devid |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) | 0xC | 4 | | direction: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) | | | | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) | | | | - 0: USBIP_DIR_OUT |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) | | | | - 1: USBIP_DIR_IN |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) | 0x10 | 4 | | ep: endpoint number |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) | 0x14 | 4 | | status: zero for successful URB transaction, |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) | | | | otherwise some kind of error happened. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) | 0x18 | 4 | n | actual_length: number of URB data bytes |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) | 0x1C | 4 | | start_frame: for an ISO frame the actually |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) | | | | selected frame for transmit. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) | 0x20 | 4 | | number_of_packets |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) | 0x24 | 4 | | error_count |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) | 0x28 | 8 | | setup: data bytes for USB setup, filled with |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) | | | | zeros if not used |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) | 0x30 | n | | URB data bytes. For ISO transfers the padding |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) | | | | between each ISO packets is not transmitted. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) USBIP_CMD_UNLINK:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) Unlink an URB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) | Offset | Length | Value | Description |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) +===========+========+============+===================================================+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) | 0 | 4 | 0x00000002 | command: URB unlink command |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) | 4 | 4 | | seqnum: URB sequence number to unlink: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) | | | | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) | | | | FIXME: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) | | | | is this so? |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) | 8 | 4 | | devid |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) | 0xC | 4 | | direction: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) | | | | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) | | | | - 0: USBIP_DIR_OUT |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) | | | | - 1: USBIP_DIR_IN |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) | 0x10 | 4 | | ep: endpoint number: zero |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) | 0x14 | 4 | | seqnum: the URB sequence number given previously |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) | | | | at USBIP_CMD_SUBMIT.seqnum field |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) | 0x30 | n | | URB data bytes. For ISO transfers the padding |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) | | | | between each ISO packets is not transmitted. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) USBIP_RET_UNLINK:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) Reply for URB unlink
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) | Offset | Length | Value | Description |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) +===========+========+============+===================================================+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) | 0 | 4 | 0x00000004 | command: reply for the URB unlink command |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) | 4 | 4 | | seqnum: the unlinked URB sequence number |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) | 8 | 4 | | devid |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) | 0xC | 4 | | direction: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) | | | | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) | | | | - 0: USBIP_DIR_OUT |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) | | | | - 1: USBIP_DIR_IN |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) | 0x10 | 4 | | ep: endpoint number |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) | 0x14 | 4 | | status: This is the value contained in the |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) | | | | urb->status in the URB completition handler. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) | | | | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) | | | | FIXME: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) | | | | a better explanation needed. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) +-----------+--------+------------+---------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) | 0x30 | n | | URB data bytes. For ISO transfers the padding |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) | | | | between each ISO packets is not transmitted. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) +-----------+--------+------------+---------------------------------------------------+