pub enum EvpnRouteKey {
EadPerEs {
rd: RouteDistinguisher,
esi: EthernetSegmentIdentifier,
ethernet_tag: EthernetTagId,
},
EadPerEvi {
rd: RouteDistinguisher,
esi: EthernetSegmentIdentifier,
ethernet_tag: EthernetTagId,
},
MacIp {
rd: RouteDistinguisher,
ethernet_tag: EthernetTagId,
mac: MacAddress,
ip: Option<IpAddr>,
},
Imet {
rd: RouteDistinguisher,
ethernet_tag: EthernetTagId,
originator_ip: IpAddr,
},
Es {
rd: RouteDistinguisher,
esi: EthernetSegmentIdentifier,
originator_ip: IpAddr,
},
IpPrefix {
rd: RouteDistinguisher,
ethernet_tag: EthernetTagId,
prefix: EvpnIpPrefixValue,
},
}Expand description
Identifying subset of an EVPN route — the fields that make two routes
distinct per RFC 7432. Suitable as a HashMap key in the RIB.
EAD per-ES and EAD per-EVI share a wire format but get distinct variants here so the RIB never accidentally collapses them.
Variants§
EadPerEs
Type 1 per-ES key.
Fields
rd: RouteDistinguisherRoute Distinguisher.
esi: EthernetSegmentIdentifierEthernet Segment Identifier.
ethernet_tag: EthernetTagIdEthernet Tag (MAX_ET for per-ES).
EadPerEvi
Type 1 per-EVI key.
Fields
rd: RouteDistinguisherRoute Distinguisher.
esi: EthernetSegmentIdentifierEthernet Segment Identifier.
ethernet_tag: EthernetTagIdEthernet Tag identifying the EVI.
MacIp
Type 2 key — RD, tag, MAC, optional IP.
Fields
rd: RouteDistinguisherRoute Distinguisher.
ethernet_tag: EthernetTagIdEthernet Tag identifying the EVI.
mac: MacAddressMAC address.
Imet
Type 3 key.
Fields
rd: RouteDistinguisherRoute Distinguisher.
ethernet_tag: EthernetTagIdEthernet Tag identifying the EVI.
Es
Type 4 key.
Fields
rd: RouteDistinguisherRoute Distinguisher.
esi: EthernetSegmentIdentifierEthernet Segment Identifier.
IpPrefix
Type 5 key.
Fields
rd: RouteDistinguisherRoute Distinguisher.
ethernet_tag: EthernetTagIdEthernet Tag.
prefix: EvpnIpPrefixValueIP prefix.
Implementations§
Source§impl EvpnRouteKey
impl EvpnRouteKey
Sourcepub const fn route_type(&self) -> u8
pub const fn route_type(&self) -> u8
Wire route-type byte (1..=5).
Trait Implementations§
Source§impl Clone for EvpnRouteKey
impl Clone for EvpnRouteKey
Source§fn clone(&self) -> EvpnRouteKey
fn clone(&self) -> EvpnRouteKey
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EvpnRouteKey
Source§impl Debug for EvpnRouteKey
impl Debug for EvpnRouteKey
impl Eq for EvpnRouteKey
Source§impl Hash for EvpnRouteKey
impl Hash for EvpnRouteKey
Source§impl PartialEq for EvpnRouteKey
impl PartialEq for EvpnRouteKey
Source§fn eq(&self, other: &EvpnRouteKey) -> bool
fn eq(&self, other: &EvpnRouteKey) -> bool
self and other values to be equal, and is used by ==.