pub struct MacIpAdvertisement {
pub esi: [u8; 10],
pub ethernet_tag_id: u32,
pub mac: [u8; 6],
pub ip: Option<IpAddr>,
pub raw_label: u32,
pub raw_label2: Option<u32>,
}Expand description
MAC/IP Advertisement route body - RFC 7432 §7.2.
Fields§
§esi: [u8; 10]Ethernet Segment Identifier (10 octets); all zero for a single-homed host - RFC 7432 §5.
ethernet_tag_id: u32Ethernet Tag ID (4 octets).
mac: [u8; 6]MAC address (6 octets); the route type fixes the length at 48 bits.
ip: Option<IpAddr>IP address when the advertisement carries one; None when the IP
address length is zero, which is a MAC-only advertisement.
raw_label: u32Label1 as it appears on the wire: a 24-bit field. For VXLAN this is
the VNI, with no MPLS label semantics - RFC 8365 §5; an MPLS-signalled
fabric puts a label plus its TC/S/TTL bits here instead, see
MacIpAdvertisement::mpls_label.
raw_label2: Option<u32>Optional Label2, same encoding as Self::raw_label, present when the
route is used for IP-VRF forwarding - RFC 7432 §7.2.
Implementations§
Source§impl MacIpAdvertisement
impl MacIpAdvertisement
Sourcepub fn mpls_label(&self) -> MplsLabel
pub fn mpls_label(&self) -> MplsLabel
Interpret Label1 as an MPLS label: the high 20 bits are the label value and the low 4 bits carry TC, S and TTL - RFC 7432 §7.2.
A VXLAN fabric does not use MPLS label semantics; there the whole 24-bit field is the VNI and this value is meaningless.
Trait Implementations§
Source§impl Clone for MacIpAdvertisement
impl Clone for MacIpAdvertisement
Source§impl Debug for MacIpAdvertisement
impl Debug for MacIpAdvertisement
impl Eq for MacIpAdvertisement
Source§impl PartialEq for MacIpAdvertisement
impl PartialEq for MacIpAdvertisement
impl StructuralPartialEq for MacIpAdvertisement
Auto Trait Implementations§
impl Forget for MacIpAdvertisement
impl Freeze for MacIpAdvertisement
impl RefUnwindSafe for MacIpAdvertisement
impl Send for MacIpAdvertisement
impl Sync for MacIpAdvertisement
impl Unpin for MacIpAdvertisement
impl UnsafeUnpin for MacIpAdvertisement
impl UnwindSafe for MacIpAdvertisement
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more