// AddrDel will delete an IP address from a link device.
// Equivalent to: `ip addr del $addr dev $link`
548418
func (h *Handle) AddrDel(link Link, addr *Addr) error {
	req := h.newNetlinkRequest(unix.RTM_DELADDR, unix.NLM_F_ACK)
	return h.addrHandle(link, addr, req)
}
437585
func (a *addrBook) AddAddress(addr *p2p.NetAddress, src *p2p.NetAddress) error {
	a.mtx.Lock()
	defer a.mtx.Unlock()

	return a.addAddress(addr, src)
}
1050453
func (_PublicResolver *PublicResolverCaller) Addr(opts *bind.CallOpts, node [32]byte) (common.Address, error) {
	var (
		ret0 = new(common.Address)
	)
	out := ret0
	err := _PublicResolver.contract.Call(opts, out, "addr", node)
	return *ret0, err
}
716916
func (d *dualListener) Addr() net.Addr {
	d.mu.Lock()
	defer d.mu.Unlock()
	if d.apiListener != nil {
		return d.apiListener.Addr()
	}
	return d.controllerListener.Addr()
}
522804
func (i *Inbound) Addr() net.Addr {
	i.lock.RLock()
	defer i.lock.RUnlock()
	// i.server is set in start, so checking against nil checks
	// if Start has been called
	// we check if i.listener is nil just for safety
	if i.server == nil || i.listener == nil {
		return nil
	}
	return i.listener.Addr()
}
909531
func (_PublicResolver *PublicResolverSession) Addr(node [32]byte) (common.Address, error) {
	return _PublicResolver.Contract.Addr(&_PublicResolver.CallOpts, node)
}
935234
func (ident *identifier) Addr() (reg register, offset int, size uint) {
	offset = ident.offset
	size = ident.size()
	if ident.isParam() || ident.isRetIdent() {
		reg = *getRegister(REG_FP)
	} else {
		reg = *getRegister(REG_SP)
	}
	return
}
1244014
func (c *throttledConn) SetDeadline(t time.Time) error {
	return c.originalConn.SetDeadline(t)
}
1002401
func (adder *Adder) AddAllAndPin(file files.Node) (ipld.Node, error) {
	if adder.Pin {
		adder.unlocker = adder.gcLocker.PinLock()
	}
	defer func() {
		if adder.unlocker != nil {
			adder.unlocker.Unlock()
		}
	}()

	switch tf := file.(type) {
	case files.Directory:
		// Iterate over each top-level file and add individually. Otherwise the
		// single files.File f is treated as a directory, affecting hidden file
		// semantics.
		it := tf.Entries()
		for it.Next() {
			if err := adder.addFileNode(it.Name(), it.Node()); err != nil {
				return nil, err
			}
		}
		if it.Err() != nil {
			return nil, it.Err()
		}
		break
	default:
		if err := adder.addFileNode("", file); err != nil {
			return nil, err
		}
		break
	}

	// copy intermediary nodes from editor to our actual dagservice
	nd, err := adder.Finalize()
	if err != nil {
		return nil, err
	}

	if !adder.Pin {
		return nd, nil
	}
	return nd, adder.PinRoot()
}
1237926
func (c *Client) LinodeIPAddPrivate(linodeID int) (ipID int, ipAddr string, err error) {
	args := make(map[string]interface{})
	args["LinodeID"] = linodeID

	data, err := c.apiCall("linode.ip.addprivate", args)
	if err != nil {
		return 0, "", err
	}

	out := struct {
		IPAddrID int    `json:"IPAddressID"`
		IPAddr   string `json:"IPAddress"`
	}{}

	err = json.Unmarshal(data, &out)
	if err != nil {
		return 0, "", err
	}

	return out.IPAddrID, out.IPAddr, nil
}
1119064
func (cs *CarbonlinkServer) Addr() net.Addr {
	if cs.listener == nil {
		return nil
	}
	return cs.listener.Addr()
}
1107819
func ResolveURL(scheme string, addr string) string {
	host := ResolveVHost(addr)
	return scheme + "://" + host
}
1316456
func AddrPort(addr net.Addr) int {
	switch raw := addr.(type) {
	case *net.UDPAddr:
		return raw.Port
	case *net.TCPAddr:
		return raw.Port
	default:
		_, port, err := net.SplitHostPort(addr.String())
		if err != nil {
			panic(err)
		}
		i64, err := strconv.ParseInt(port, 0, 0)
		if err != nil {
			panic(err)
		}
		return int(i64)
	}
}
306907
func (p *ProxyLB) DeleteBindPort(mode string, port int) {
	p.Settings.ProxyLB.DeleteBindPort(mode, port)
}
130084
func (i *Inbound) Addr() net.Addr {
	if i.server == nil {
		return nil
	}

	listener := i.server.Listener()
	if listener == nil {
		return nil
	}

	return listener.Addr()
}
1205426
func (h *netlinkHandle) DeleteDummyDevice(devName string) error {
	link, err := h.LinkByName(devName)
	if err != nil {
		_, ok := err.(netlink.LinkNotFoundError)
		if ok {
			return nil
		}
		return fmt.Errorf("error deleting a non-exist dummy device: %s, %v", devName, err)
	}
	dummy, ok := link.(*netlink.Dummy)
	if !ok {
		return fmt.Errorf("expect dummy device, got device type: %s", link.Type())
	}
	return h.LinkDel(dummy)
}
1108070
func (m *Manager) Addr() string {
	m.addrMu.Lock()
	defer m.addrMu.Unlock()

	if m.config.RemoteAPI == nil {
		return ""
	}
	return m.config.RemoteAPI.ListenAddr
}