Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 122 for AF_INET6 (0.29 sec)

  1. src/net/ipsock_posix.go

    		probes = probes[:1]
    	}
    	for i := range probes {
    		s, err := sysSocket(syscall.AF_INET6, syscall.SOCK_STREAM, syscall.IPPROTO_TCP)
    		if err != nil {
    			continue
    		}
    		defer poll.CloseFunc(s)
    		syscall.SetsockoptInt(s, syscall.IPPROTO_IPV6, syscall.IPV6_V6ONLY, probes[i].value)
    		sa, err := probes[i].laddr.sockaddr(syscall.AF_INET6)
    		if err != nil {
    			continue
    		}
    		if err := syscall.Bind(s, sa); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. src/net/main_posix_test.go

    			}
    		case "tcp6":
    			if so.Cookie.Family() == syscall.AF_INET6 && so.Cookie.Type() == syscall.SOCK_STREAM {
    				return nil, syscall.EHOSTUNREACH
    			}
    		case "udp6":
    			if so.Cookie.Family() == syscall.AF_INET6 && so.Cookie.Type() == syscall.SOCK_DGRAM {
    				return nil, syscall.EHOSTUNREACH
    			}
    		case "ip6":
    			if so.Cookie.Family() == syscall.AF_INET6 && so.Cookie.Type() == syscall.SOCK_RAW {
    				return nil, syscall.EHOSTUNREACH
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  3. src/net/udpsock_posix.go

    	}
    	return nil
    }
    
    func (a *UDPAddr) family() int {
    	if a == nil || len(a.IP) <= IPv4len {
    		return syscall.AF_INET
    	}
    	if a.IP.To4() != nil {
    		return syscall.AF_INET
    	}
    	return syscall.AF_INET6
    }
    
    func (a *UDPAddr) sockaddr(family int) (syscall.Sockaddr, error) {
    	if a == nil {
    		return nil, nil
    	}
    	return ipToSockaddr(family, a.IP, a.Port, a.Zone)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:54:32 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. src/net/internal/socktest/main_test.go

    }
    
    func TestSwitch(t *testing.T) {
    	const N = 10
    	var wg sync.WaitGroup
    	wg.Add(N)
    	for i := 0; i < N; i++ {
    		go func() {
    			defer wg.Done()
    			for _, family := range []int{syscall.AF_INET, syscall.AF_INET6} {
    				socketFunc(family, syscall.SOCK_STREAM, syscall.IPPROTO_TCP)
    			}
    		}()
    	}
    	wg.Wait()
    }
    
    func TestSocket(t *testing.T) {
    	for _, f := range []socktest.Filter{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 18:36:30 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  5. src/net/sockopt_windows.go

    // license that can be found in the LICENSE file.
    
    package net
    
    import (
    	"os"
    	"syscall"
    )
    
    func setDefaultSockopts(s syscall.Handle, family, sotype int, ipv6only bool) error {
    	if family == syscall.AF_INET6 && sotype != syscall.SOCK_RAW {
    		// Allow both IP versions even if the OS default
    		// is otherwise. Note that some operating systems
    		// never admit this option.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 09 00:33:27 UTC 2020
    - 1.5K bytes
    - Viewed (0)
  6. src/net/cgo_unix_syscall.go

    //go:build !netgo && darwin
    
    package net
    
    import (
    	"internal/syscall/unix"
    	"runtime"
    	"syscall"
    	"unsafe"
    )
    
    const (
    	_C_AF_INET      = syscall.AF_INET
    	_C_AF_INET6     = syscall.AF_INET6
    	_C_AF_UNSPEC    = syscall.AF_UNSPEC
    	_C_EAI_AGAIN    = unix.EAI_AGAIN
    	_C_EAI_NONAME   = unix.EAI_NONAME
    	_C_EAI_SERVICE  = unix.EAI_SERVICE
    	_C_EAI_NODATA   = unix.EAI_NODATA
    	_C_EAI_OVERFLOW = unix.EAI_OVERFLOW
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 07 23:50:56 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. src/net/listen_test.go

    		// and IPv6 IPv4-mapping capability, we can assume
    		// that the node listens on a wildcard address with an
    		// AF_INET6 socket.
    		if supportsIPv4map() && fd.laddr.(*TCPAddr).isWildcard() {
    			if fd.family != syscall.AF_INET6 {
    				return fmt.Errorf("Listen(%s, %v) returns %v; want %v", fd.net, fd.laddr, fd.family, syscall.AF_INET6)
    			}
    		} else {
    			if fd.family != a.family() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 20.5K bytes
    - Viewed (0)
  8. src/net/sockopt_bsd.go

    		switch family {
    		case syscall.AF_INET:
    			syscall.SetsockoptInt(s, syscall.IPPROTO_IP, syscall.IP_PORTRANGE, syscall.IP_PORTRANGE_HIGH)
    		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
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  9. src/vendor/golang.org/x/net/lif/address.go

    	PrefixLen int      // address prefix length
    	ZoneID    int      // zone identifier
    }
    
    // Family implements the Family method of Addr interface.
    func (a *Inet6Addr) Family() int { return syscall.AF_INET6 }
    
    // Addrs returns a list of interface addresses.
    //
    // The provided af must be an address family and name must be a data
    // link name. The zero value of af or name means a wildcard.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  10. src/vendor/golang.org/x/net/nettest/nettest_unix.go

    //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
    
    package nettest
    
    import "syscall"
    
    func supportsRawSocket() bool {
    	for _, af := range []int{syscall.AF_INET, syscall.AF_INET6} {
    		s, err := syscall.Socket(af, syscall.SOCK_RAW, 0)
    		if err != nil {
    			continue
    		}
    		syscall.Close(s)
    		return true
    	}
    	return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 526 bytes
    - Viewed (0)
Back to top