Source file src/internal/syscall/unix/net.go

     1  // Copyright 2021 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 unix
     6  
     7  package unix
     8  
     9  import (
    10  	"syscall"
    11  	_ "unsafe"
    12  )
    13  
    14  //go:linkname RecvfromInet4 syscall.recvfromInet4
    15  //go:noescape
    16  func RecvfromInet4(fd int, p []byte, flags int, from *syscall.SockaddrInet4) (int, error)
    17  
    18  //go:linkname RecvfromInet6 syscall.recvfromInet6
    19  //go:noescape
    20  func RecvfromInet6(fd int, p []byte, flags int, from *syscall.SockaddrInet6) (n int, err error)
    21  
    22  //go:linkname SendtoInet4 syscall.sendtoInet4
    23  //go:noescape
    24  func SendtoInet4(fd int, p []byte, flags int, to *syscall.SockaddrInet4) (err error)
    25  
    26  //go:linkname SendtoInet6 syscall.sendtoInet6
    27  //go:noescape
    28  func SendtoInet6(fd int, p []byte, flags int, to *syscall.SockaddrInet6) (err error)
    29  
    30  //go:linkname SendmsgNInet4 syscall.sendmsgNInet4
    31  //go:noescape
    32  func SendmsgNInet4(fd int, p, oob []byte, to *syscall.SockaddrInet4, flags int) (n int, err error)
    33  
    34  //go:linkname SendmsgNInet6 syscall.sendmsgNInet6
    35  //go:noescape
    36  func SendmsgNInet6(fd int, p, oob []byte, to *syscall.SockaddrInet6, flags int) (n int, err error)
    37  
    38  //go:linkname RecvmsgInet4 syscall.recvmsgInet4
    39  //go:noescape
    40  func RecvmsgInet4(fd int, p, oob []byte, flags int, from *syscall.SockaddrInet4) (n, oobn int, recvflags int, err error)
    41  
    42  //go:linkname RecvmsgInet6 syscall.recvmsgInet6
    43  //go:noescape
    44  func RecvmsgInet6(fd int, p, oob []byte, flags int, from *syscall.SockaddrInet6) (n, oobn int, recvflags int, err error)
    45  

View as plain text