Skip to content

CoveringNetworks - #43

Open
Ramzeth wants to merge 7 commits into
yl2chen:masterfrom
Ramzeth:master
Open

Ramzeth wants to merge 7 commits into
yl2chen:masterfrom
Ramzeth:master

Conversation

@Ramzeth

@Ramzeth Ramzeth commented Oct 26, 2021

Copy link
Copy Markdown

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

Comment thread trie.go
Comment on lines +130 to +131
net := rnet.NewNetwork(network)
return p.coveringNetworks(net)

@yl2chen yl2chen Oct 29, 2021 •

Copy link
Copy Markdown
Owner

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
Copy Markdown
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.

2 participants