prefixset-rs
About
A Rust library crate prefixset, providing a set-like container for IP
prefixes (not IP addresses).
Sets of prefixes are stored in a binary radix tree structure that provides:
- Fast insertion of contiguous prefix ranges in a single traversal,
- Iteration over either prefixes or ranges of prefixes, and
- Self aggregation on each operation.
Prior art
This is a Rust implementation derived in large part from the internal
data-structure used in the widely used bgpq3 tool by Alexandre Snarskii,
packaged as a library, and with the set-theoretic operations added.
Usage
Full documentation can be found here.
extern crate prefixset;
use ;