Reviewers: Peter Moody,
Description:
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.
The original Guava code (also open sourced by Google) is here:
http://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/net/InetAddresses.java
Please review this at http://codereview.appspot.com/4917042/
Affected files:
M ipaddr.py
M ipaddr_test.py
This looks cleaner and is a bit quicker by my tests too.
I'll apply this.