iptools
iptools copied to clipboard
Would very much like to have IPv6 support within both iptools and triebeard
I currently need to use Python 3 for any serious Internet address hacking, principally using the ipaddress, netaddr, and, occasionally, socket modules. There is also py-radix , but that's apparently only available for Python 2.7. There are also trie and triefind modules in the Biopython package that I have not entirely explored.
A key requirement is that IPv4 and IPv6 addresses be storable within the same trie without, for instance, standardization of IPv4 within IPv6.
The only way I can think to enable IPv6 support is to create an S3 or S4 "128-bit integer" class (which isn't a big deal, but something I think we've just been avoiding). I'm curious as to the use-case or support for both in the same trie (I, to, do quite a bit of work with IP addresses at Rapid7).
I do a lot of work with access patterns to Web properties, or cataloguing routers on traceroutes (or at least intermediate hops). The access patterns and router addresses are a mixed bag of v4 and v6 addresses, and for my purposes the network type is pretty much immaterial.
Incidentally, clarifying my comment above, py-radix is supported in Python 3: It was just difficult to find out what to call the package to install it. It permits such mixed use.
There's a design choice here ... There are uses for tries in many contexts, including prefix-matching. These are especially population in Biology, esp genetic database searches, as in the Biopython package, but these are ill-suited for network addresses. (I suppose some hacking of BOUNDARY_CHARACTERS there could transform the Biopython version to a more general one.) So, the question is whether or not triebeard wants to generalize to a arbitrary string-prefix matching facility, or if it wants to keep its IP roots.
Triebeard doesn't have IP roots - I implemented it for domain matching, actually. But: what operation exactly do you need it to perform that it can't?
On Tuesday, 18 October 2016, empirical-bayesian <[email protected] javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:
I do a lot of work with access patterns to Web properties, or cataloguing routers on traceroutes (or at least intermediate hops). The access patterns and router addresses are a mixed bag of v4 and v6 addresses, and for my purposes the network type is pretty much immaterial.
Incidentally, clarifying my comment above, py-radix is supported in Python 3: It was just difficult to find out what to call the package to install it. It permits such mixed use.
There's a design choice here ... There are uses for tries in many contexts, including prefix-matching. These are especially population in Biology, esp genetic database searches, as in the Biopython package, but these are ill-suited for network addresses. (I suppose some hacking of BOUNDARY_CHARACTERS there could transform the Biopython version to a more general one.) So, the question is whether or not triebeard wants to generalize to a arbitrary string-prefix matching facility, or if it wants to keep its IP roots.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hrbrmstr/iptools/issues/33#issuecomment-254580475, or mute the thread https://github.com/notifications/unsubscribe-auth/ACXz3qLQWv6np3GBrVblM0-MK_MVRk7Sks5q1QJXgaJpZM4KaC4N .
I've already built searching within CIDRs using triebeard in iptools so
this would be an extension of that for IPv6 addys along with IPv4
On Tue, Oct 18, 2016 at 3:43 PM, Oliver Keyes [email protected] wrote:
Triebeard doesn't have IP roots - I implemented it for domain matching, actually. But: what operation exactly do you need it to perform that it can't?
On Tuesday, 18 October 2016, empirical-bayesian <[email protected] javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:
I do a lot of work with access patterns to Web properties, or cataloguing routers on traceroutes (or at least intermediate hops). The access patterns and router addresses are a mixed bag of v4 and v6 addresses, and for my purposes the network type is pretty much immaterial.
Incidentally, clarifying my comment above, py-radix is supported in Python 3: It was just difficult to find out what to call the package to install it. It permits such mixed use.
There's a design choice here ... There are uses for tries in many contexts, including prefix-matching. These are especially population in Biology, esp genetic database searches, as in the Biopython package, but these are ill-suited for network addresses. (I suppose some hacking of BOUNDARY_CHARACTERS there could transform the Biopython version to a more general one.) So, the question is whether or not triebeard wants to generalize to a arbitrary string-prefix matching facility, or if it wants to keep its IP roots.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hrbrmstr/iptools/issues/33#issuecomment-254580475, or mute the thread <https://github.com/notifications/unsubscribe- auth/ACXz3qLQWv6np3GBrVblM0-MK_MVRk7Sks5q1QJXgaJpZM4KaC4N> .
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/hrbrmstr/iptools/issues/33#issuecomment-254617318, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfHtiomhrgpPN85gG4wC9nRN4g-wz0xks5q1SFegaJpZM4KaC4N .
Gotcha. I can't promise work on it any time soon (got other projects!) but I don't have any opposition.
I'm happy to be a tester of alpha code when and if you have it. My main dev environment is Ubuntu, but eventually I'll want anything there is on Windows (7+). I have my own work project, which will be open sourced, to do some of these things. I don't think they will be as efficient as anything in Rcpp, but I'm also doing a radix tree type of implementation using bit vectors (via bin in the miscFuncs package). The biggest thing I continue to rely upon Python for, besides IPv6 functionality, is canonicalizing IPv6 addresses because of the several ways they can be written.