Line 15:
Line 15:
{| class="wikitable"
{| class="wikitable"
|-
|-
β
! Ioctl
+
! Ioctl !! Name !! Input !! Output
β
! Parameters
+
! Notes
β
! Function
β
! Notes
|-
|-
β
| 0
+
| 0 || GetVersion || None ||
β
| 0 / 0x20 (ioctl)
+
32 bytes
β
| ven_open
+
β
|
+
0-4: version (0x50001)
+
|
|-
|-
β
| 1
+
| 1 || GetDeviceChange || None ||
β
| 0 / 0x180 (ioctl)
+
<code>Entry[32]</code> (0x180 bytes)
β
| ven_attach_complete_callback
+
β
|
+
For each entry:
+
+
0-1: IPC request address >> 8<br>
+
1-2: Device index (0 to 31)<br>
+
2-4: Device number<br>
+
4-6: VID<br>
+
6-8: PID<br>
+
8-10: Device number<br>
+
10-11: Interface number<br>
+
11-12: Number of alternate settings<br>
+
+
| Set up a device insertion/removal callback. Returns the number of entries.
+
+
Note that this ioctl immediately returns on the first call.
|-
|-
β
| 2
+
| 2 || Shutdown || None || None
β
| 0 / 0 (ioctl)
+
| Releases the device change callback with 0 as return code.
β
| ven_close
β
|
|-
|-
β
| 3
+
| 3 || GetDeviceInfo || 0x20 || 0xc0
β
| 0x20 / 0xC0 (ioctl)
β
| ?
| calls /dev/usb/usb ioctl 2
| calls /dev/usb/usb ioctl 2
|-
|-
β
| 4
+
| 4 || ? || 0x20 || None
β
| 0x20 / 0 (ioctl)
+
|
β
| ?
β
|
|-
|-
β
| 5
+
| 5 || ? || 0x20 || None
β
| 0x20 / 0 (ioctl)
β
| ?
| indirectly calls /dev/usb/usb ioctl 1
| indirectly calls /dev/usb/usb ioctl 1
|-
|-
β
| 6
+
| 6 || AttachFinish || None || None
β
| 0 / 0 (ioctl)
β
| ?
| calls /dev/usb/usb ioctl 1
| calls /dev/usb/usb ioctl 1
|-
|-
β
| 7
+
| 7 || SetAlternateSetting || 0x20 || None
β
| 0x20 / 0 (ioctl)
β
| ven_set_alt_setting
| calls /dev/usb/usb ioctl 5 and/or 0x11
| calls /dev/usb/usb ioctl 5 and/or 0x11
|-
|-
β
| 8
+
| 8 || ? || 0x20 || None
β
| 0x20 / ? (ioctl)
β
| ?
| calls /dev/usb/usb ioctl 3
| calls /dev/usb/usb ioctl 3
|-
|-
β
| 0x10
+
| 0x10 || SuspendResume || 0x20 || None
β
| 0x20 / 0 (ioctl)
β
| ven_suspend_resume, ven_attach_suspend_callback, ven_attach_get_device_params_callback
| calls /dev/usb/usb ioctl 4
| calls /dev/usb/usb ioctl 4
|-
|-
β
| 0x11
+
| 0x11 || CancelEndpoint || 0x20 || None
β
| 0x20 / 0 (ioctl)
β
| ven_cancel_endpoint
| calls /dev/usb/usb ioctl 0x10
| calls /dev/usb/usb ioctl 0x10
|-
|-
β
| 0x12
+
| 0x12 (ioctlv) || CtrlTransfer ||colspan=2| 1 in / 1 io or 2 in / 0 io
β
| 1 in / 1 io, or 2 in / 0 io? (ioctlv)
β
| ven_ctrl
| calls /dev/usb/usb ioctl 0x11
| calls /dev/usb/usb ioctl 0x11
|-
|-
β
| 0x13
+
| 0x13 (ioctlv) || IntrTransfer ||colspan=2| 1 in / 1 io or 2 in / 0 io
β
| 1/1 or 2/0? (ioctlv)
β
| ven_intr
| calls /dev/usb/usb ioctl 0x12
| calls /dev/usb/usb ioctl 0x12
|-
|-
β
| 0x14
+
| 0x14 (ioctlv) || IsoTransfer ||colspan=2| 2 in / 2 io or 3 in / 1 io
β
| 2/2 or 3/1 (ioctlv)
β
| ven_isoc
| calls /dev/usb/usb ioctl 0x13
| calls /dev/usb/usb ioctl 0x13
|-
|-
β
| 0x15
+
| 0x15 (ioctlv) || BulkTransfer ||colspan=2| ?
β
| ? (ioctlv)
β
| ven_?
| calls /dev/usb/usb ioctl 0x14
| calls /dev/usb/usb ioctl 0x14
|}
|}