def IPStringtoInt(ip):
    """
    Converts a number from a dotted decimal string into a single unsigned int.
    Args:
        ip: dotted decimal ip address, like 12.34.56.78

    Returns: The IP address as a simple 32-bit unsigned integer

    """
    address_mask = ip.split('/')
    parts = address_mask[0].split('.')
    ip_int = 0
    for i in range(4):
        ip_int <<= 8
        if len(parts) > i:
            try:
                ip_int += int(parts[i])
            except:
                pass
    return ip_int
