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

CoveringNetworks #43

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

CoveringNetworks #43

wants to merge 7 commits into from

Conversation

Ramzeth
Copy link

@Ramzeth Ramzeth commented Oct 26, 2021

I've added "CoveringNetworks" search feature. It's like ContainingNetworks() for but for IPnet instead of single IP.

Comment on lines +130 to +131
net := rnet.NewNetwork(network)
return p.coveringNetworks(net)
Copy link
Owner

@yl2chen yl2chen Oct 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! btw is new implementation needed, could we not just do the following?

Suggested change
net := rnet.NewNetwork(network)
return p.coveringNetworks(net)
return p.ContainingNetworks(network.IP.Mask(network.IPMask))

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this method. But i've discover Covers function, and decided to use it.

monoidic added a commit to monoidic/cidranger that referenced this pull request Aug 28, 2022
@hiddn hiddn mentioned this pull request Jan 6, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants