tiborschneider / prefix-trie

Apache License 2.0
20 stars 4 forks source link

Add ascend() for get an iterator that generates of all supernets #11

Closed kishiguro closed 1 month ago

kishiguro commented 1 month ago

Hi, @tiborschneider .

Thanks for the great implementation.

I am currently implementing BGP. One of the BGP features, called aggregation, needs to keep track of its subnets. When a new route is added to the BGP RIB, we want to check if an aggregated supernet exists. It would be helpful to have an iterator to traverse all the ancestor nodes of the given prefix. would you mind to take a look this PR which add the feature?

tiborschneider commented 1 month ago

I agree to add this feature, let's work on that PR.