veqryn / cidr-ip-trie Goto Github PK
View Code? Open in Web Editor NEWComparable CIDR and IP types, and Trie collections for suffix, prefix, and longest prefix matching
License: MIT License
Comparable CIDR and IP types, and Trie collections for suffix, prefix, and longest prefix matching
License: MIT License
Hi,
Thanks for your project. We have built a wrapper of the library to be OSGi compliant. Do you want a PR in your project with this build?
Regards.
hi,I want to know why mask can't be 0
eg, Cidr4 myCIDR1 = new Cidr4("0.0.0.0/0");
Hi,I have two questions:
I like the idea of keeping multiple CIDRs in a data structure optimized to search it, but what I really need is a fast way to check an IP address against a set of CIDRs. I thought that was the whole point of using a Trie to store CIDRs so you could easily just walk the prefix tree to find the CIDR that an IP address might be within.
However, I don't see any methods like isInRange() on Trie to support that. So does that need to be written or is there another way to check IP membership that I don't see?
Currently it is impossible to access the address
field through the getSortableInteger() method because it is protected. It is also impossible to subclass the Ip4 class because it is final.
Hey, I saw that IPv6 support was on your roadmap. I'm attempting to use your library to increase the speed of logstash-filter-cidr, which is currently VERY slow, but does support IPv6. What would it take to add support not just for IPv6, but also generic v4/v6 ip type and trie?
The use case is that the user may provide a list containing both IPv4 and v6 CIDRs to match, and events to be matched may contain addresses of either type as well. We would need to be able to build a trie containing both types, and make queries using address of either type.
Support for IPv4-mapped IPv6 addresses would also be nice (::ffff:192.168.0.0/120
matches 192.168.0.1
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.