Version: 0.5.0
Docs.rs: ironrdp-dvc
Docs.rs: ironrdp-dvc
Overview
Theironrdp-dvc crate provides infrastructure for RDP Dynamic Virtual Channels (DVCs). Unlike static channels (SVCs), dynamic channels:
- Can be created and destroyed at any time during the session
- Have no hard limit on the number of channels
- Don’t require packet reconstruction (handled by the DVC manager)
- Use the DRDYNVC static channel as a control channel
- The DRDYNVC static channel implementation
DvcProcessortrait for implementing custom DVCs- Client and server-side DVC managers
Core Traits
DvcProcessor
fn(&self) -> &str
Returns the channel name (e.g., “Microsoft::Windows::RDS::Geometry”)
fn(&mut self, channel_id: u32) -> PduResult<Vec<DvcMessage>>
Called when the channel is opened. Returns initial PDUs to send.
fn(&mut self, channel_id: u32, payload: &[u8]) -> PduResult<Vec<DvcMessage>>
Process a received PDU. Returns response PDUs to send.
fn(&mut self, channel_id: u32)
Called when the channel is closed (optional handler)
DvcEncode
SvcEncode.
Client API
DrdynvcClient
Server API
DrdynvcServer
DVC Message Encoding
u32
The DVC channel ID (assigned by the server)
Vec<DvcMessage>
Messages to encode
ChannelFlags
Additional SVC flags (compression, etc.)
DataFirstPdu and DataPdu.
PDU Types
Implementation Example
Internal Types
DynamicVirtualChannel
DvcProcessor. Handles message reassembly from DataFirst and Data PDUs.
Type Aliases
Data Splitting
DVC messages larger thanDrdynvcDataPdu::MAX_DATA_SIZE are automatically split:
DataFirstPdu (includes total size), subsequent fragments use DataPdu.
Features
feature
Enables standard library support
no_std environments (with alloc).
Dependencies
ironrdp-core- Core traits (public)ironrdp-svc- Static channel infrastructure (public)ironrdp-pdu- PDU structures (public)slab- Efficient channel ID allocationtracing- Logging
Usage Notes
DVC Lifecycle:
Dynamic channels go through these states:
Dynamic channels go through these states:
- Added to
DrdynvcClient(client) orDrdynvcServer(server) - Create Request/Response exchanged
- Channel ID assigned
start()called- Data exchange via
process() - Close PDU exchanged
close()called
Channel Naming:
DVC names are typically hierarchical with
DVC names are typically hierarchical with
:::Microsoft::Windows::RDS::DisplayControlMicrosoft::Windows::RDS::GeometryMicrosoft::Windows::RDS::VideoControl
Thread Safety:
Both
Both
DrdynvcClient and DrdynvcServer require Send but not Sync. They’re designed for single-threaded event loops or message-passing architectures.Common Dynamic Channels
IronRDP provides implementations for these standard DVCs:ironrdp-displaycontrol- Display resolution/orientation controlironrdp-egfx- Enhanced graphics pipeline (RemoteFX)ironrdp-rdpdr- Device redirection (via DVC in some configurations)
See Also
- ironrdp-svc - Static virtual channels
- ironrdp-pdu - PDU structures
- MS-RDPEDYC - DRDYNVC specification

