@@ -118,7 +118,7 @@ impl Endpoint {
118118 }
119119 RetireConnectionId ( now, path_id, seq, allow_more_cids) => {
120120 if let Some ( cid) = self . connections [ ch]
121- . loc_cids
121+ . local_cids
122122 . get_mut ( & path_id)
123123 . and_then ( |pcid| pcid. cids . remove ( & seq) )
124124 {
@@ -348,12 +348,12 @@ impl Endpoint {
348348 trace ! ( initial_dcid = %remote_id) ;
349349
350350 let ch = ConnectionHandle ( self . connections . vacant_key ( ) ) ;
351- let loc_cid = self . new_cid ( ch, PathId :: ZERO ) ;
351+ let local_cid = self . new_cid ( ch, PathId :: ZERO ) ;
352352 let params = TransportParameters :: new (
353353 & config. transport ,
354354 & self . config ,
355355 self . local_cid_generator . as_ref ( ) ,
356- loc_cid ,
356+ local_cid ,
357357 None ,
358358 & mut self . rng ,
359359 ) ;
@@ -365,7 +365,7 @@ impl Endpoint {
365365 ch,
366366 config. version ,
367367 remote_id,
368- loc_cid ,
368+ local_cid ,
369369 remote_id,
370370 FourTuple {
371371 remote,
@@ -394,7 +394,7 @@ impl Endpoint {
394394 let mut ids = vec ! [ ] ;
395395 for _ in 0 ..num {
396396 let id = self . new_cid ( ch, path_id) ;
397- let cid_meta = self . connections [ ch] . loc_cids . entry ( path_id) . or_default ( ) ;
397+ let cid_meta = self . connections [ ch] . local_cids . entry ( path_id) . or_default ( ) ;
398398 let sequence = cid_meta. issued ;
399399 cid_meta. issued += 1 ;
400400 cid_meta. cids . insert ( sequence, id) ;
@@ -606,16 +606,16 @@ impl Endpoint {
606606 } ;
607607
608608 let ch = ConnectionHandle ( self . connections . vacant_key ( ) ) ;
609- let loc_cid = self . new_cid ( ch, PathId :: ZERO ) ;
609+ let local_cid = self . new_cid ( ch, PathId :: ZERO ) ;
610610 let mut params = TransportParameters :: new (
611611 & server_config. transport ,
612612 & self . config ,
613613 self . local_cid_generator . as_ref ( ) ,
614- loc_cid ,
614+ local_cid ,
615615 Some ( & server_config) ,
616616 & mut self . rng ,
617617 ) ;
618- params. stateless_reset_token = Some ( ResetToken :: new ( & * self . config . reset_key , loc_cid ) ) ;
618+ params. stateless_reset_token = Some ( ResetToken :: new ( & * self . config . reset_key , local_cid ) ) ;
619619 params. original_dst_cid = Some ( incoming. token . orig_dst_cid ) ;
620620 params. retry_src_cid = incoming. token . retry_src_cid ;
621621 let mut pref_addr_cid = None ;
@@ -636,7 +636,7 @@ impl Endpoint {
636636 ch,
637637 version,
638638 dst_cid,
639- loc_cid ,
639+ local_cid ,
640640 src_cid,
641641 incoming. network_path ,
642642 incoming. received_at ,
@@ -751,7 +751,7 @@ impl Endpoint {
751751 // with established connections. In the unlikely event that a collision occurs
752752 // between two connections in the initial phase, both will fail fast and may be
753753 // retried by the application layer.
754- let loc_cid = self . local_cid_generator . generate_cid ( ) ;
754+ let local_cid = self . local_cid_generator . generate_cid ( ) ;
755755
756756 let payload = TokenPayload :: Retry {
757757 address : incoming. network_path . remote ,
@@ -761,7 +761,7 @@ impl Endpoint {
761761 let token = Token :: new ( payload, & mut self . rng ) . encode ( & * server_config. token_key ) ;
762762
763763 let header = Header :: Retry {
764- src_cid : loc_cid ,
764+ src_cid : local_cid ,
765765 dst_cid : incoming. packet . header . src_cid ,
766766 version : incoming. packet . header . version ,
767767 } ;
@@ -805,8 +805,8 @@ impl Endpoint {
805805 ch : ConnectionHandle ,
806806 version : u32 ,
807807 init_cid : ConnectionId ,
808- loc_cid : ConnectionId ,
809- rem_cid : ConnectionId ,
808+ local_cid : ConnectionId ,
809+ remote_cid : ConnectionId ,
810810 network_path : FourTuple ,
811811 now : Instant ,
812812 tls : Box < dyn crypto:: Session > ,
@@ -825,8 +825,8 @@ impl Endpoint {
825825
826826 qlog. emit_connection_started (
827827 now,
828- loc_cid ,
829- rem_cid ,
828+ local_cid ,
829+ remote_cid ,
830830 network_path. remote ,
831831 network_path. local_ip ,
832832 params,
@@ -836,8 +836,8 @@ impl Endpoint {
836836 self . config . clone ( ) ,
837837 transport_config,
838838 init_cid,
839- loc_cid ,
840- rem_cid ,
839+ local_cid ,
840+ remote_cid ,
841841 network_path,
842842 tls,
843843 self . local_cid_generator . as_ref ( ) ,
@@ -850,7 +850,7 @@ impl Endpoint {
850850 ) ;
851851
852852 let mut path_cids = PathLocalCids :: default ( ) ;
853- path_cids. cids . insert ( path_cids. issued , loc_cid ) ;
853+ path_cids. cids . insert ( path_cids. issued , local_cid ) ;
854854 path_cids. issued += 1 ;
855855
856856 if let Some ( cid) = pref_addr_cid {
@@ -861,14 +861,14 @@ impl Endpoint {
861861
862862 let id = self . connections . insert ( ConnectionMeta {
863863 init_cid,
864- loc_cids : FxHashMap :: from_iter ( [ ( PathId :: ZERO , path_cids) ] ) ,
864+ local_cids : FxHashMap :: from_iter ( [ ( PathId :: ZERO , path_cids) ] ) ,
865865 network_path,
866866 side,
867867 reset_token : Default :: default ( ) ,
868868 } ) ;
869869 debug_assert_eq ! ( id, ch. 0 , "connection handle allocation out of sync" ) ;
870870
871- self . index . insert_conn ( network_path, loc_cid , ch, side) ;
871+ self . index . insert_conn ( network_path, local_cid , ch, side) ;
872872
873873 conn
874874 }
@@ -1093,7 +1093,11 @@ impl ConnectionIndex {
10931093 if conn. side . is_server ( ) {
10941094 self . remove_initial ( conn. init_cid ) ;
10951095 }
1096- for cid in conn. loc_cids . values ( ) . flat_map ( |pcids| pcids. cids . values ( ) ) {
1096+ for cid in conn
1097+ . local_cids
1098+ . values ( )
1099+ . flat_map ( |pcids| pcids. cids . values ( ) )
1100+ {
10971101 self . connection_ids . remove ( cid) ;
10981102 }
10991103 self . incoming_connection_remotes . remove ( & conn. network_path ) ;
@@ -1144,7 +1148,7 @@ impl ConnectionIndex {
11441148pub ( crate ) struct ConnectionMeta {
11451149 init_cid : ConnectionId ,
11461150 /// Locally issues CIDs for each path
1147- loc_cids : FxHashMap < PathId , PathLocalCids > ,
1151+ local_cids : FxHashMap < PathId , PathLocalCids > ,
11481152 /// Remote/local addresses the connection began with
11491153 ///
11501154 /// Only needed to support connections with zero-length CIDs, which cannot migrate, so we don't
0 commit comments