feat(rdpeusb): implement urbdrc server processors#1394
Conversation
Signed-off-by: uchouT <i@uchout.moe>
Remove `TsUrbHeader` from each `TsUrb` variant so that `TsUrb` can become a composable `TsUrbInKind` / `TsUrbOutKind`. This is useful for creating `request id`-agnostic `TsUrbOutPacket` / `TsUrbOutPacket` types. By doing so, it prevents the backend from assigning an invalid request id, cleanly delegating the responsibility of request id allocation entirely to the server state machine. Signed-off-by: uchouT <i@uchout.moe>
Signed-off-by: uchouT <i@uchout.moe>
Signed-off-by: uchouT <i@uchout.moe>
Signed-off-by: uchouT <i@uchout.moe>
437e06c to
762283a
Compare
|
lgtm, it could use more doc comments and tests, but I suppose this will come next. How to trigger copilot checks? Benoît Cortier (@CBenoit) |
Benoît Cortier (CBenoit)
left a comment
There was a problem hiding this comment.
I’m sorry, I need to trigger it manually for now, but I’m discussing internally about having them automatically
There was a problem hiding this comment.
Pull request overview
This PR adds the server-side RDPEUSB (URBDRC) protocol processors to ironrdp-rdpeusb, introduces a backend-facing rdpeusb::io data model shared by client/server, and refactors TS_URB representations to better separate headers from payload variants.
Changes:
- Implement
UrbdrcControlServerandUrbdrcDeviceServerstate machines with request tracking (request_id -> pending_io) and completion dispatching. - Introduce
crates/ironrdp-rdpeusb::ioas a backend boundary for requests/completions used by both client and server. - Refactor TS_URB types and related PDU utilities, plus adjust testsuite imports and the client backend trait to support no-ack OUT transfers.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/ironrdp-testsuite-core/tests/rdpeusb/mod.rs | Update testsuite imports to new rdpeusb::io::device types. |
| crates/ironrdp-testsuite-core/tests/rdpeusb/device.rs | Switch device test helpers to rdpeusb::io::device module. |
| crates/ironrdp-testsuite-core/tests/rdpeusb/client.rs | Align test backend with new io::* request/completion types and no-ack OUT API. |
| crates/ironrdp-rdpeusb/src/lib.rs | Export new io module and server module. |
| crates/ironrdp-rdpeusb/src/io/mod.rs | Add shared backend-facing request/completion types and server IO request wrapper. |
| crates/ironrdp-rdpeusb/src/io/device.rs | Document and expose backend-neutral USB device descriptor/config information. |
| crates/ironrdp-rdpeusb/src/client.rs | Refactor client backend boundary to use io::* types; add no-ack OUT handler. |
| crates/ironrdp-rdpeusb/src/server.rs | New URBDRC server control/device processors with pending-IO tracking and completion routing. |
| crates/ironrdp-rdpeusb/src/pdu/utils.rs | Improve decode error typing for transfer request IDs. |
| crates/ironrdp-rdpeusb/src/pdu/completion/mod.rs | Adopt new RequestIdTransferInOut decode error type usage. |
| crates/ironrdp-rdpeusb/src/pdu/iface_manipulation.rs | Add DvcEncode impl for InterfaceRelease to support DVC message dispatch. |
| crates/ironrdp-rdpeusb/src/pdu/usb_dev/mod.rs | Update TS_URB access patterns and add DvcEncode impl for IoControl. |
| crates/ironrdp-rdpeusb/src/pdu/usb_dev/ts_urb/utils.rs | Update TS_URB utility imports and make TsUrbHeader Copy. |
| crates/ironrdp-rdpeusb/src/pdu/usb_dev/ts_urb/mod.rs | Refactor TS_URB in/out into {header, kind} structs and separate *Kind enums. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Part of #1138
rdpeusb::iorequest and completion types shared by client and server implementations.Note
Types in
rdpeusb::iodefine a system boundary, worth good design.cc Marc-Andre Lureau (@elmarco)