Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 18 of 18 for supportsIPv4 (0.18 sec)

  1. src/net/ipsock.go

    	ipv4Enabled           bool
    	ipv6Enabled           bool
    	ipv4MappedIPv6Enabled bool
    }
    
    var ipStackCaps ipStackCapabilities
    
    // supportsIPv4 reports whether the platform supports IPv4 networking
    // functionality.
    func supportsIPv4() bool {
    	ipStackCaps.Once.Do(ipStackCaps.probe)
    	return ipStackCaps.ipv4Enabled
    }
    
    // supportsIPv6 reports whether the platform supports IPv6 networking
    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/ipsock_test.go

    	{ipv6only, []IPAddr{{IP: IPv4(127, 0, 0, 1)}}, testInetaddr, nil, nil, nil, &AddrError{errNoSuitableAddress.Error(), "ADDR"}},
    }
    
    func TestAddrList(t *testing.T) {
    	if !supportsIPv4() || !supportsIPv6() {
    		t.Skip("both IPv4 and IPv6 are required")
    	}
    
    	for i, tt := range addrListTests {
    		addrs, err := filterAddrList(tt.filter, tt.ips, tt.inetaddr, "ADDR")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Apr 15 22:22:09 UTC 2017
    - 6.8K bytes
    - Viewed (0)
  3. src/net/main_test.go

    	network, address string
    	nameLookup       bool
    }
    
    var (
    	ipv6LinkLocalUnicastTCPTests []ipv6LinkLocalUnicastTest
    	ipv6LinkLocalUnicastUDPTests []ipv6LinkLocalUnicastTest
    )
    
    func setupTestData() {
    	if supportsIPv4() {
    		resolveTCPAddrTests = append(resolveTCPAddrTests, []resolveTCPAddrTest{
    			{"tcp", "localhost:1", &TCPAddr{IP: IPv4(127, 0, 0, 1), Port: 1}, nil},
    			{"tcp4", "localhost:2", &TCPAddr{IP: IPv4(127, 0, 0, 1), Port: 2}, nil},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. src/net/ipsock_posix.go

    	case '4':
    		return syscall.AF_INET, false
    	case '6':
    		return syscall.AF_INET6, true
    	}
    
    	if mode == "listen" && (laddr == nil || laddr.isWildcard()) {
    		if supportsIPv4map() || !supportsIPv4() {
    			return syscall.AF_INET6, false
    		}
    		if laddr == nil {
    			return syscall.AF_INET, false
    		}
    		return laddr.family(), false
    	}
    
    	if (laddr == nil || laddr.family() == syscall.AF_INET) &&
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  5. src/net/interface_test.go

    		}
    	}
    	return stats, nil
    }
    
    func checkUnicastStats(ifStats *ifStats, uniStats *routeStats) error {
    	// Test the existence of connected unicast routes for IPv4.
    	if supportsIPv4() && ifStats.loop+ifStats.other > 0 && uniStats.ipv4 == 0 {
    		return fmt.Errorf("num IPv4 unicast routes = 0; want >0; summary: %+v, %+v", ifStats, uniStats)
    	}
    	// Test the existence of connected unicast routes for IPv6.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  6. pilot/pkg/model/context.go

    func (node *Proxy) DiscoverIPMode() {
    	node.ipMode = pm.DiscoverIPMode(node.IPAddresses)
    	node.GlobalUnicastIP = networkutil.GlobalUnicastIP(node.IPAddresses)
    }
    
    // SupportsIPv4 returns true if proxy supports IPv4 addresses.
    func (node *Proxy) SupportsIPv4() bool {
    	return node.ipMode == IPv4 || node.ipMode == Dual
    }
    
    // SupportsIPv6 returns true if proxy supports IPv6 addresses.
    func (node *Proxy) SupportsIPv6() bool {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 03 08:29:05 UTC 2024
    - 33.6K bytes
    - Viewed (0)
  7. src/net/error_test.go

    		t.Logf("%s: error as expected: %v", network, err)
    	}
    }
    
    func TestDialAddrError(t *testing.T) {
    	switch runtime.GOOS {
    	case "plan9":
    		t.Skipf("not supported on %s", runtime.GOOS)
    	}
    
    	if !supportsIPv4() || !supportsIPv6() {
    		t.Skip("both IPv4 and IPv6 are required")
    	}
    
    	for _, tt := range []struct {
    		network string
    		lit     string
    		addr    *TCPAddr
    	}{
    		{"tcp4", "::1", nil},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  8. pilot/pkg/model/service.go

    			if len(addresses) > 0 {
    				return addresses[0]
    			}
    		}
    
    		if node.Metadata.DNSCapture && node.Metadata.DNSAutoAllocate && s.DefaultAddress == constants.UnspecifiedIP {
    			if node.SupportsIPv4() && s.AutoAllocatedIPv4Address != "" {
    				return s.AutoAllocatedIPv4Address
    			}
    			if node.SupportsIPv6() && s.AutoAllocatedIPv6Address != "" {
    				return s.AutoAllocatedIPv6Address
    			}
    		}
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 02:03:58 UTC 2024
    - 46.3K bytes
    - Viewed (0)
Back to top