usbip: fix VBoxUSB ioctl codes missing the FILE_WRITE_ACCESS bit
Every SUPUSB/SUPUSBFLT CTL_CODE was computed with Access = 0 instead of FILE_WRITE_ACCESS (2 << 14), so the driver dispatch rejected each call with STATUS_INVALID_DEVICE_REQUEST and the export host could not even pass monitor GET_VERSION. Values now match usbipd-win's interop definitions (VBoxUsb.cs / VBoxUsbMon.cs).
This commit is contained in:
+10
-10
@@ -53,19 +53,19 @@ const (
|
||||
// Method = METHOD_BUFFERED (0).
|
||||
const (
|
||||
// Per-device VBoxUSB.sys (\\?\<setupapi-resolved path>).
|
||||
IOCTLSendURB uint32 = 0x0022_181C // function 0x607
|
||||
IOCTLUSBSelectInterface uint32 = 0x0022_1824 // function 0x609
|
||||
IOCTLUSBSetConfig uint32 = 0x0022_1828 // function 0x60a
|
||||
IOCTLUSBClaimDevice uint32 = 0x0022_182C // function 0x60b
|
||||
IOCTLUSBClearEndpoint uint32 = 0x0022_1838 // function 0x60e
|
||||
IOCTLGetVersion uint32 = 0x0022_183C // function 0x60f
|
||||
IOCTLUSBAbortEndpoint uint32 = 0x0022_1840 // function 0x610
|
||||
IOCTLSendURB uint32 = 0x0022_981C // function 0x607
|
||||
IOCTLUSBSelectInterface uint32 = 0x0022_9824 // function 0x609
|
||||
IOCTLUSBSetConfig uint32 = 0x0022_9828 // function 0x60a
|
||||
IOCTLUSBClaimDevice uint32 = 0x0022_982C // function 0x60b
|
||||
IOCTLUSBClearEndpoint uint32 = 0x0022_9838 // function 0x60e
|
||||
IOCTLGetVersion uint32 = 0x0022_983C // function 0x60f
|
||||
IOCTLUSBAbortEndpoint uint32 = 0x0022_9840 // function 0x610
|
||||
|
||||
// VBoxUSBMon (\\.\VBoxUSBMon). Note GET_VERSION shares the numeric
|
||||
// code with VBoxUSB's USB_ABORT_ENDPOINT — different handles.
|
||||
IOCTLMonitorGetVersion uint32 = 0x0022_1840
|
||||
IOCTLMonitorAddFilter uint32 = 0x0022_1844
|
||||
IOCTLMonitorRemoveFilter uint32 = 0x0022_1848
|
||||
IOCTLMonitorGetVersion uint32 = 0x0022_9840 // function 0x610
|
||||
IOCTLMonitorAddFilter uint32 = 0x0022_9844 // function 0x611
|
||||
IOCTLMonitorRemoveFilter uint32 = 0x0022_9848 // function 0x612
|
||||
)
|
||||
|
||||
// USB/IP-style transfer type enum, matching VirtualBox USBSUP_TRANSFER_TYPE.
|
||||
|
||||
Reference in New Issue
Block a user