pub enum PathAttribute {
Show 15 variants
Origin(Origin),
AsPath(AsPath),
NextHop(Ipv4Addr),
LocalPref(u32),
Med(u32),
Communities(Vec<u32>),
ExtendedCommunities(Vec<ExtendedCommunity>),
LargeCommunities(Vec<LargeCommunity>),
OriginatorId(Ipv4Addr),
ClusterList(Vec<Ipv4Addr>),
MpReachNlri(MpReachNlri),
MpUnreachNlri(MpUnreachNlri),
PmsiTunnel(PmsiTunnel),
OnlyToCustomer(u32),
Unknown(RawAttribute),
}Expand description
A known path attribute or raw preserved bytes.
Known attributes are decoded into typed variants. Unknown attributes
are preserved as RawAttribute for pass-through with the Partial bit.
Variants§
Origin(Origin)
ORIGIN attribute (type 1).
AsPath(AsPath)
AS_PATH attribute (type 2).
NextHop(Ipv4Addr)
NEXT_HOP attribute (type 3).
LocalPref(u32)
LOCAL_PREF attribute (type 5).
Med(u32)
MULTI_EXIT_DISC attribute (type 4).
Communities(Vec<u32>)
RFC 1997 COMMUNITIES — each u32 is high16=ASN, low16=value.
ExtendedCommunities(Vec<ExtendedCommunity>)
RFC 4360 EXTENDED COMMUNITIES.
LargeCommunities(Vec<LargeCommunity>)
RFC 8092 LARGE COMMUNITIES.
OriginatorId(Ipv4Addr)
RFC 4456 ORIGINATOR_ID — original router-id of the route.
ClusterList(Vec<Ipv4Addr>)
RFC 4456 CLUSTER_LIST — list of cluster-ids traversed.
MpReachNlri(MpReachNlri)
RFC 4760 MP_REACH_NLRI.
MpUnreachNlri(MpUnreachNlri)
RFC 4760 MP_UNREACH_NLRI.
PmsiTunnel(PmsiTunnel)
RFC 6514 §5 PMSI Tunnel — used by EVPN Type 3 IMET for
ingress-replication BUM forwarding.
OnlyToCustomer(u32)
RFC 9234 §5 Only-to-Customer (type 35) — carries the 32-bit ASN
that initially set OTC on the route. Optional + Transitive (0xC0).
Unknown(RawAttribute)
Unknown or unrecognized attribute, preserved for re-advertisement.
Implementations§
Trait Implementations§
Source§impl Clone for PathAttribute
impl Clone for PathAttribute
Source§fn clone(&self) -> PathAttribute
fn clone(&self) -> PathAttribute
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PathAttribute
impl Debug for PathAttribute
impl Eq for PathAttribute
Source§impl Hash for PathAttribute
impl Hash for PathAttribute
Source§impl PartialEq for PathAttribute
impl PartialEq for PathAttribute
Source§fn eq(&self, other: &PathAttribute) -> bool
fn eq(&self, other: &PathAttribute) -> bool
self and other values to be equal, and is used by ==.