forked from george-hopkins/usbip-windows
-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The old WDM-based vhci could not fully support USB libraries and applications such as #111 because it did not implement many USB host contoller & hub functionalities. They were impossible to be properly developed with poor MS documents. However, MS has already implemented most things via USB device emulation(UDE). Now, usbip-win provides a vhci driver using UDE. It is experimental and more tests are required.
- Loading branch information
Showing
51 changed files
with
4,150 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
DEFINE_CPLX_TYPE(SETUPPKT, DBG_SETUPPKT, PCUCHAR, ItemString, "s", _SETUPPKT_, 0, 1); | ||
WPP_FLAGS(-DDBG_SETUPPKT(x) WPP_LOGPAIR(1024, dbg_usb_setup_packet(x))); | ||
DEFINE_CPLX_TYPE(URBR, WPP_URBR, purb_req_t, ItemString, "s", _URBR_, 0, 1); | ||
WPP_FLAGS(-DWPP_URBR(x) WPP_LOGPAIR((128), (dbg_urbr(x)))); | ||
DEFINE_CPLX_TYPE(URBFUNC, WPP_URBFUNC, USHORT, ItemString, "s", _URBFUNC_, 0, 1); | ||
WPP_FLAGS(-DWPP_URBFUNC(x) WPP_LOGPAIR((256), (dbg_urbfunc(x)))); | ||
DEFINE_CPLX_TYPE(IOCTL, WPP_IOCTL, unsigned int, ItemString, "s", _IOCTL_, 0, 1); | ||
WPP_FLAGS(-DWPP_IOCTL(x) WPP_LOGPAIR((256), (dbg_vhci_ioctl_code(x)))); | ||
USEPREFIX (TRD, " %!FUNC!:"); | ||
USEPREFIX (TRW, "(WW)%!FUNC!:"); | ||
USEPREFIX (TRE, "(EE)%!FUNC!:"); | ||
FUNC TRD{LEVEL=TRACE_LEVEL_INFORMATION}(FLAGS, MSG, ...); | ||
FUNC TRW{LEVEL=TRACE_LEVEL_WARNING}(FLAGS, MSG, ...); | ||
FUNC TRE{LEVEL=TRACE_LEVEL_ERROR}(FLAGS, MSG, ...); | ||
CUSTOM_TYPE(epconf, ItemEnum(_UDECX_ENDPOINTS_CONFIGURE_TYPE)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cd %1 | ||
if exist vhci_ude_cat del /s /q vhci_ude_cat | ||
mkdir vhci_ude_cat | ||
cd vhci_ude_cat | ||
copy ..\usbip_vhci_ude.sys | ||
copy ..\usbip_vhci_ude.inf | ||
inf2cat /driver:.\ /os:%2 /uselocaltime | ||
signtool sign /f %3 /p usbip usbip_vhci_ude.cat | ||
copy /y usbip_vhci_ude.cat .. | ||
cd .. | ||
del /s /q vhci_ude_cat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
; | ||
; usbip_vhci_ude.inf | ||
; | ||
|
||
[Version] | ||
Signature="$WINDOWS NT$" | ||
Class=USB | ||
ClassGuid={36FC9E60-C465-11CF-8056-444553540000} | ||
Provider=%ManufacturerName% | ||
CatalogFile=usbip_vhci_ude.cat | ||
DriverVer= | ||
|
||
[DestinationDirs] | ||
DefaultDestDir = 12 | ||
vhci_Device_CoInstaller_CopyFiles = 11 | ||
|
||
[SourceDisksNames] | ||
1 = %DiskName%,,,"" | ||
|
||
[SourceDisksFiles] | ||
usbip_vhci_ude.sys = 1,, | ||
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames | ||
|
||
;***************************************** | ||
; Install Section | ||
;***************************************** | ||
|
||
[Manufacturer] | ||
%ManufacturerName%=Standard,NT$ARCH$ | ||
|
||
[Standard.NT$ARCH$] | ||
%vhci.DeviceDesc%=vhci_Device, ROOT\VHCI_ude | ||
|
||
[vhci_Device.NT] | ||
CopyFiles=Drivers_Dir | ||
|
||
[Drivers_Dir] | ||
usbip_vhci_ude.sys | ||
|
||
[vhci_Device.NT.HW] | ||
AddReg=vhci_AddReg | ||
|
||
[vhci_AddReg] | ||
; By default, USBDevice class uses iProduct descriptor to name the device in | ||
; Device Manager on Windows 8 and higher. | ||
; Uncomment for this device to use %DeviceName% on Windows 8 and higher: | ||
;HKR,,FriendlyName,,%vhci.DeviceDesc% | ||
|
||
;-------------- Service installation | ||
[vhci_Device.NT.Services] | ||
AddService = usbip_vhci_ude,%SPSVCINST_ASSOCSERVICE%, vhci_Service_Inst | ||
|
||
; -------------- vhci driver install sections | ||
[vhci_Service_Inst] | ||
DisplayName = %vhci.SVCDESC% | ||
ServiceType = 1 ; SERVICE_KERNEL_DRIVER | ||
StartType = 3 ; SERVICE_DEMAND_START | ||
ErrorControl = 1 ; SERVICE_ERROR_NORMAL | ||
ServiceBinary = %12%\usbip_vhci_ude.sys | ||
|
||
; | ||
;--- vhci_Device Coinstaller installation ------ | ||
; | ||
|
||
[vhci_Device.NT.CoInstallers] | ||
AddReg=vhci_Device_CoInstaller_AddReg | ||
CopyFiles=vhci_Device_CoInstaller_CopyFiles | ||
|
||
[vhci_Device_CoInstaller_AddReg] | ||
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller" | ||
|
||
[vhci_Device_CoInstaller_CopyFiles] | ||
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll | ||
|
||
[vhci_Device.NT.Wdf] | ||
KmdfService = usbip_vhci_ude, usbip_vhci_wdfsect | ||
[usbip_vhci_wdfsect] | ||
KmdfLibraryVersion = $KMDFVERSION$ | ||
|
||
[Strings] | ||
SPSVCINST_ASSOCSERVICE= 0x00000002 | ||
ManufacturerName="usbip-win project" | ||
DiskName = "usbip-win VHCI(ude) Disk" | ||
vhci.DeviceDesc = "usbip-win VHCI(ude)" | ||
vhci.SVCDESC = "usbip-win vhci(ude) Service" | ||
REG_MULTI_SZ = 0x00010000 |
Oops, something went wrong.