@@ -286,7 +286,7 @@ pub struct InterfaceBuilder<'a> {
286286 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
287287 sixlowpan_fragments : PacketAssemblerSet < ' a , SixlowpanFragKey > ,
288288 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
289- sixlowpan_fragments_cache_timeout : Duration ,
289+ sixlowpan_reassembly_buffer_timeout : Duration ,
290290 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
291291 sixlowpan_out_buffer : ManagedSlice < ' a , u8 > ,
292292}
@@ -325,8 +325,8 @@ let builder = InterfaceBuilder::new()
325325
326326# #[cfg(feature = "proto-ipv4-fragmentation")]
327327let builder = builder
328- .ipv4_fragments_cache (ipv4_frag_cache)
329- .ipv4_out_packet_cache (vec![]);
328+ .ipv4_reassembly_buffer (ipv4_frag_cache)
329+ .ipv4_fragmentation_buffer (vec![]);
330330
331331let iface = builder.finalize(&mut device);
332332```
@@ -359,7 +359,7 @@ let iface = builder.finalize(&mut device);
359359 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
360360 sixlowpan_fragments : PacketAssemblerSet :: new ( & mut [ ] [ ..] , & mut [ ] [ ..] ) ,
361361 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
362- sixlowpan_fragments_cache_timeout : Duration :: from_secs ( 60 ) ,
362+ sixlowpan_reassembly_buffer_timeout : Duration :: from_secs ( 60 ) ,
363363 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
364364 sixlowpan_out_buffer : ManagedSlice :: Borrowed ( & mut [ ] [ ..] ) ,
365365 }
@@ -474,13 +474,13 @@ let iface = builder.finalize(&mut device);
474474 }
475475
476476 #[ cfg( feature = "proto-ipv4-fragmentation" ) ]
477- pub fn ipv4_fragments_cache ( mut self , storage : PacketAssemblerSet < ' a , Ipv4FragKey > ) -> Self {
477+ pub fn ipv4_reassembly_buffer ( mut self , storage : PacketAssemblerSet < ' a , Ipv4FragKey > ) -> Self {
478478 self . ipv4_fragments = storage;
479479 self
480480 }
481481
482482 #[ cfg( feature = "proto-ipv4-fragmentation" ) ]
483- pub fn ipv4_out_packet_cache < T > ( mut self , storage : T ) -> Self
483+ pub fn ipv4_fragmentation_buffer < T > ( mut self , storage : T ) -> Self
484484 where
485485 T : Into < ManagedSlice < ' a , u8 > > ,
486486 {
@@ -489,7 +489,7 @@ let iface = builder.finalize(&mut device);
489489 }
490490
491491 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
492- pub fn sixlowpan_fragments_cache (
492+ pub fn sixlowpan_reassembly_buffer (
493493 mut self ,
494494 storage : PacketAssemblerSet < ' a , SixlowpanFragKey > ,
495495 ) -> Self {
@@ -498,16 +498,16 @@ let iface = builder.finalize(&mut device);
498498 }
499499
500500 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
501- pub fn sixlowpan_fragments_cache_timeout ( mut self , timeout : Duration ) -> Self {
501+ pub fn sixlowpan_reassembly_buffer_timeout ( mut self , timeout : Duration ) -> Self {
502502 if timeout > Duration :: from_secs ( 60 ) {
503503 net_debug ! ( "RFC 4944 specifies that the reassembly timeout MUST be set to a maximum of 60 seconds" ) ;
504504 }
505- self . sixlowpan_fragments_cache_timeout = timeout;
505+ self . sixlowpan_reassembly_buffer_timeout = timeout;
506506 self
507507 }
508508
509509 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
510- pub fn sixlowpan_out_packet_cache < T > ( mut self , storage : T ) -> Self
510+ pub fn sixlowpan_fragmentation_buffer < T > ( mut self , storage : T ) -> Self
511511 where
512512 T : Into < ManagedSlice < ' a , u8 > > ,
513513 {
@@ -611,7 +611,7 @@ let iface = builder.finalize(&mut device);
611611 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
612612 sixlowpan_fragments : self . sixlowpan_fragments ,
613613 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
614- sixlowpan_fragments_cache_timeout : self . sixlowpan_fragments_cache_timeout ,
614+ sixlowpan_fragments_cache_timeout : self . sixlowpan_reassembly_buffer_timeout ,
615615
616616 #[ cfg( not( any(
617617 feature = "proto-ipv4-fragmentation" ,
@@ -3817,8 +3817,8 @@ mod test {
38173817
38183818 #[ cfg( feature = "proto-ipv4-fragmentation" ) ]
38193819 let iface_builder = iface_builder
3820- . ipv4_fragments_cache ( PacketAssemblerSet :: new ( vec ! [ ] , BTreeMap :: new ( ) ) )
3821- . ipv4_out_packet_cache ( vec ! [ ] ) ;
3820+ . ipv4_reassembly_buffer ( PacketAssemblerSet :: new ( vec ! [ ] , BTreeMap :: new ( ) ) )
3821+ . ipv4_fragmentation_buffer ( vec ! [ ] ) ;
38223822
38233823 #[ cfg( feature = "proto-igmp" ) ]
38243824 let iface_builder = iface_builder. ipv4_multicast_groups ( BTreeMap :: new ( ) ) ;
@@ -3847,13 +3847,13 @@ mod test {
38473847
38483848 #[ cfg( feature = "proto-sixlowpan-fragmentation" ) ]
38493849 let iface_builder = iface_builder
3850- . sixlowpan_fragments_cache ( PacketAssemblerSet :: new ( vec ! [ ] , BTreeMap :: new ( ) ) )
3851- . sixlowpan_out_packet_cache ( vec ! [ ] ) ;
3850+ . sixlowpan_reassembly_buffer ( PacketAssemblerSet :: new ( vec ! [ ] , BTreeMap :: new ( ) ) )
3851+ . sixlowpan_fragmentation_buffer ( vec ! [ ] ) ;
38523852
38533853 #[ cfg( feature = "proto-ipv4-fragmentation" ) ]
38543854 let iface_builder = iface_builder
3855- . ipv4_fragments_cache ( PacketAssemblerSet :: new ( vec ! [ ] , BTreeMap :: new ( ) ) )
3856- . ipv4_out_packet_cache ( vec ! [ ] ) ;
3855+ . ipv4_reassembly_buffer ( PacketAssemblerSet :: new ( vec ! [ ] , BTreeMap :: new ( ) ) )
3856+ . ipv4_fragmentation_buffer ( vec ! [ ] ) ;
38573857
38583858 #[ cfg( feature = "proto-igmp" ) ]
38593859 let iface_builder = iface_builder. ipv4_multicast_groups ( BTreeMap :: new ( ) ) ;
0 commit comments