• Manuel Franceschini's avatar
    Introduce new IPAddress classes · 8b312c1d
    Manuel Franceschini authored
    This patch unifies the netutils functions dealing with IP addresses to
    three classes:
    - IPAddress: Common IP address functionality
    - IPv4Address: IPv4 specific functionality
    - IPv6address: IPv6-specific functionality
    Furthermore it adds methods to check whether an address is a loopback
    address, replacing the .startswith("127") for IPv4 and adding IPv6
    It also provides the basis for future IPv6 address handling. Methods to
    convert IP strings to their corresponding interger values will allow to
    canonicalize IPv6 addresses.
    Signed-off-by: default avatarManuel Franceschini <livewire@google.com>
    Reviewed-by: default avatarIustin Pop <iustin@google.com>
bootstrap.py 24.7 KB