google / ipaddr-py

Google's Python IP address manipulation library
Apache License 2.0
194 stars 71 forks source link

Patch: new IPv4/IPv6 parser and tests, ported from Guava #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This patch contains a Python implementation of the IP parsing algorithms
that I wrote for Guava.  It validates and parses the address in one step,
so a separate _is_valid_ip() function is no longer needed.

Also:
- Process ints instead of strings for ipv4_mapped, teredo, and sixtofour.
- Make teredo() check for 2001::/32 instead of 2001::/16.

Let me know if you'd like me to send this patch through some other medium.

Original issue reported on code.google.com by pma...@google.com on 18 Aug 2011 at 5:13

Attachments:

GoogleCodeExporter commented 9 years ago
Oh, here's a link to the original Java code:
http://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/comm
on/net/InetAddresses.java

Original comment by pma...@google.com on 18 Aug 2011 at 5:16

GoogleCodeExporter commented 9 years ago
*_v2.patch fixes a bug with nested exceptions in the skip_index
calculator, and tweaks the comments related to parts_hi and parts_lo.

Original comment by pma...@google.com on 18 Aug 2011 at 6:11

Attachments:

GoogleCodeExporter commented 9 years ago
Oh nifty, here it is in Rietveld: http://codereview.appspot.com/4917042

Original comment by pma...@google.com on 19 Aug 2011 at 4:00

GoogleCodeExporter commented 9 years ago
applied in r225. thanks!

Original comment by pmo...@google.com on 22 Aug 2011 at 5:33