Expand description
Map IP addresses to origin ASNs with CAIDA’s RouteViews prefix-to-AS snapshots.
The crate is a thin library under the originet binary:
pfx2asparses thepfx2astext format CAIDA publishes;tableholds a longest-prefix-match table for IPv4 and IPv6;caidaknows the dataset layout onpublicdata.caida.organd picks a snapshot by date;fetchdownloads the index and the snapshots into a local cache;cachelists what the cache holds and prunes it;loadfills a table from a local file or from CAIDA and records where it came from;inputreads and validates the addresses to look up;outputserializes results as JSON, JSON Lines, CSV, TSV or Parquet.
Modules§
- cache
- Inventory and pruning of the local cache.
- caida
- Layout of CAIDA’s RouteViews prefix-to-AS datasets and snapshot selection.
- fetch
- Downloads CAIDA’s index and snapshots into a local cache.
- input
- Reading and validating the addresses to look up.
- load
- Filling a
Tablefrom a local file or from CAIDA, with the provenance of each load. - output
- Result records and the output formats.
- pfx2as
- Parser for CAIDA’s
pfx2asformat. - table
- Longest-prefix-match table built from
pfx2asentries.
Constants§
- USER_
AGENT - The
User-Agentsent to CAIDA, so the data host can tell who is downloading. - VERSION
- The crate version, as compiled into the binary.