// ExcludeIP remove IP from the pool
435417
func ExcludeIP(dhcpHandler *DHCPHandler, ipRange string) []net.IP {
	excludeIPs, _ := IPsFromRange(ipRange)

	for _, excludeIP := range excludeIPs {
		if excludeIP != nil {
			// Calculate the position for the dhcp pool
			position := uint32(binary.BigEndian.Uint32(excludeIP.To4())) - uint32(binary.BigEndian.Uint32(dhcpHandler.start.To4()))

			dhcpHandler.available.ReserveIPIndex(uint64(position), FakeMac)
		}
	}
	return excludeIPs
}
1323357
func (api *DatabaseAPI) Exclude(key string) *DatabaseAPI {
	api.exclude(key)
	return api
}
221343
func (p *PerHost) AddIP(ip net.IP) {
	p.bypassIPs = append(p.bypassIPs, ip)
}
731381
func (t *MemoryPool) RemoveLease(leaseIP net.IP) error {
	t.poolLock.Lock()
	defer t.poolLock.Unlock()

	for i := range t.pool {
		if t.pool[i].IP.Equal(leaseIP) {

			//Move the Last Element to This Position.
			t.pool[i] = t.pool[len(t.pool)-1]

			//Shortern the Pool By One.
			t.pool = t.pool[0:(len(t.pool) - 1)]
			return nil
		}
	}

	return errors.New("Error: Lease IP \"" + leaseIP.String() + "\" Is Not In The Pool")
}
1158555
func (api *MobileGatewayAPI) Exclude(key string) *MobileGatewayAPI {
	api.exclude(key)
	return api
}
601339
func (s *ElasticIp) SetIp(v string) *ElasticIp {
	s.Ip = &v
	return s
}
1041540
func lastIP(n *net.IPNet) net.IP {
	mask := n.Mask
	ip := n.IP
	lastip := make(net.IP, len(ip))
	// set bits zero in the mask to ones in ip
	for i, m := range mask {
		lastip[i] = (^m) | ip[i]
	}
	return lastip
}
968460
func (h *Client) AnonymizeIP(anonymizeIP bool) *Client {
	h.anonymizeIP = anonymizeIP
	h.anonymizeIPSet = true
	return h
}
108397
func (api *PacketFilterAPI) Exclude(key string) *PacketFilterAPI {
	api.exclude(key)
	return api
}
120405
func (o *DeleteIPAMIPParams) bindIP(rawData []string, hasKey bool, formats strfmt.Registry) error {
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}

	// Required: true
	// Parameter is provided by construction from the route

	o.IP = raw

	return nil
}
1299723
func loopbackIP() net.IP {
	interfaces, err := net.Interfaces()
	if err != nil {
		return nil
	}
	for _, inf := range interfaces {
		const flagUpLoopback = net.FlagUp | net.FlagLoopback
		if inf.Flags&flagUpLoopback == flagUpLoopback {
			addrs, _ := inf.Addrs()
			for _, addr := range addrs {
				ip, _, err := net.ParseCIDR(addr.String())
				if err == nil && ip.IsLoopback() {
					return ip
				}
			}
		}
	}
	return nil
}
433159
func (api *DNSAPI) Exclude(key string) *DNSAPI {
	api.exclude(key)
	return api
}
867304
func (api *SIMAPI) Exclude(key string) *SIMAPI {
	api.exclude(key)
	return api
}
275902
func (api *CDROMAPI) Exclude(key string) *CDROMAPI {
	api.exclude(key)
	return api
}
450102
func (a *api) GetPoolIPs(id string) (*pool.PoolIPs, error) {
	client, err := a.connectMaster()
	if err != nil {
		return nil, err
	}

	return client.GetPoolIPs(id)
}
169108
func IsProxyableIP(ip string) error {
	netIP := net.ParseIP(ip)
	if netIP == nil {
		return ErrAddressNotAllowed
	}
	return isProxyableIP(netIP)
}
906860
func (a UnsignedValues) Exclude(min, max int64) UnsignedValues {
	rmin, rmax := a.FindRange(min, max)
	if rmin == -1 && rmax == -1 {
		return a
	}

	// a[rmin].UnixNano() ≥ min
	// a[rmax].UnixNano() ≥ max

	if rmax < len(a) {
		if a[rmax].UnixNano() == max {
			rmax++
		}
		rest := len(a) - rmax
		if rest > 0 {
			b := a[:rmin+rest]
			copy(b[rmin:], a[rmax:])
			return b
		}
	}

	return a[:rmin]
}