Browse Source

iface: rename sixlowpan_fragments_cache_timeout -> sixlowpan_reassembly_timeout

Dario Nieuwenhuis 2 years ago
parent
commit
f428a50e7f
2 changed files with 5 additions and 5 deletions
  1. 4 4
      src/iface/interface/mod.rs
  2. 1 1
      src/iface/interface/sixlowpan.rs

+ 4 - 4
src/iface/interface/mod.rs

@@ -51,7 +51,7 @@ pub(crate) struct FragmentsBuffer {
     #[cfg(feature = "proto-sixlowpan-fragmentation")]
     sixlowpan_fragments: PacketAssemblerSet<SixlowpanFragKey>,
     #[cfg(feature = "proto-sixlowpan-fragmentation")]
-    sixlowpan_fragments_cache_timeout: Duration,
+    sixlowpan_reassembly_timeout: Duration,
 }
 
 pub(crate) struct OutPackets {
@@ -563,7 +563,7 @@ impl Interface {
                 #[cfg(feature = "proto-sixlowpan-fragmentation")]
                 sixlowpan_fragments: PacketAssemblerSet::new(),
                 #[cfg(feature = "proto-sixlowpan-fragmentation")]
-                sixlowpan_fragments_cache_timeout: Duration::from_secs(60),
+                sixlowpan_reassembly_timeout: Duration::from_secs(60),
             },
             out_packets: OutPackets {
                 #[cfg(feature = "proto-ipv4-fragmentation")]
@@ -736,7 +736,7 @@ impl Interface {
     /// Currently used only for 6LoWPAN, will be used for IPv4 in the future as well.
     #[cfg(feature = "proto-sixlowpan-fragmentation")]
     pub fn reassembly_timeout(&self) -> Duration {
-        self.fragments.sixlowpan_fragments_cache_timeout
+        self.fragments.sixlowpan_reassembly_timeout
     }
 
     /// Set the packet reassembly timeout.
@@ -747,7 +747,7 @@ impl Interface {
         if timeout > Duration::from_secs(60) {
             net_debug!("RFC 4944 specifies that the reassembly timeout MUST be set to a maximum of 60 seconds");
         }
-        self.fragments.sixlowpan_fragments_cache_timeout = timeout;
+        self.fragments.sixlowpan_reassembly_timeout = timeout;
     }
 
     /// Transmit packets queued in the given sockets, and receive packets queued

+ 1 - 1
src/iface/interface/sixlowpan.rs

@@ -117,7 +117,7 @@ impl InterfaceInner {
         // (other than the first one) are added.
         let frag_slot = match f
             .sixlowpan_fragments
-            .get(&key, self.now + f.sixlowpan_fragments_cache_timeout)
+            .get(&key, self.now + f.sixlowpan_reassembly_timeout)
         {
             Ok(frag) => frag,
             Err(AssemblerFullError) => {