Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ PDU encoding and decoding.

_TODO_: clean up the dependencies

#### [`crates/ironrdp-usb`](./crates/ironrdp-usb)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. However, I’ll not add fuzzing as part of this PR.

uchouT (@uchouT) is this a follow up you intended to do in the future?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in my future plan, and #1690 seems to help.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right! I’ll go check it


Protocol-independent USB data structures, descriptor parsing, validation, and transfer semantics.

**Architectural Invariant**: the crate does not allocate.
Descriptor views borrow caller data, and transfer types are generic over caller-owned buffer and packet storage.

**Architectural Invariant**: parsing is limited to byte layouts defined by USB itself.
RDPEUSB, usbredir, and other transport framing belong in their corresponding protocol crates.

#### [`crates/ironrdp-graphics`](./crates/ironrdp-graphics)

Image processing primitives.
Expand Down Expand Up @@ -115,6 +125,13 @@ AUDIO_INPUT dynamic channel for client microphone capture implemented as describ
URBDRC dynamic channel state machines, PDU codecs, and USB device backend interfaces implemented as described in MS-RDPEUSB.
The crate performs no USB I/O; host device access belongs to a backend.

**Architectural Invariant**: the `usb` module translates protocol-independent `ironrdp-usb` operations and descriptor semantics into complete backend-facing RDPEUSB packets and maps USBD completions back.
The generated packet keeps its `TS_URB` payload, URB function code, transfer envelope, flags, and buffer shape consistent.
Selecting `TS_URB` forms and applying Windows USBD conventions remain in this crate.

**Architectural Invariant**: the `usb` module does not allocate request IDs, track device state, or manage pending-request lifetimes.
The channel state machines (`client` and `server`) and their backends own those responsibilities outside the translation module.

#### [`crates/ironrdp-rdpecam`](./crates/ironrdp-rdpecam)

Video capture dynamic channel client and backend boundary implemented as described in MS-RDPECAM.
Expand Down
4 changes: 4 additions & 0 deletions crates/ironrdp-usb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ authors.workspace = true
keywords.workspace = true
categories.workspace = true

[lib]
doctest = false
test = false

[lints]
workspace = true
Loading