Skip to content

Commit 58365f7

Browse files
committed
uefi: re-export EfiMacAddr
Otherwise, some users have to also pull in uefi-raw in a matching version as dependency. We however want to prevent a mix use in public API. See [0] for context. [0] https://rust-osdev.zulipchat.com/#narrow/channel/426438-uefi-rs/topic/Re-export.20.60uefi-raw.60.20from.20.60uefi.60.3F/near/545022347
1 parent 166227e commit 58365f7

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

uefi-test-runner/src/proto/network/snp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ use smoltcp::wire::{
66
ETHERNET_HEADER_LEN, EthernetFrame, IPV4_HEADER_LEN, Ipv4Packet, UDP_HEADER_LEN, UdpPacket,
77
};
88
use uefi::boot::ScopedProtocol;
9+
use uefi::proto::network::EfiMacAddr;
910
use uefi::proto::network::snp::{InterruptStatus, ReceiveFlags, SimpleNetwork};
1011
use uefi::{Status, boot};
11-
use uefi_raw::MacAddress as EfiMacAddr;
1212
use uefi_raw::protocol::network::snp::NetworkState;
1313

1414
/// The MAC address configured for the interface.

uefi/src/proto/network/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
//! - [`Ipv6Addr`]
1111
//!
1212
//! The only exception is [`uefi_raw::MacAddress`] which doesn't have a
13-
//! corresponding type in the standard library.
13+
//! corresponding type in the standard library. It is re-exported as
14+
//! [`EfiMacAddr`].
1415
//!
1516
//! [`IpAddr`]: core::net::IpAddr
1617
//! [`Ipv4Addr`]: core::net::Ipv4Addr
@@ -20,3 +21,5 @@ pub mod http;
2021
pub mod ip4config2;
2122
pub mod pxe;
2223
pub mod snp;
24+
25+
pub use uefi_raw::MacAddress as EfiMacAddr;

uefi/src/proto/network/pxe.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ use core::net::{IpAddr, Ipv4Addr};
1414
use core::ptr::{self, null, null_mut};
1515
use core::slice;
1616
use ptr_meta::Pointee;
17+
use uefi::proto::network::EfiMacAddr;
1718
use uefi_raw::protocol::network::pxe::{
1819
PxeBaseCodeDiscoverInfo, PxeBaseCodeIpFilter, PxeBaseCodeMode, PxeBaseCodeMtftpInfo,
1920
PxeBaseCodePacket, PxeBaseCodeProtocol, PxeBaseCodeTftpOpcode,
2021
};
21-
use uefi_raw::{Boolean, Char8, IpAddress as EfiIpAddr, MacAddress as EfiMacAddr};
22+
use uefi_raw::{Boolean, Char8, IpAddress as EfiIpAddr};
2223

2324
pub use uefi_raw::protocol::network::pxe::{
2425
PxeBaseCodeBootType as BootstrapType, PxeBaseCodeIpFilterFlags as IpFilters,

0 commit comments

Comments
 (0)