Files
sing-box/common/vboxusb/assets_windows_amd64.go
世界 6a4ae5263e usbip: extract URBEngine + userspaceURBSession from darwin backend
Both the existing darwin backend and the upcoming windows backend
drive USB devices from user space (IOUSBHost CGO calls vs. VBoxUSB
IOCTLs). Refactor the per-attachment URB loop out of host_darwin.go
into a platform-agnostic userspaceURBSession that talks to a URBEngine
interface; the darwin-specific dispatch becomes a 30-line
darwinIOUSBHostEngine. Linux's kernelHandoffSession is untouched.

Move hex8 into shared.go and add usbipStatusEIO so the shared session
does not depend on golang.org/x/sys/unix (Windows has no equivalent).
2026-06-09 10:42:35 +08:00

27 lines
494 B
Go

//go:build windows && amd64
package vboxusb
import _ "embed"
//go:embed assets/amd64/VBoxUSB.sys
var vboxUSBSys []byte
//go:embed assets/amd64/VBoxUSB.inf
var vboxUSBInf []byte
//go:embed assets/amd64/VBoxUSB.cat
var vboxUSBCat []byte
//go:embed assets/amd64/VBoxUSBMon.sys
var vboxUSBMonSys []byte
func assetFiles() []assetFile {
return []assetFile{
{"VBoxUSB.sys", vboxUSBSys},
{"VBoxUSB.inf", vboxUSBInf},
{"VBoxUSB.cat", vboxUSBCat},
{"VBoxUSBMon.sys", vboxUSBMonSys},
}
}