pub struct BgpRouteRefreshMessage {
pub afi: u16,
pub subtype: u8,
pub safi: u8,
pub data: Vec<u8>,
}Expand description
BGP ROUTE-REFRESH Message - RFC 2918
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| AFI | Res./Subt. | SAFI |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+AFI and SAFI are kept as raw integers so refreshes for address families outside the Afi/Safi enums still parse and re-encode byte-for-byte.
Fields§
§afi: u16§subtype: u8Reserved in RFC 2918; message subtype in RFC 7313 (0 = normal route refresh, 1 = BoRR, 2 = EoRR).
safi: u8§data: Vec<u8>Trailing bytes such as ORF entries (RFC 5291), kept raw.
Implementations§
Source§impl BgpRouteRefreshMessage
impl BgpRouteRefreshMessage
Sourcepub fn safi(&self) -> Option<Safi>
pub fn safi(&self) -> Option<Safi>
The SAFI as a typed Safi, if it is a known subsequent address family.
Sourcepub fn validation_warnings(&self) -> Vec<BgpValidationWarning>
pub fn validation_warnings(&self) -> Vec<BgpValidationWarning>
RFC 7313 Section 5 validation findings for this message.
A subtype other than 0-2 MUST be ignored (and SHOULD be logged) by a live speaker, and a BoRR/EoRR message (subtype 1 or 2) whose body is not exactly 4 bytes is an “Invalid Message Length” error. Both rules only apply when the Enhanced Route Refresh capability was negotiated, which MRT data cannot show, so the parser reports them as warnings while retaining the message.
Trait Implementations§
Source§impl Clone for BgpRouteRefreshMessage
impl Clone for BgpRouteRefreshMessage
Source§fn clone(&self) -> BgpRouteRefreshMessage
fn clone(&self) -> BgpRouteRefreshMessage
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 BgpRouteRefreshMessage
impl Debug for BgpRouteRefreshMessage
impl Eq for BgpRouteRefreshMessage
Source§impl PartialEq for BgpRouteRefreshMessage
impl PartialEq for BgpRouteRefreshMessage
impl StructuralPartialEq for BgpRouteRefreshMessage
Auto Trait Implementations§
impl Freeze for BgpRouteRefreshMessage
impl RefUnwindSafe for BgpRouteRefreshMessage
impl Send for BgpRouteRefreshMessage
impl Sync for BgpRouteRefreshMessage
impl Unpin for BgpRouteRefreshMessage
impl UnsafeUnpin for BgpRouteRefreshMessage
impl UnwindSafe for BgpRouteRefreshMessage
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.impl<T> ErasedDestructor for Twhere
T: 'static,
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