Fast Path Longest Prefix Match Library

IPv4 and IPv6 routers use an LPM algorithm to determine where to forward the packet to.

The fast path LPM library stores IPv4 and IPv6 routes in a tree, and provides an API to add and remove routes, and a fast lookup API to be used from data path.

Features

  • IPv4 and IPv6 support

  • Lookup from destination (LPM)

  • Exact lookup (prefix, prefix length and metric must match)

  • Add and delete routes

  • Flush tree

  • Iterate route tree