// IPAddress IPアドレスを取得
333500
func (n *NFS) IPAddress() string {
	if len(n.Remark.Servers) < 1 {
		return ""
	}

	v, ok := n.Remark.Servers[0].(map[string]interface{})
	if !ok {
		return ""
	}

	if ip, ok := v["IPAddress"]; ok {
		return ip.(string)
	}
	return ""
}
535623
func (s *AgentNetworkInfo) SetIpAddress(v string) *AgentNetworkInfo {
	s.IpAddress = &v
	return s
}
128243
func (c Context) IPAddr(key string, ip net.IP) Context {
	c.l.context = enc.AppendIPAddr(enc.AppendKey(c.l.context, key), ip)
	return c
}
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),
	}
}
819495
func (ipv4 IPv4Addr) NetIPNet() *net.IPNet {
	ipv4net := &net.IPNet{}
	ipv4net.IP = make(net.IP, IPv4len)
	binary.BigEndian.PutUint32(ipv4net.IP, uint32(ipv4.NetworkAddress()))
	ipv4net.Mask = *ipv4.NetIPMask()
	return ipv4net
}
577290
func (s *UpdateAcceleratorInput) SetIpAddressType(v string) *UpdateAcceleratorInput {
	s.IpAddressType = &v
	return s
}
970940
func GetInterfaceIPAddress(_interface string) (string, error) {
	output, err := exec.Command("/sbin/ip", "-4", "-o", "addr").Output()
	if err != nil {
		return "", err
	}

	for _, line := range strings.Split(string(output), "\n") {
		fields := strings.Fields(line)
		if len(fields) < 4 {
			continue
		}

		if strings.HasPrefix(fields[1], _interface) {
			return strings.Split(fields[3], "/")[0], nil
		}
	}

	return "", fmt.Errorf("Unable to find ip for interface: %s", _interface)
}
1902
func (internet Internet) IPv6(v reflect.Value) (interface{}, error) {
	return internet.ipv6(), nil
}
1070242
func (s *BrokerInstance) SetIpAddress(v string) *BrokerInstance {
	s.IpAddress = &v
	return s
}
597885
func (s *Database) WebUIAddress() string {
	webUI := s.Settings.DBConf.Common.WebUI
	if webUI != nil {
		if v, ok := webUI.(string); ok {
			return v
		}
	}
	return ""
}
1227588
func (req IPRequest) IPID() string {
	return fmt.Sprintf("%s-%s", req.HostID, req.IPAddress)
}
447878
func IpV4Address() string {
	blocks := []string{}
	for i := 0; i < 4; i++ {
		number := privateRand.Intn(255)
		blocks = append(blocks, strconv.Itoa(number))
	}

	return strings.Join(blocks, ".")
}
14546
func (r *Reader) ISP(ipAddress net.IP) (*ISP, error) {
	if isISP&r.databaseType == 0 {
		return nil, InvalidMethodError{"ISP", r.Metadata().DatabaseType}
	}
	var val ISP
	err := r.mmdbReader.Lookup(ipAddress, &val)
	return &val, err
}
665986
func (s *StaticIp) SetIpAddress(v string) *StaticIp {
	s.IpAddress = &v
	return s
}
231833
func ParseIPAddress(input string) string {
	host, _ := SplitHostPort(input)

	ip := net.ParseIP(host)

	if ip == nil {
		return host
	}

	if ip.IsLoopback() {
		return "127.0.0.1"
	}

	return ip.String()
}
306045
func (s *Workspace) SetIpAddress(v string) *Workspace {
	s.IpAddress = &v
	return s
}
490529
func (v *VPCRouter) IPAddress1At(index int) string {
	if len(v.Interfaces) <= index {
		return ""
	}

	if index == 0 {
		if v.IsStandardPlan() {
			return v.Interfaces[0].IPAddress
		}

		if !v.HasInterfaces() {
			return ""
		}
		if len(v.Settings.Router.Interfaces[0].IPAddress) < 1 {
			return ""
		}
		return v.Settings.Router.Interfaces[0].IPAddress[0]
	}

	nic := v.Settings.Router.Interfaces[index]
	if len(nic.IPAddress) < 1 {
		return ""
	}
	return nic.IPAddress[0]
}