import struct
import socket


def ip_to_int(network: str) -> int:
    """ Takes an IP and returns the unsigned integer encoding of the address

    :param str network: ip address
    :return: unsigned integer encoding
    """
    return struct.unpack('=L', socket.inet_aton(network))[0]