[netstack3] Drop non-sync ctx arg from DAD ctx getters

...as they are not needed

Change-Id: I8a618af38bbdaa98d4ed5a26c9ae6fe93d2da414
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/693913
Fuchsia-Auto-Submit: Ghanan Gowripalan <ghanan@google.com>
Reviewed-by: Alex Konradi <akonradi@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
Commit-Queue: Ghanan Gowripalan <ghanan@google.com>
Reviewed-by: Jeff Martin <martinjeffrey@google.com>
diff --git a/src/connectivity/network/netstack3/core/src/ip/device/dad.rs b/src/connectivity/network/netstack3/core/src/ip/device/dad.rs
index 938a180..f0c1498 100644
--- a/src/connectivity/network/netstack3/core/src/ip/device/dad.rs
+++ b/src/connectivity/network/netstack3/core/src/ip/device/dad.rs
@@ -29,13 +29,12 @@
     /// Returns the address's state mutably, if it exists on the interface.
     fn get_address_state_mut(
         &mut self,
-        ctx: &mut C,
         device_id: Self::DeviceId,
         addr: UnicastAddr<Ipv6Addr>,
     ) -> Option<&mut AddressState>;
 
     /// Returns the NDP retransmission timer configured on the device.
-    fn retrans_timer(&self, ctx: &mut C, device_id: Self::DeviceId) -> Duration;
+    fn retrans_timer(&self, device_id: Self::DeviceId) -> Duration;
 }
 
 /// The IP layer context provided to DAD.
@@ -129,7 +128,7 @@
         addr: UnicastAddr<Ipv6Addr>,
     ) {
         let state = self
-            .get_address_state_mut(ctx, device_id, addr)
+            .get_address_state_mut(device_id, addr)
             .unwrap_or_else(|| panic!("expected address to exist; addr={}", addr));
 
         let remaining = match state {
@@ -159,7 +158,7 @@
                 //      time a node waits after sending the last Neighbor
                 //      Solicitation before ending the Duplicate Address Detection
                 //      process.
-                let retrans_timer = self.retrans_timer(ctx, device_id);
+                let retrans_timer = self.retrans_timer(device_id);
 
                 let dst_ip = addr.to_solicited_node_address();
 
@@ -242,7 +241,6 @@
     impl Ipv6DeviceDadContext<MockNonSyncCtx> for MockCtx {
         fn get_address_state_mut(
             &mut self,
-            _ctx: &mut MockNonSyncCtx,
             DummyDeviceId: DummyDeviceId,
             request_addr: UnicastAddr<Ipv6Addr>,
         ) -> Option<&mut AddressState> {
@@ -250,11 +248,7 @@
             (*addr == request_addr).then(|| state)
         }
 
-        fn retrans_timer(
-            &self,
-            _ctx: &mut MockNonSyncCtx,
-            DummyDeviceId: DummyDeviceId,
-        ) -> Duration {
+        fn retrans_timer(&self, DummyDeviceId: DummyDeviceId) -> Duration {
             let MockDadContext { addr: _, state: _, retrans_timer } = self.get_ref();
             *retrans_timer
         }
diff --git a/src/connectivity/network/netstack3/core/src/ip/device/integration.rs b/src/connectivity/network/netstack3/core/src/ip/device/integration.rs
index b53cc9f..fb790de 100644
--- a/src/connectivity/network/netstack3/core/src/ip/device/integration.rs
+++ b/src/connectivity/network/netstack3/core/src/ip/device/integration.rs
@@ -272,7 +272,6 @@
 {
     fn get_address_state_mut(
         &mut self,
-        _ctx: &mut C,
         device_id: SC::DeviceId,
         addr: UnicastAddr<Ipv6Addr>,
     ) -> Option<&mut AddressState> {
@@ -282,7 +281,7 @@
             .map(|Ipv6AddressEntry { addr_sub: _, state, config: _, deprecated: _ }| state)
     }
 
-    fn retrans_timer(&self, _ctx: &mut C, device_id: SC::DeviceId) -> Duration {
+    fn retrans_timer(&self, device_id: SC::DeviceId) -> Duration {
         SC::get_ip_device_state(self, device_id).retrans_timer.get()
     }
 }