def ip_to_int(ip_str):
    """
    Convert an IPv4 string to its integer representation
    :param ip_str: IPv4 address string
    :return: 32-bit integer corresponding to ip_str
    """
    return sum(int(ip) << i for ip, i in zip(ip_str.split('.'), [24, 16, 8, 0]))