Handling IP ranges in the net module

I am pretty new to Rust. I noticed that there is no way to manipulate a range of IP addresses in Rust. I was wondering if it would make sense to add one? At the basic level, I’d expect these functionalities:

  1. Support for v4 and v6
  2. A way of checking if an IP belongs to that range
  3. A way of getting the broadcast address and network address for that range
  4. Support for combining multiple ranges etc.

I assumed that this would require a RFC. Looking for feedback on how to proceed here? Please let me know if this is worth pursuing or if it’s a bad idea :smile:

1 Like

I’d suggest as a first step to build a crate providing the functionality you expect. They always help understanding RFCs, help tease out actual implementation details, and at the end, you still have a library that does what you wanted, regardless of the rest.

5 Likes

Thanks for the idea. Working on it!

1 Like

I have a basic implementation here

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.