Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: add a trie type for efficient route lookups using netaddr.IP{,Prefix} (originally by @mdlayher) #19

Open
ckaznocha opened this issue Nov 1, 2023 · 2 comments

Comments

@ckaznocha
Copy link

This intended to be a continuation of: inetaf/netaddr#139. Since that repo has been archived, bringing it over here.

I noticed @bradfitz published tailscale/art recently. I'm wondering that is ready and still appropriate for use here?

@bradfitz
Copy link
Contributor

bradfitz commented Nov 1, 2023

Yeah, we're currently starting investigations of that, doing some measurements.

@aromatt
Copy link

aromatt commented May 6, 2024

I've been looking for an IP/CIDR trie implementation that uses netip.Prefixes as keys and generics for values - not for route lookups, but for more general use.

I need a variety of queries, e.g.:

  • query by prefix (as opposed to single IP)
  • get the shortest prefix parent of an IP or prefix
  • get all descendants of a prefix

It looks like a lot of work has gone into tailscale/art, but it's designed to solve a more specific problem as efficiently as possible.

I'm commenting here in case anyone else (at Tailscale or otherwise) has ever needed something similar, and either has a solution or is interested in one. In case it doesn't exist yet, I'm about to start working on it at aromatt/netipmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants