Skip to content

Commit 4f5fdd3

Browse files
authored
feat(connector): advertise multitransport channel in GCC blocks (#1092)
Add multitransport_flags config option to populate the MultiTransportChannelData GCC block during connection negotiation. When None (the default), behavior is unchanged.
1 parent 5a50f40 commit 4f5fdd3

7 files changed

Lines changed: 14 additions & 2 deletions

File tree

crates/ironrdp-client/src/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ impl Config {
511511
enable_audio_playback: true,
512512
request_data: None,
513513
pointer_software_rendering: false,
514+
multitransport_flags: None,
514515
compression_type,
515516
performance_flags: PerformanceFlags::default(),
516517
timezone_info: TimezoneInfo::default(),

crates/ironrdp-connector/src/connection.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,9 @@ fn create_gcc_blocks<'a>(
728728
monitor: None,
729729
// TODO(#140): support for Client Message Channel Data (https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/f50e791c-de03-4b25-b17e-e914c9020bc3)
730730
message_channel: None,
731-
// TODO(#140): support for Some(MultiTransportChannelData { flags: MultiTransportFlags::empty(), })
732-
multi_transport_channel: None,
731+
multi_transport_channel: config
732+
.multitransport_flags
733+
.map(|flags| gcc::MultiTransportChannelData { flags }),
733734
monitor_extended: None,
734735
})
735736
}

crates/ironrdp-connector/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ pub struct Config {
249249
// FIXME(@CBenoit): these are client-only options, not part of the connector.
250250
pub enable_server_pointer: bool,
251251
pub pointer_software_rendering: bool,
252+
253+
/// Flags to advertise in the [`MultiTransportChannelData`] GCC block.
254+
///
255+
/// [\[MS-RDPBCGR\] 2.2.1.3.7]: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/861f2bbb-6ca2-4c5a-8c44-0714fa901e70
256+
/// [`MultiTransportChannelData`]: ironrdp_pdu::gcc::MultiTransportChannelData
257+
pub multitransport_flags: Option<gcc::MultiTransportFlags>,
252258
}
253259

254260
ironrdp_core::assert_impl!(Config: Send, Sync);

crates/ironrdp-testsuite-extra/tests/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ fn default_client_config() -> connector::Config {
306306
compression_type: None,
307307
enable_server_pointer: true,
308308
pointer_software_rendering: true,
309+
multitransport_flags: None,
309310
performance_flags: Default::default(),
310311
timezone_info: Default::default(),
311312
}

crates/ironrdp-web/src/session.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,7 @@ fn build_config(
906906
enable_audio_playback: false,
907907
request_data: None,
908908
pointer_software_rendering: false,
909+
multitransport_flags: None,
909910
performance_flags: PerformanceFlags::default(),
910911
desktop_scale_factor: 0,
911912
hardware_id: None,

crates/ironrdp/examples/screenshot.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ fn build_config(
264264
enable_audio_playback: false,
265265
compression_type,
266266
pointer_software_rendering: true,
267+
multitransport_flags: None,
267268
performance_flags: PerformanceFlags::default(),
268269
desktop_scale_factor: 0,
269270
hardware_id: None,

ffi/src/connector/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ pub mod ffi {
215215
request_data: None,
216216
compression_type: None,
217217
pointer_software_rendering: self.pointer_software_rendering.unwrap_or(false),
218+
multitransport_flags: None,
218219
performance_flags: self.performance_flags.ok_or("performance flag is missing")?,
219220
desktop_scale_factor: 0,
220221
hardware_id: None,

0 commit comments

Comments
 (0)