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

Would very much like to have IPv6 support within both iptools and triebeard #33

Open
ghost opened this issue Oct 18, 2016 · 6 comments
Open
Assignees

Comments

@ghost
Copy link

ghost commented Oct 18, 2016

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.

@hrbrmstr hrbrmstr self-assigned this Oct 18, 2016
@hrbrmstr
Copy link
Owner

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).

@ghost
Copy link
Author

ghost commented Oct 18, 2016

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.

@Ironholds
Copy link
Collaborator

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 <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> 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
#33 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACXz3qLQWv6np3GBrVblM0-MK_MVRk7Sks5q1QJXgaJpZM4KaC4N
.

@hrbrmstr
Copy link
Owner

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 notifications@github.com
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 <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> 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
#33 (comment),
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
#33 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAfHtiomhrgpPN85gG4wC9nRN4g-wz0xks5q1SFegaJpZM4KaC4N
.

@Ironholds
Copy link
Collaborator

Gotcha. I can't promise work on it any time soon (got other projects!) but I don't have any opposition.

@ghost
Copy link
Author

ghost commented Oct 20, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants