// ContainsAddress returns true if the IPv6Address is contained within the
// receiver.
975694
func (ipv6 IPv6Addr) ContainsAddress(x IPv6Address) bool {
	xAddr := IPv6Addr{
		Address: x,
		Mask:    ipv6HostMask,
	}

	{
		xIPv6 := xAddr.FirstUsable().(IPv6Addr)
		yIPv6 := ipv6.FirstUsable().(IPv6Addr)
		if xIPv6.CmpAddress(yIPv6) >= 1 {
			return false
		}
	}

	{
		xIPv6 := xAddr.LastUsable().(IPv6Addr)
		yIPv6 := ipv6.LastUsable().(IPv6Addr)
		if xIPv6.CmpAddress(yIPv6) <= -1 {
			return false
		}
	}
	return true
}
11798
func (s *awsIPs) contains(ip net.IP) bool {
	networks := s.getCandidateNetworks(ip)
	for _, network := range networks {
		if network.Contains(ip) {
			return true
		}
	}
	return false
}
544240
func (c *Client) ValidateAddress(address btcutil.Address) (*btcjson.ValidateAddressWalletResult, error) {
	return c.ValidateAddressAsync(address).Receive()
}
742843
func (ps ProtocolSet) ContainsAny(p ...Protocol) bool {
	for _, x := range ps {
		for _, y := range p {
			if x == y {
				return true
			}
		}
	}
	return false
}
1155411
func LessEndpointAddress(a, b *v1.EndpointAddress) bool {
	ipComparison := bytes.Compare([]byte(a.IP), []byte(b.IP))
	if ipComparison != 0 {
		return ipComparison < 0
	}
	if b.TargetRef == nil {
		return false
	}
	if a.TargetRef == nil {
		return true
	}
	return a.TargetRef.UID < b.TargetRef.UID
}
1008619
func (ip *Checker) Contains(addr string) (bool, error) {
	if len(addr) == 0 {
		return false, errors.New("empty IP address")
	}

	ipAddr, err := parseIP(addr)
	if err != nil {
		return false, fmt.Errorf("unable to parse address: %s: %s", addr, err)
	}

	return ip.ContainsIP(ipAddr), nil
}
999219
func (pr *PortRange) Contains(p int) bool {
	return (p >= pr.Base) && ((p - pr.Base) < pr.Size)
}
503755
func includesIPv6(ips []net.IP) bool {
	for _, ip := range ips {
		if ip.To4() == nil && ip.To16() != nil {
			return true
		}
	}

	return false
}
60340
func (ipv4 IPv4Addr) Contains(sa SockAddr) bool {
	ipv4b, ok := sa.(IPv4Addr)
	if !ok {
		return false
	}

	return ipv4.ContainsNetwork(ipv4b)
}
1118195
func (d *ClientDigestsFile) Contains(plat string, ref *api.ObjectRef) bool {
	for _, e := range d.entries {
		if e.plat == plat && proto.Equal(ref, e.ref) {
			return true
		}
	}
	return false
}
342215
func (h *Hostlist) Contains(b *Hostname) bool {
	for _, a := range *h {
		if a.Equal(b) {
			return true
		}
	}
	return false
}
847835
func (r *Range) Has(ip net.IP) bool {
	ok, offset := r.contains(ip)
	if !ok {
		return false
	}

	return r.alloc.Has(offset)
}
56726
func (p *Pubring) Contains(fp string) bool {
	p.Lock()
	defer p.Unlock()

	for _, pk := range p.data.PublicKeys {
		if pk.Fingerprint == fp {
			return true
		}
	}

	if p.secring == nil {
		return false
	}

	return p.secring.Contains(fp)
}
1123234
func (addr *address) networkAddress() network.Address {
	return network.Address{
		Value:     addr.Value,
		Type:      network.AddressType(addr.AddressType),
		Scope:     network.Scope(addr.Scope),
		SpaceName: network.SpaceName(addr.SpaceName),
	}
}
801778
func containsCIDR(outer, inner *net.IPNet) bool {
	return outer.Contains(firstIPInRange(inner)) && outer.Contains(lastIPInRange(inner))
}
980022
func IsIPv6(addr string) (bool, error) {
	ip := net.ParseIP(addr)
	if ip == nil {
		return false, fmt.Errorf("invalid IP address: %q", addr)
	}
	return ip.To4() == nil, nil
}
965596
func Contains(a [][]byte, x []byte) bool {
	n := SearchBytes(a, x)
	return n < len(a) && bytes.Equal(a[n], x)
}