Expand description
VPNv4/VPNv6 labeled NLRI codec substrate (RFC 4364 / RFC 4659 / RFC 8277). VPNv4/VPNv6 labeled NLRI codec substrate.
This module is deliberately pure and unreachable from MP_REACH/MP_UNREACH
dispatch today. It provides the RFC 8277 label-stack and RFC 4364 / RFC
4659 RD-prefixed VPN prefix codec pieces needed for a future typed
VPNv4/VPNv6 route-reflector slice without treating VPN routes as unicast
crate::nlri::Prefix values.
Structs§
- Mpls
Label Entry - One RFC 8277 MPLS label-stack entry.
- VpnNlri
- One VPNv4/VPNv6 labeled NLRI.
- VpnRoute
Key - Route-key identity for one VPNv4/VPNv6 NLRI.
Enums§
- VpnAddress
Family - VPN address family carried by a VPNv4/VPNv6 NLRI.
- VpnPrefix
- A
VPNv4orVPNv6route prefix keyed by RD plus address prefix.
Constants§
- LABELED_
UNICAST_ SAFI - SAFI for labeled-unicast NLRI (RFC 8277 §2).
- MAX_
MPLS_ LABEL - Maximum 20-bit MPLS label value.
- MAX_
MPLS_ TRAFFIC_ CLASS - Maximum 3-bit MPLS traffic-class value.
- MPLS_
LABEL_ ENTRY_ BITS - One MPLS label-stack entry is a 20-bit label, 3-bit TC, and S bit.
- MPLS_
LABEL_ ENTRY_ LEN - One MPLS label-stack entry length in octets.
- MPLS_
VPN_ SAFI - SAFI for labeled VPN NLRI (RFC 8277 §2, RFC 4364, RFC 4659).
- ROUTE_
DISTINGUISHER_ BITS - Route Distinguisher length in bits.
- ROUTE_
DISTINGUISHER_ LEN - Route Distinguisher length in octets.
- VPNV4_
AFI - AFI for
VPNv4labeled NLRI (RFC 4364 §4.3.1). - VPNV6_
AFI - AFI for
VPNv6labeled NLRI (RFC 4659 §3.2).
Functions§
- decode_
vpn_ nlri - Decode
VPNv4orVPNv6NLRI bytes for the selected family. - decode_
vpnv4_ nlri - Decode
VPNv4NLRI bytes. - decode_
vpnv6_ nlri - Decode
VPNv6NLRI bytes. - encode_
vpn_ nlri - Encode
VPNv4orVPNv6NLRI bytes for the selected family. - encode_
vpnv4_ nlri - Encode
VPNv4NLRI bytes. - encode_
vpnv6_ nlri - Encode
VPNv6NLRI bytes.