-
Notifications
You must be signed in to change notification settings - Fork 170
Open
Labels
A-virtual-channelArea: Static or dynamic virtual channelArea: Static or dynamic virtual channelenhancementNew feature or requestNew feature or request
Description
Implement a concrete UsbClientBackend using the rusb crate (safe Rust bindings to libusb). This is the bridge between the RDPEUSB protocol state machine and real USB hardware.
Depends on:
- [ironrdp-rdpeusb] Client-side protocol state machine #1137 (for the UsbClientBackend trait definition)
Tasks
- Define UsbClientBackend trait (in ironrdp-rdpeusb, gated behind a feature flag):
pub trait UsbClientBackend: Send {
fn enumerate_devices(&self) -> Vec<UsbDeviceInfo>;
fn open_device(&mut self, device_id: &str) -> PduResult<()>;
fn close_device(&mut self, device_id: &str);
fn submit_urb(&mut self, request: UsbRequest) -> PduResult<()>;
fn cancel_urb(&mut self, request_id: u32);
}- Implement RusbBackend in a backend/rusb.rs module (feature-gated: feature = "rusb")
- Device enumeration: list connected USB devices with descriptors (VID, PID, manufacturer, product, serial, hardware IDs compatible with MS-RDPEUSB ADD_DEVICE)
- Open/close devices via rusb
- URB submission: translate TS_URB structures to rusb transfer operations (control, bulk, interrupt, isochronous)
- Async completion delivery back to UsbDeviceChannel
- URB cancellation
- NoopUsbClientBackend: no-op implementation for testing
Acceptance criteria
- A real USB device (e.g. USB flash drive or HID device) can be enumerated and its descriptors sent to the server via ADD_DEVICE
- At minimum bulk and control transfers work end-to-end
- Isochronous transfers stubbed with a clear note (webcams, audio; that’s complex, follow-up scope)
- Tested on Linux; Windows/macOS noted as follow-up
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-virtual-channelArea: Static or dynamic virtual channelArea: Static or dynamic virtual channelenhancementNew feature or requestNew feature or request