Skip to main content

decode_route_refresh_orf

Function decode_route_refresh_orf 

Source
pub fn decode_route_refresh_orf(
    buf: &mut impl Buf,
    family: Option<(Afi, Safi)>,
) -> Result<OrfPayload, DecodeError>
Expand description

Decode the ORF section of a ROUTE-REFRESH body, after the AFI/Reserved/SAFI header. family is the resolved AFI/SAFI pair of the message. Address- Prefix entries are parsed only for IPv4/IPv6 unicast, where their prefix encoding is defined here; other families are kept as raw bytes.

§Errors

Returns DecodeError only on genuine framing problems: truncation, or a group length that overruns the body. A malformed Address-Prefix entry (undefined Action, or a prefix length beyond the address family) does not error — that group decodes into OrfEntries::Malformed for the caller to reset (RFC 5291 §5.2).