diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-05-02 16:15:05 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-05-02 16:19:34 +0200 |
| commit | a5f5c3a844561d56c91513f36a1077038d8a0336 (patch) | |
| tree | 017ea0d73195fb0665a27ff97e6da5902e44c25b /examples | |
| parent | e74af83681bc65524acda4ec0a2b52e447c62daf (diff) | |
net: add functions to get current Eth and IP config
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/nrf/src/bin/usb_ethernet.rs | 2 | ||||
| -rw-r--r-- | examples/std/src/tuntap.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/nrf/src/bin/usb_ethernet.rs b/examples/nrf/src/bin/usb_ethernet.rs index 70460d23c..f14a29c49 100644 --- a/examples/nrf/src/bin/usb_ethernet.rs +++ b/examples/nrf/src/bin/usb_ethernet.rs | |||
| @@ -265,7 +265,7 @@ impl embassy_net::Device for Device { | |||
| 265 | RX_CHANNEL.try_recv().ok() | 265 | RX_CHANNEL.try_recv().ok() |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | fn ethernet_address(&mut self) -> [u8; 6] { | 268 | fn ethernet_address(&self) -> [u8; 6] { |
| 269 | self.mac_addr | 269 | self.mac_addr |
| 270 | } | 270 | } |
| 271 | } | 271 | } |
diff --git a/examples/std/src/tuntap.rs b/examples/std/src/tuntap.rs index 328479e68..09a4be070 100644 --- a/examples/std/src/tuntap.rs +++ b/examples/std/src/tuntap.rs | |||
| @@ -219,7 +219,7 @@ impl Device for TunTapDevice { | |||
| 219 | LinkState::Up | 219 | LinkState::Up |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | fn ethernet_address(&mut self) -> [u8; 6] { | 222 | fn ethernet_address(&self) -> [u8; 6] { |
| 223 | [0x02, 0x03, 0x04, 0x05, 0x06, 0x07] | 223 | [0x02, 0x03, 0x04, 0x05, 0x06, 0x07] |
| 224 | } | 224 | } |
| 225 | } | 225 | } |
