Skip to main content

Module vpn

Module vpn 

Source
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§

MplsLabelEntry
One RFC 8277 MPLS label-stack entry.
VpnNlri
One VPNv4/VPNv6 labeled NLRI.
VpnRouteKey
Route-key identity for one VPNv4/VPNv6 NLRI.

Enums§

VpnAddressFamily
VPN address family carried by a VPNv4/VPNv6 NLRI.
VpnPrefix
A VPNv4 or VPNv6 route 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 VPNv4 labeled NLRI (RFC 4364 §4.3.1).
VPNV6_AFI
AFI for VPNv6 labeled NLRI (RFC 4659 §3.2).

Functions§

decode_vpn_nlri
Decode VPNv4 or VPNv6 NLRI bytes for the selected family.
decode_vpnv4_nlri
Decode VPNv4 NLRI bytes.
decode_vpnv6_nlri
Decode VPNv6 NLRI bytes.
encode_vpn_nlri
Encode VPNv4 or VPNv6 NLRI bytes for the selected family.
encode_vpnv4_nlri
Encode VPNv4 NLRI bytes.
encode_vpnv6_nlri
Encode VPNv6 NLRI bytes.