Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for ipAddrs (0.18 sec)

  1. src/net/ipsock.go

    // and ipv6only. It returns every address when the filter is nil.
    // The result contains at least one address when error is nil.
    func filterAddrList(filter func(IPAddr) bool, ips []IPAddr, inetaddr func(IPAddr) Addr, originalAddr string) (addrList, error) {
    	var addrs addrList
    	for _, ip := range ips {
    		if filter == nil || filter(ip) {
    			addrs = append(addrs, inetaddr(ip))
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  2. src/net/lookup_plan9.go

    		for _, a := range addrs {
    			if a == addr {
    				continue loop
    			}
    		}
    		addrs = append(addrs, addr)
    	}
    	return
    }
    
    func (r *Resolver) lookupIP(ctx context.Context, network, host string) (addrs []IPAddr, err error) {
    	if order, conf := systemConf().hostLookupOrder(r, host); order != hostLookupCgo {
    		return r.goLookupIP(ctx, network, host, order, conf)
    	}
    
    	lits, err := r.lookupHost(ctx, host)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:08:38 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  3. src/vendor/golang.org/x/net/nettest/nettest.go

    func hasRoutableIP(network string, ifi *net.Interface) (net.IP, bool) {
    	ifat, err := ifi.Addrs()
    	if err != nil {
    		return nil, false
    	}
    	for _, ifa := range ifat {
    		switch ifa := ifa.(type) {
    		case *net.IPAddr:
    			if ip, ok := routableIP(network, ifa.IP); ok {
    				return ip, true
    			}
    		case *net.IPNet:
    			if ip, ok := routableIP(network, ifa.IP); ok {
    				return ip, true
    			}
    		}
    	}
    	return nil, false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  4. internal/http/listener_test.go

    		t.Fatalf("%s.  Unable to get IP addresses of this host.", err)
    	}
    
    	for _, addr := range addrs {
    		var ip net.IP
    		switch v := addr.(type) {
    		case *net.IPNet:
    			ip = v.IP
    		case *net.IPAddr:
    			ip = v.IP
    		}
    
    		if ip.To4() != nil {
    			localIP4.Add(ip.String())
    		}
    	}
    
    	// Filter ipList by IPs those do not start with '127.'.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 17:41:02 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  5. src/net/netip/netip.go

    //   net.IP:     24 byte slice header + {4, 16} = 28 to 40 bytes
    //   net.IPAddr: 40 byte slice header + {4, 16} = 44 to 56 bytes + zone length
    //   netip.Addr: 24 bytes (zone is per-name singleton, shared across all users)
    
    // Addr represents an IPv4 or IPv6 address (with or without a scoped
    // addressing zone), similar to [net.IP] or [net.IPAddr].
    //
    // Unlike [net.IP] or [net.IPAddr], Addr is a comparable value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  6. pkg/kubelet/kubelet_node_status.go

    	}
    
    	addrs, err := net.InterfaceAddrs()
    	if err != nil {
    		return err
    	}
    	for _, addr := range addrs {
    		var ip net.IP
    		switch v := addr.(type) {
    		case *net.IPNet:
    			ip = v.IP
    		case *net.IPAddr:
    			ip = v.IP
    		}
    		if ip != nil && ip.Equal(nodeIP) {
    			return nil
    		}
    	}
    	return fmt.Errorf("node IP: %q not found in the host's network interfaces", nodeIP.String())
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  7. src/net/http/transport_test.go

    	ctx := context.WithValue(context.Background(), nettrace.LookupIPAltResolverKey{}, func(ctx context.Context, network, host string) ([]net.IPAddr, error) {
    		if host != "dns-is-faked.golang" {
    			t.Errorf("unexpected DNS host lookup for %q/%q", network, host)
    			return nil, nil
    		}
    		return []net.IPAddr{{IP: net.ParseIP(ip)}}, nil
    	})
    
    	body := "some body"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/rewrite.go

    		return base, offset
    	}
    	p1, off1 := baseAndOffset(p1)
    	p2, off2 := baseAndOffset(p2)
    	if isSamePtr(p1, p2) {
    		return !overlap(off1, n1, off2, n2)
    	}
    	// p1 and p2 are not the same, so if they are both OpAddrs then
    	// they point to different variables.
    	// If one pointer is on the stack and the other is an argument
    	// then they can't overlap.
    	switch p1.Op {
    	case OpAddr, OpLocalAddr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 64.2K bytes
    - Viewed (0)
Back to top