parse_attributes

Function parse_attributes 

Source
pub fn parse_attributes(
    data: Bytes,
    asn_len: &AsnLength,
    add_path: bool,
    afi: Option<Afi>,
    safi: Option<Safi>,
    prefixes: Option<&[NetworkPrefix]>,
) -> Result<Attributes, ParserError>
Expand description

Parse BGP attributes given a slice of u8 and some options.

The data: &[u8] contains the entirety of the attributes bytes, therefore the size of the slice is the total byte length of the attributes section of the message.