Proposal: a protocol-independent ironrdp-usb crate #1516
uchouT (uchouT)
started this conversation in
Ideas
Replies: 2 comments
|
As long as rdpeusb remains protocol-specific, I guess it'd be welcome to offer a common helper crate to expose higher level USB type & behaviour. In the meantime, you can iterate on this crate inside qemu-rdp anyway and see if it remains truly generic and generally useful? |
0 replies
|
Hi! Thank you for the write-up. I’m generally in favor of the split. The suggested architecture matches IronRDP’s philosophy: clear ownership, reusable semantics, smaller dependency surfaces, and more parallel compilation. I only have two cautions:
The approach I would recommend: extract standard USB definitions first, implement the RDPEUSB and usbredir translations, then generalize shared operation types based on observed overlap. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Context
I am currently working on integrating RDPEUSB support into
ironrdp-server, with the goal of using it from qemu-rdp's usbredir bridge.ironrdp-serverdoes not currently integrateironrdp-rdpeusb, so this work is still at the architecture and early implementation stage.While working on this integration, I found that a significant part of the required model is not specific to RDPEUSB. It consists of USB-standard concepts such as:
These concepts are needed both by the RDPEUSB implementation and by consumers that speak another USB transport protocol, such as qemu-rdp's usbredir bridge.
Before developing this further, I would like feedback on whether these concepts should live in a standalone
ironrdp-usbcrate.Proposed responsibility split
ironrdp-usbA protocol-independent,
no_std, sans-I/O crate containing USB-standard data structures and semantics.Possible responsibilities include:
It would not contain:
TS_URBstructures;The intent is for this crate to describe USB operations and data, but not execute them.
ironrdp-rdpeusbironrdp-rdpeusbwould remain responsible for the RDP protocol layer:TS_URBstructures and RDPEUSB-specific behavior;TS_URB, where applicable.The dependency direction would be:
ironrdp-usbwould not depend onironrdp-rdpeusb.ironrdp-serverironrdp-serverwould integrate the RDPEUSB processor and expose a higher-level device facade expressed usingironrdp-usbtypes.Conceptually, this could look like a
UsbDeviceHandleexposing operations such as:These names and signatures are only illustrative.
The server layer would own protocol execution concerns such as:
This would prevent users of
ironrdp-serverfrom having to interact directly withTS_URB, RDPEUSB processors, or internalServerEventwiring.Intended use from qemu-rdp
The expected data flow would be:
qemu-rdp would depend directly on:
ironrdp-server, for the device facade and request lifecycle;ironrdp-usb, for the types used by the facade and for translating usbredir packets.Ideally, qemu-rdp would not depend directly on
ironrdp-rdpeusband would not need to know aboutTS_URB.usbredir-specific behavior, such as its ordering and synchronous/asynchronous packet rules, would remain in qemu-rdp rather than becoming part of the generic USB or RDPEUSB layers.
The same server facade could potentially be reused by other server applications or bridges, such as macrdp, without exposing RDPEUSB protocol details to them.
Why not
ironrdp-rdpeusb::usb?Keeping these types under
ironrdp-rdpeusbwould be simpler initially, but it would make protocol-independent USB concepts appear to belong to RDPEUSB.It would also require consumers such as qemu-rdp to depend on
ironrdp-rdpeusbonly to access generic USB descriptor and transfer types.A standalone crate would make the intended layering explicit:
However, keeping the implementation as an
ironrdp-rdpeusb::usbmodule initially is still a possible alternative if a standalone crate is considered premature.I have created an initial crate skeleton, but I would like to agree on the ownership and dependency boundaries before expanding the implementation.
All reactions