This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Use it like this: main('192.168.1.0/24')""" | |
IPV4_MIN = 0 | |
IPV4_MAX = 0xFFFFFFFF | |
def not_network(ipv4_address, ipv4_netmask): | |
assert IPV4_MIN <= ipv4_address <= IPV4_MAX | |
assert IPV4_MIN <= ipv4_netmask <= IPV4_MAX | |
def hostmask_netmask(m): |