@@ -21,6 +21,7 @@ use crate::{
21
21
cid_queue:: CidQueue ,
22
22
coding:: { BufExt , BufMutExt , UnexpectedEnd } ,
23
23
config:: { EndpointConfig , ServerConfig , TransportConfig } ,
24
+ connection:: PathId ,
24
25
shared:: ConnectionId ,
25
26
ResetToken , Side , TransportError , VarInt , LOC_CID_COUNT , MAX_CID_SIZE , MAX_STREAM_COUNT ,
26
27
RESET_TOKEN_SIZE , TIMER_GRANULARITY ,
@@ -117,7 +118,7 @@ macro_rules! make_struct {
117
118
pub ( crate ) address_discovery_role: address_discovery:: Role ,
118
119
119
120
// Multipath extension
120
- pub ( crate ) initial_max_path_id: Option <VarInt >,
121
+ pub ( crate ) initial_max_path_id: Option <PathId >,
121
122
}
122
123
123
124
// We deliberately don't implement the `Default` trait, since that would be public, and
@@ -528,7 +529,7 @@ impl TransportParameters {
528
529
return Err ( Error :: Malformed ) ;
529
530
}
530
531
531
- let value: VarInt = r. get ( ) ?;
532
+ let value: PathId = r. get ( ) ?;
532
533
if len != value. size ( ) {
533
534
return Err ( Error :: Malformed ) ;
534
535
}
@@ -708,7 +709,7 @@ pub(crate) enum TransportParameterId {
708
709
709
710
impl TransportParameterId {
710
711
/// Array with all supported transport parameter IDs
711
- const SUPPORTED : [ Self ; 22 ] = [
712
+ const SUPPORTED : [ Self ; 23 ] = [
712
713
Self :: MaxIdleTimeout ,
713
714
Self :: MaxUdpPayloadSize ,
714
715
Self :: InitialMaxData ,
@@ -731,6 +732,7 @@ impl TransportParameterId {
731
732
Self :: GreaseQuicBit ,
732
733
Self :: MinAckDelayDraft07 ,
733
734
Self :: ObservedAddr ,
735
+ Self :: InitialMaxPathId ,
734
736
] ;
735
737
}
736
738
@@ -810,7 +812,7 @@ mod test {
810
812
grease_quic_bit : true ,
811
813
min_ack_delay : Some ( 2_000u32 . into ( ) ) ,
812
814
address_discovery_role : address_discovery:: Role :: SendOnly ,
813
- initial_max_path_id : Some ( VarInt :: MAX ) ,
815
+ initial_max_path_id : Some ( PathId :: MAX ) ,
814
816
..TransportParameters :: default ( )
815
817
} ;
816
818
params. write ( & mut buf) ;
0 commit comments