Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for supportsIPv4map (0.14 sec)

  1. src/net/sockopt_bsd.go

    		case syscall.AF_INET6:
    			syscall.SetsockoptInt(s, syscall.IPPROTO_IPV6, syscall.IPV6_PORTRANGE, syscall.IPV6_PORTRANGE_HIGH)
    		}
    	}
    	if family == syscall.AF_INET6 && sotype != syscall.SOCK_RAW && supportsIPv4map() {
    		// Allow both IP versions even if the OS default
    		// is otherwise. Note that some operating systems
    		// never admit this option.
    		syscall.SetsockoptInt(s, syscall.IPPROTO_IPV6, syscall.IPV6_V6ONLY, boolint(ipv6only))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  2. src/net/listen_test.go

    	for _, tt := range dualStackTCPListenerTests {
    		if !testableListenArgs(tt.network1, JoinHostPort(tt.address1, "0"), "") {
    			t.Logf("skipping %s test", tt.network1+" "+tt.address1)
    			continue
    		}
    
    		if !supportsIPv4map() && differentWildcardAddr(tt.address1, tt.address2) {
    			tt.xerr = nil
    		}
    		var firstErr, secondErr error
    		for i := 0; i < 5; i++ {
    			lns, err := newDualStackListener()
    			if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 20.5K bytes
    - Viewed (0)
  3. src/net/ipsock.go

    // functionality.
    func supportsIPv6() bool {
    	ipStackCaps.Once.Do(ipStackCaps.probe)
    	return ipStackCaps.ipv6Enabled
    }
    
    // supportsIPv4map reports whether the platform supports mapping an
    // IPv4 address inside an IPv6 address at transport layer
    // protocols. See RFC 4291, RFC 4038 and RFC 3493.
    func supportsIPv4map() bool {
    	// Some operating systems provide no support for mapping IPv4
    	// addresses to IPv6, and a runtime check is unnecessary.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  4. src/net/platform_test.go

    			return false
    		}
    		if !supportsIPv6() && cip.To16() != nil && cip.To4() == nil {
    			return false
    		}
    	}
    
    	// Test functionality of IPv4 communication using AF_INET6
    	// sockets.
    	if !supportsIPv4map() && supportsIPv4() && (network == "tcp" || network == "udp" || network == "ip") && wildcard {
    		// At this point, we prefer IPv4 when ip is nil.
    		// See favoriteAddrFamily for further information.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  5. src/net/ipsock_posix.go

    	switch network[len(network)-1] {
    	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
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  6. src/net/dial_test.go

    }
    
    func TestProhibitionaryDialArg(t *testing.T) {
    	testenv.MustHaveExternalNetwork(t)
    
    	switch runtime.GOOS {
    	case "plan9":
    		t.Skipf("not supported on %s", runtime.GOOS)
    	}
    	if !supportsIPv4map() {
    		t.Skip("mapping ipv4 address inside ipv6 address not supported")
    	}
    
    	ln, err := Listen("tcp", "[::]:0")
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer ln.Close()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 30.3K bytes
    - Viewed (0)
Back to top