golang.org/x/net@v0.25.1-0.20240516223405-c87a5b62e243/internal/socket/sys_stub.go (about)

     1  // Copyright 2017 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
     6  
     7  package socket
     8  
     9  import "net"
    10  
    11  const (
    12  	sysAF_UNSPEC = 0x0
    13  	sysAF_INET   = 0x2
    14  	sysAF_INET6  = 0xa
    15  
    16  	sysSOCK_RAW = 0x3
    17  
    18  	sizeofSockaddrInet4 = 0x10
    19  	sizeofSockaddrInet6 = 0x1c
    20  )
    21  
    22  func marshalInetAddr(ip net.IP, port int, zone string) []byte {
    23  	return nil
    24  }
    25  
    26  func parseInetAddr(b []byte, network string) (net.Addr, error) {
    27  	return nil, errNotImplemented
    28  }
    29  
    30  func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
    31  	return 0, errNotImplemented
    32  }
    33  
    34  func setsockopt(s uintptr, level, name int, b []byte) error {
    35  	return errNotImplemented
    36  }
    37  
    38  func recvmsg(s uintptr, buffers [][]byte, oob []byte, flags int, network string) (n, oobn int, recvflags int, from net.Addr, err error) {
    39  	return 0, 0, 0, nil, errNotImplemented
    40  }
    41  
    42  func sendmsg(s uintptr, buffers [][]byte, oob []byte, to net.Addr, flags int) (int, error) {
    43  	return 0, errNotImplemented
    44  }
    45  
    46  func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
    47  	return 0, errNotImplemented
    48  }
    49  
    50  func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
    51  	return 0, errNotImplemented
    52  }