Skip to main content

embedded_ipv4

Function embedded_ipv4 

pub fn embedded_ipv4(addr: Ipv6Addr) -> Option<EmbeddedIpv4>
Available on crate feature net only.
Expand description

The IPv4 addresses addr embeds in a well-known form: the NAT64 well-known prefix 64:ff9b::/96 (TranslationPrefix::WELL_KNOWN), IPv4-compatible ::/96 (other than :: and ::1), 6to4 2002::/16 or the Teredo prefix 2001::/32.

IPv4-mapped addresses are not included: they are IPv4 already (IntoCanonicalIpAddr). Translation prefixes a network operator chose, such as the local-use 64:ff9b:1::/48, are a TranslationPrefix.