Enum bgp_models::bgp::community::ExtendedCommunity
source · pub enum ExtendedCommunity {
TransitiveTwoOctetAsSpecific(TwoOctetAsSpecific),
TransitiveIpv4AddressSpecific(Ipv4AddressSpecific),
TransitiveFourOctetAsSpecific(FourOctetAsSpecific),
TransitiveOpaque(Opaque),
NonTransitiveTwoOctetAsSpecific(TwoOctetAsSpecific),
NonTransitiveIpv4AddressSpecific(Ipv4AddressSpecific),
NonTransitiveFourOctetAsSpecific(FourOctetAsSpecific),
NonTransitiveOpaque(Opaque),
Ipv6AddressSpecific(Ipv6AddressSpecific),
Raw([u8; 8]),
}Expand description
Extended Communities.
It is a 8-octet data that has flexible definition based on the types: https://datatracker.ietf.org/doc/html/rfc4360
For more up-to-date definitions, see IANA’ website.
Each Extended Community is encoded as an 8-octet quantity, as
follows:
- Type Field : 1 or 2 octets
- Value Field : Remaining octets
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type high | Type low(*) | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Value |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
(*) Present for Extended types only, used for the Value field
otherwise.
Variants§
TransitiveTwoOctetAsSpecific(TwoOctetAsSpecific)
TransitiveIpv4AddressSpecific(Ipv4AddressSpecific)
TransitiveFourOctetAsSpecific(FourOctetAsSpecific)
TransitiveOpaque(Opaque)
NonTransitiveTwoOctetAsSpecific(TwoOctetAsSpecific)
NonTransitiveIpv4AddressSpecific(Ipv4AddressSpecific)
NonTransitiveFourOctetAsSpecific(FourOctetAsSpecific)
NonTransitiveOpaque(Opaque)
Ipv6AddressSpecific(Ipv6AddressSpecific)
Raw([u8; 8])
Trait Implementations§
source§impl Clone for ExtendedCommunity
impl Clone for ExtendedCommunity
source§fn clone(&self) -> ExtendedCommunity
fn clone(&self) -> ExtendedCommunity
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ExtendedCommunity
impl Debug for ExtendedCommunity
source§impl Display for ExtendedCommunity
impl Display for ExtendedCommunity
source§impl PartialEq<ExtendedCommunity> for ExtendedCommunity
impl PartialEq<ExtendedCommunity> for ExtendedCommunity
source§fn eq(&self, other: &ExtendedCommunity) -> bool
fn eq(&self, other: &ExtendedCommunity) -> bool
This method tests for
self and other values to be equal, and is used
by ==.