Sep 20, 2013, 5:11:51 PM9/20/13
to pma...@google.com, vkli...@google.com, ipaddr...@googlegroups.com, re...@codereview-hr.appspotmail.com
Sorry for the delay, looking at this now.
note that ipaddr is effectively deprecated in favor of ipaddress which is in the stdlib of python 3.2 (not that making this patch against ipaddr as opposed to ipaddress delayed its review).
On Tue, Sep 17 2013 at 11:46, pma...@google.com
> Reviewers: Peter Moody,
> This operates at the bit level, instead of making strange assumptions at
> the octet level, and thus fixes an assortment of bugs.
> Note that this could be trivially extended to support IPv6 netmasks and
> hostmasks, but that's probably not useful because everyone uses CIDR
> - _prefix_from_prefix_string: Parse a number, with bounds checking.
> - _prefix_from_ip_string: Parse IPv4 netmask/hostmask string.
> - _prefix_from_ip_int: Only accept inputs with the bit sequence 1*0*.
> - _ip_string_from_prefix
> - _is_hostmask
> - _is_valid_netmask
> Please review this at https://codereview.appspot.com/13745043/
> Affected files (+141, -124 lines):
> M trunk/ipaddr.py
> M trunk/ipaddr_test.py