pub enum Ipv6Scope {
InterfaceLocal,
LinkLocal,
AdminLocal,
SiteLocal,
OrganizationLocal,
Global,
Reserved(Ipv6ReservedScope),
Unassigned(Ipv6UnassignedScope),
}
Expand description
The list of IPv6 scopes.
These scopes are defined by RFC 4291 Section 2.7.
Variants§
InterfaceLocal
The interface-local scope.
LinkLocal
The link-local scope.
AdminLocal
The admin-local scope.
SiteLocal
The (deprecated) site-local scope.
The site-local scope was deprecated in RFC 3879. While this scope is returned for both site-local unicast and site-local multicast addresses, RFC 3879 says the following about site-local unicast addresses in particular (“this prefix” refers to the site-local unicast subnet):
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.
OrganizationLocal
The organization-local scope.
Global
The global scope.
Reserved(Ipv6ReservedScope)
Scopes which are reserved for future use by RFC 4291 Section 2.7.
Unassigned(Ipv6UnassignedScope)
Scopes which are available for local definition by administrators.
Implementations§
Source§impl Ipv6Scope
impl Ipv6Scope
Sourcepub const MULTICAST_SCOPE_ID_INTERFACE_LOCAL: u8 = 1u8
pub const MULTICAST_SCOPE_ID_INTERFACE_LOCAL: u8 = 1u8
The multicast scope ID of an interface-local address, defined in RFC 4291 Section 2.7.
Sourcepub const MULTICAST_SCOPE_ID_LINK_LOCAL: u8 = 2u8
pub const MULTICAST_SCOPE_ID_LINK_LOCAL: u8 = 2u8
The multicast scope ID of a link-local address, defined in RFC 4291 Section 2.7.
Sourcepub const MULTICAST_SCOPE_ID_ADMIN_LOCAL: u8 = 4u8
pub const MULTICAST_SCOPE_ID_ADMIN_LOCAL: u8 = 4u8
The multicast scope ID of an admin-local address, defined in RFC 4291 Section 2.7.
Sourcepub const MULTICAST_SCOPE_ID_SITE_LOCAL: u8 = 5u8
pub const MULTICAST_SCOPE_ID_SITE_LOCAL: u8 = 5u8
The multicast scope ID of a (deprecated) site-local address, defined in RFC 4291 Section 2.7.
Note that site-local addresses are deprecated.
Sourcepub const MULTICAST_SCOPE_ID_ORG_LOCAL: u8 = 8u8
pub const MULTICAST_SCOPE_ID_ORG_LOCAL: u8 = 8u8
The multicast scope ID of an organization-local address, defined in RFC 4291 Section 2.7.
Sourcepub const MULTICAST_SCOPE_ID_GLOBAL: u8 = 14u8
pub const MULTICAST_SCOPE_ID_GLOBAL: u8 = 14u8
The multicast scope ID of global address, defined in RFC 4291 Section 2.7.
Sourcepub fn multicast_scope_id(&self) -> u8
pub fn multicast_scope_id(&self) -> u8
The ID used to indicate this scope in a multicast IPv6 address.
Per RFC 4291 Section 2.7, the bits of a multicast IPv6 address are laid out as follows:
| 8 | 4 | 4 | 112 bits |
+------ -+----+----+---------------------------------------------+
|11111111|flgs|scop| group ID |
+--------+----+----+---------------------------------------------+
The 4-bit scop field encodes the scope of the address.
multicast_scope_id
returns the numerical value used to encode this
scope in the scop field of a multicast address.
Trait Implementations§
Source§impl Scope for Ipv6Scope
impl Scope for Ipv6Scope
Source§fn can_have_zone(&self) -> bool
fn can_have_zone(&self) -> bool
impl Copy for Ipv6Scope
impl Eq for Ipv6Scope
impl StructuralPartialEq for Ipv6Scope
Auto Trait Implementations§
impl Freeze for Ipv6Scope
impl RefUnwindSafe for Ipv6Scope
impl Send for Ipv6Scope
impl Sync for Ipv6Scope
impl Unpin for Ipv6Scope
impl UnwindSafe for Ipv6Scope
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
)