[][src]Struct mrt_rs::records::tabledump::TABLE_DUMP

pub struct TABLE_DUMP {
    pub view_number: u16,
    pub sequence_number: u16,
    pub prefix: IpAddr,
    pub prefix_length: u8,
    pub status: u8,
    pub originated_time: u32,
    pub peer_address: IpAddr,
    pub peer_as: u16,
    pub attributes: Vec<u8>,
}

Represents a RIB entry of a Routing Information Base.

Fields

view_number: u16

Identifies the RIB view. Normally set to 0.

sequence_number: u16

Sequence number for the RIB entry in the RIB. Will wrap to back to 0.

prefix: IpAddr

The IP address of this RIB entry.

prefix_length: u8

The prefix length of this RIB entry.

status: u8

Unused and should be set to 1.

originated_time: u32

Contains the 4-octet time at which this prefix was heard since 1 January 1970 00:00:00 UTC.

peer_address: IpAddr

IP address of the peer that provided the update for this RIB entry.

peer_as: u16

ASN of the peer that provided the update for this RIB entry.

attributes: Vec<u8>

The path attributes associated with this route.

Implementations

impl TABLE_DUMP[src]

pub fn parse(header: &Header, stream: impl Read) -> Result<TABLE_DUMP, Error>[src]

Summary

Used to parse TABLE_DUMP MRT records.

Panics

This function does not panic.

Errors

Any IO error will be returned while reading from the stream. If an ill-formatted stream or header is provided behavior will be undefined.

Safety

This function does not make use of unsafe code.

Trait Implementations

impl Debug for TABLE_DUMP[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.