pub enum Ipv6 {}
Expand description
IPv6.
Ipv6
implements Ip
for IPv6.
Note that this type has no value constructor. It is used purely at the type
level. Attempting to construct it by calling Default::default
will panic.
Implementations§
Source§impl Ipv6
impl Ipv6
Sourcepub const LOOPBACK_IPV6_ADDRESS: UnicastAddr<Ipv6Addr> = _
pub const LOOPBACK_IPV6_ADDRESS: UnicastAddr<Ipv6Addr> = _
The loopback address represented as a UnicastAddr
.
This is equivalent to LOOPBACK_ADDRESS
, except that it is a
UnicastAddr
witness type.
Sourcepub const ALL_NODES_LINK_LOCAL_MULTICAST_ADDRESS: MulticastAddr<Ipv6Addr> = _
pub const ALL_NODES_LINK_LOCAL_MULTICAST_ADDRESS: MulticastAddr<Ipv6Addr> = _
The IPv6 All Nodes multicast address in link-local scope, defined in RFC 4291 Section 2.7.1.
Sourcepub const ALL_ROUTERS_LINK_LOCAL_MULTICAST_ADDRESS: MulticastAddr<Ipv6Addr> = _
pub const ALL_ROUTERS_LINK_LOCAL_MULTICAST_ADDRESS: MulticastAddr<Ipv6Addr> = _
The IPv6 All Routers multicast address in link-local scope, defined in RFC 4291 Section 2.7.1.
Sourcepub const SITE_LOCAL_UNICAST_SUBNET: Subnet<Ipv6Addr> = _
pub const SITE_LOCAL_UNICAST_SUBNET: Subnet<Ipv6Addr> = _
The (deprecated) subnet of site-local unicast addresses, defined in RFC 3513 Section 2.5.6.
The site-local unicast subnet was deprecated in RFC 3879:
The special behavior of this prefix MUST no longer be supported in new implementations. The prefix MUST NOT be reassigned for other use except by a future IETF standards action… However, router implementations SHOULD be configured to prevent routing of this prefix by default.
Sourcepub const UNICAST_INTERFACE_IDENTIFIER_BITS: u8 = 64u8
pub const UNICAST_INTERFACE_IDENTIFIER_BITS: u8 = 64u8
The length, in bits, of the interface identifier portion of unicast IPv6 addresses except for addresses which start with the binary value 000.
According to RFC 4291 Section 2.5.1, “[f]or all unicast addresses, except those that start with the binary value 000, Interface IDs are required to be 64 bits.”
Note that, per RFC 4862 Section 5.5.3:
a future revision of the address architecture [RFC4291] and a future link-type-specific document, which will still be consistent with each other, could potentially allow for an interface identifier of length other than the value defined in the current documents. Thus, an implementation should not assume a particular constant. Rather, it should expect any lengths of interface identifiers.
In other words, this constant may be used to generate addresses or subnet prefix lengths, but should not be used to validate addresses or subnet prefix lengths generated by other software or other machines, as it might be valid for other software or other machines to use an interface identifier length different from this one.
Sourcepub const FLOW_LABEL_BITS: u8 = 20u8
pub const FLOW_LABEL_BITS: u8 = 20u8
The length, in bits, of an IPv6 flow label, defined in RFC 6437 Section 2.
Trait Implementations§
Source§impl Ip for Ipv6
impl Ip for Ipv6
Source§const UNSPECIFIED_ADDRESS: Ipv6Addr = _
const UNSPECIFIED_ADDRESS: Ipv6Addr = _
The unspecified IPv6 address, defined in RFC 4291 Section 2.5.2.
Per RFC 4291:
The address 0:0:0:0:0:0:0:0 is called the unspecified address. It must never be assigned to any node. It indicates the absence of an address. One example of its use is in the Source Address field of any IPv6 packets sent by an initializing host before it has learned its own address.
The unspecified address must not be used as the destination address of IPv6 packets or in IPv6 Routing headers. An IPv6 packet with a source address of unspecified must never be forwarded by an IPv6 router.
Source§const LOOPBACK_ADDRESS: SpecifiedAddr<Ipv6Addr> = _
const LOOPBACK_ADDRESS: SpecifiedAddr<Ipv6Addr> = _
The loopback IPv6 address, defined in RFC 4291 Section 2.5.3.
Per RFC 4291:
The unicast address 0:0:0:0:0:0:0:1 is called the loopback address. It may be used by a node to send an IPv6 packet to itself. It must not be assigned to any physical interface. It is treated as having Link-Local scope, and may be thought of as the Link-Local unicast address of a virtual interface (typically called the “loopback interface”) to an imaginary link that goes nowhere.
The loopback address must not be used as the source address in IPv6 packets that are sent outside of a single node. An IPv6 packet with a destination address of loopback must never be sent outside of a single node and must never be forwarded by an IPv6 router. A packet received on an interface with a destination address of loopback must be dropped.
Source§const LOOPBACK_SUBNET: Subnet<Ipv6Addr> = _
const LOOPBACK_SUBNET: Subnet<Ipv6Addr> = _
The subnet of loopback IPv6 addresses, defined in RFC 4291 Section 2.4.
Note that the IPv6 loopback subnet is a /128, meaning that it contains
only one address - the LOOPBACK_ADDRESS
.
Source§const MULTICAST_SUBNET: Subnet<Ipv6Addr> = _
const MULTICAST_SUBNET: Subnet<Ipv6Addr> = _
The subnet of multicast IPv6 addresses, defined in RFC 4291 Section 2.7.
Source§const LINK_LOCAL_UNICAST_SUBNET: Subnet<Ipv6Addr> = _
const LINK_LOCAL_UNICAST_SUBNET: Subnet<Ipv6Addr> = _
The subnet of link-local unicast addresses, defined in RFC 4291 Section 2.4.
Note that multicast addresses can also be link-local. However, there is no single subnet of link-local multicast addresses. For more details on link-local multicast addresses, see RFC 4291 Section 2.7.
Source§const MINIMUM_LINK_MTU: Mtu = _
const MINIMUM_LINK_MTU: Mtu = _
The IPv6 minimum link MTU, defined in RFC 8200 Section 5.
Per RFC 8200:
IPv6 requires that every link in the Internet have an MTU of 1280 octets or greater. This is known as the IPv6 minimum link MTU. On any link that cannot convey a 1280-octet packet in one piece, link- specific fragmentation and reassembly must be provided at a layer below IPv6.
Source§const VERSION_MARKER: IpVersionMarker<Self> = _
const VERSION_MARKER: IpVersionMarker<Self> = _
Source§fn map_ip<In: GenericOverIp<Self, Type = In> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>, Out: GenericOverIp<Self, Type = Out> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>>(
input: In,
_v4: impl FnOnce(<In as GenericOverIp<Ipv4>>::Type) -> <Out as GenericOverIp<Ipv4>>::Type,
v6: impl FnOnce(<In as GenericOverIp<Ipv6>>::Type) -> <Out as GenericOverIp<Ipv6>>::Type,
) -> Out
fn map_ip<In: GenericOverIp<Self, Type = In> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>, Out: GenericOverIp<Self, Type = Out> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>>( input: In, _v4: impl FnOnce(<In as GenericOverIp<Ipv4>>::Type) -> <Out as GenericOverIp<Ipv4>>::Type, v6: impl FnOnce(<In as GenericOverIp<Ipv6>>::Type) -> <Out as GenericOverIp<Ipv6>>::Type, ) -> Out
Source§fn map_ip_in<In: GenericOverIp<Self, Type = In> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>, Out>(
input: In,
v4: impl FnOnce(<In as GenericOverIp<Ipv4>>::Type) -> Out,
v6: impl FnOnce(<In as GenericOverIp<Ipv6>>::Type) -> Out,
) -> Out
fn map_ip_in<In: GenericOverIp<Self, Type = In> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>, Out>( input: In, v4: impl FnOnce(<In as GenericOverIp<Ipv4>>::Type) -> Out, v6: impl FnOnce(<In as GenericOverIp<Ipv6>>::Type) -> Out, ) -> Out
Source§fn map_ip_out<In, Out: GenericOverIp<Self, Type = Out> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>>(
input: In,
v4: impl FnOnce(In) -> <Out as GenericOverIp<Ipv4>>::Type,
v6: impl FnOnce(In) -> <Out as GenericOverIp<Ipv6>>::Type,
) -> Out
fn map_ip_out<In, Out: GenericOverIp<Self, Type = Out> + GenericOverIp<Ipv4> + GenericOverIp<Ipv6>>( input: In, v4: impl FnOnce(In) -> <Out as GenericOverIp<Ipv4>>::Type, v6: impl FnOnce(In) -> <Out as GenericOverIp<Ipv6>>::Type, ) -> Out
Source§impl Ord for Ipv6
impl Ord for Ipv6
Source§impl PartialOrd for Ipv6
impl PartialOrd for Ipv6
impl Copy for Ipv6
impl Eq for Ipv6
impl StructuralPartialEq for Ipv6
Auto Trait Implementations§
impl Freeze for Ipv6
impl RefUnwindSafe for Ipv6
impl Send for Ipv6
impl Sync for Ipv6
impl Unpin for Ipv6
impl UnwindSafe for Ipv6
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)