Skip to content

Commit bc91632

Browse files
committed
uefi-raw
1 parent 417ec7c commit bc91632

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

uefi-raw/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,20 @@ impl From<IpAddr> for IpAddress {
194194
}
195195
}
196196

197+
impl From<[u8; 16]> for IpAddress {
198+
fn from(value: [u8; 16]) -> Self {
199+
Self {
200+
v6: Ipv6Addr::from(value),
201+
}
202+
}
203+
}
204+
205+
impl From<IpAddress> for [u8; 16] {
206+
fn from(value: IpAddress) -> Self {
207+
value.octets()
208+
}
209+
}
210+
197211
/// UEFI Media Access Control (MAC) address.
198212
///
199213
/// UEFI supports multiple network protocols and hardware types, not just

0 commit comments

Comments
 (0)