Enum bgpkit_parser::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
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for ExtendedCommunity
impl Send for ExtendedCommunity
impl Sync for ExtendedCommunity
impl Unpin for ExtendedCommunity
impl UnwindSafe for ExtendedCommunity
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more