Skip to content

Commit da896c6

Browse files
committed
raw
1 parent 5922d3d commit da896c6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

uefi-raw/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ impl IpAddress {
144144
v6: Ipv6Addr::from(ip_addr),
145145
}
146146
}
147+
148+
/// Returns the octets of the union. Without additional context, it is not
149+
/// clear whether the octets represent an IPv4 or IPv6 address.
150+
pub const fn octets(&self) -> [u8; 16] {
151+
unsafe { self.v6.octets() }
152+
}
147153
}
148154

149155
impl Debug for IpAddress {

0 commit comments

Comments
 (0)