Skip to main content

parse_labeled_nlri

Function parse_labeled_nlri 

Source
pub fn parse_labeled_nlri(
    input: &mut Bytes,
    afi: Afi,
    config: &LabeledNlriConfig,
) -> Result<Vec<LabeledNetworkPrefix>, ParserError>
Expand description

Parse labeled NLRI from MP_REACH_NLRI (announcements) per RFC 8277.

This function handles both §2.2 SingleLabel mode (ignore S-bit) and §2.3 MultiLabel mode (use BoS bit to delimit stack).