diff options
| author | Ruben De Smet <[email protected]> | 2023-07-28 16:19:24 +0200 |
|---|---|---|
| committer | Ruben De Smet <[email protected]> | 2023-07-28 16:40:15 +0200 |
| commit | 69c0a89aa5d52e048fdd8ddc5d47b767da07e88b (patch) | |
| tree | e8eb364418ae00d46f2b4163b6c0bd8fff6306fc /examples/std/src/tuntap.rs | |
| parent | c3ba08ffb6570589726db44d40ba5b724a8950d4 (diff) | |
Use HardwareAddress in Driver
Diffstat (limited to 'examples/std/src/tuntap.rs')
| -rw-r--r-- | examples/std/src/tuntap.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/std/src/tuntap.rs b/examples/std/src/tuntap.rs index d918a2e62..932bdaf96 100644 --- a/examples/std/src/tuntap.rs +++ b/examples/std/src/tuntap.rs | |||
| @@ -4,6 +4,7 @@ use std::os::unix::io::{AsRawFd, RawFd}; | |||
| 4 | use std::task::Context; | 4 | use std::task::Context; |
| 5 | 5 | ||
| 6 | use async_io::Async; | 6 | use async_io::Async; |
| 7 | use embassy_net::HardwareAddress; | ||
| 7 | use embassy_net_driver::{self, Capabilities, Driver, LinkState}; | 8 | use embassy_net_driver::{self, Capabilities, Driver, LinkState}; |
| 8 | use log::*; | 9 | use log::*; |
| 9 | 10 | ||
| @@ -180,8 +181,8 @@ impl Driver for TunTapDevice { | |||
| 180 | LinkState::Up | 181 | LinkState::Up |
| 181 | } | 182 | } |
| 182 | 183 | ||
| 183 | fn ethernet_address(&self) -> [u8; 6] { | 184 | fn hardware_address(&self) -> HardwareAddress { |
| 184 | [0x02, 0x03, 0x04, 0x05, 0x06, 0x07] | 185 | HardwareAddress::Ethernet(EthernetAddress([0x02, 0x03, 0x04, 0x05, 0x06, 0x07])) |
| 185 | } | 186 | } |
| 186 | } | 187 | } |
| 187 | 188 | ||
