Is the given ip address numericaly above the address range?
Is it above ipHigher?
177579
public boolean aboveRange(InetAddress ip) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "aboveRange, ip is " + ip);
            Tr.debug(tc, "aboveRange, ip is " + ip);
        }
        return greaterThan(ip, ipHigher);
    }
1334508
private boolean isIPV4address(String address) {
        StringTokenizer st = new StringTokenizer(address, ".");
        List<String> nodes = new ArrayList<String>();
        while (st.hasMoreTokens())
            nodes.add(st.nextToken());
        return (nodes.size() == 4);
    }
408838
private boolean isLocalIpAddress(InetAddress addr) {
    if (addr.isAnyLocalAddress() || addr.isLoopbackAddress())
      return true;
    try {
      return NetworkInterface.getByInetAddress(addr) != null;
    } catch (SocketException e) {
      return false;
    }
  }
125372
public static boolean isIPv4orIPv6Address(String _ipAddress) {
        return IPV4_PATTERN.matcher(_ipAddress).matches() || IPV6_PATTERN.matcher(_ipAddress).matches();
    }
771699
def ip_in_subnet(ip, subnet):
    """"""
    ipaddr = int(''.join(['%02x' % int(x) for x in ip.split('.')]), 16)
    netstr, bits = subnet.split('/')
    netaddr = int(''.join(['%02x' % int(x) for x in netstr.split('.')]), 16)
    mask = (0xffffffff << (32 - int(bits))) & 0xffffffff
    return (ipaddr & mask) == (netaddr & mask)
150191
def cidr=(newval)
      new_end = IPAddr.new("#{@starting_address}/#{newval}").to_range.end.mask 32
      self.class.validate_ip_range(@starting_address, new_end)
      @ending_address = new_end
      @need_to_update = true
    end
322676
def get_ip_address_from_request(request):
    
    remote_addr = request.META.get('REMOTE_ADDR', '')
    if remote_addr and is_valid_ip(remote_addr):
        return remote_addr.strip()
    return '127.0.0.1'
1108997
def is_private_addr(x):
    """"""
    paddrs = ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16']
    found = False
    for ipr in paddrs:
        try:
            if ipaddress.ip_address(x) in ipaddress.ip_network(ipr):
                found = True
                continue
        except:
            break
    return found
400414
private int computeNetworkPrefixFromMask(IPAddress mask) {
		
		int result = 0;
		int tmp = mask.getIPAddress();
		
		while ((tmp & 0x00000001) == 0x00000001) {
			result++;
			tmp = tmp >>> 1;
		}
		
		if (tmp != 0) {
			return -1;
		}
		
		return result;
	}
424606
def is_requestaddress_in_networks(request, networks):
    """"""
    from ipware.ip import get_real_ip, get_ip

    # Get the real IP, i.e. no reverse proxy, no nginx
    ip = get_real_ip(request)
    if not ip:
        ip = get_ip(request)
        if not ip:
            return False

    # For all networks
    for network in networks:
        if is_address_in_network(ip, network):
            return True

    return False
796849
public boolean isIPv4CompatibleAddress() {
        if ((ipaddress[0] == 0x00) && (ipaddress[1] == 0x00) &&
            (ipaddress[2] == 0x00) && (ipaddress[3] == 0x00) &&
            (ipaddress[4] == 0x00) && (ipaddress[5] == 0x00) &&
            (ipaddress[6] == 0x00) && (ipaddress[7] == 0x00) &&
            (ipaddress[8] == 0x00) && (ipaddress[9] == 0x00) &&
            (ipaddress[10] == 0x00) && (ipaddress[11] == 0x00))  {
            return true;
        }
        return false;
    }
901833
def is_ip(string):
    
    mo = re.match(r'(\d+)\.(\d+)\.(\d+)\.(\d+)', string)
    if mo is None:
        return False
    for group in mo.groups():
        if int(group) not in list(range(0, 256)):
            return False
    return True
1326745
def __ip_addr(addr, address_family=socket.AF_INET):
    '''
    
    '''
    mask_max = '32'
    if address_family == socket.AF_INET6:
        mask_max = '128'

    try:
        if '/' not in addr:
            addr = '{addr}/{mask_max}'.format(addr=addr, mask_max=mask_max)
    except TypeError:
        return False

    ip, mask = addr.rsplit('/', 1)

    # Verify that IP address is valid
    try:
        socket.inet_pton(address_family, ip)
    except socket.error:
        return False

    # Verify that mask is valid
    try:
        mask = int(mask)
    except ValueError:
        return False
    else:
        if not 1 <= mask <= int(mask_max):
            return False

    return True
1146928
public boolean inRange(InetAddress ip) throws FilterException {
        Iterator iter = ranges.iterator();
        while (iter.hasNext()) {
            IPAddressRange range = (IPAddressRange) iter.next();
            if (range.inRange(ip)) {
                return true;
            }
        }

        return false;
    }
86846
def _is_private_ip(ip):
	
	networks = [
		"0.0.0.0/8",
		"10.0.0.0/8",
		"100.64.0.0/10",
		"127.0.0.0/8",
		"169.254.0.0/16",
		"172.16.0.0/12",
		"192.0.0.0/24",
		"192.0.2.0/24",
		"192.88.99.0/24",
		"192.168.0.0/16",
		"198.18.0.0/15",
		"198.51.100.0/24",
		"203.0.113.0/24",
		"240.0.0.0/4",
		"255.255.255.255/32",
		"224.0.0.0/4",
	]

	for network in networks:
		try:
			ipaddr = struct.unpack(">I", socket.inet_aton(ip))[0]

			netaddr, bits = network.split("/")

			network_low = struct.unpack(">I", socket.inet_aton(netaddr))[0]
			network_high = network_low | 1 << (32 - int(bits)) - 1

			if ipaddr <= network_high and ipaddr >= network_low:
				return True
		except Exception:
			continue

	return False
939489
def get_ipv4_range(start_addr=None, end_addr=None, return_fields=None, **api_opts):
    '''
    
    '''
    infoblox = _get_infoblox(**api_opts)
    return infoblox.get_range(start_addr, end_addr, return_fields)
545664
public static boolean isInRangeV4(byte[] network,byte[] subnet,byte[] ipAddress)
    {
    	if(network.length!=4 || subnet.length!=4 || ipAddress.length!=4)
    		return false;    	
    	
    	return compareByteValues(network,subnet,ipAddress);
    }