netutils

package
v0.0.0-...-288c4de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const UnixFdsAcceptExact uint = C.UNIX_FDS_ACCEPT_EXACT

UnixFdsAcceptExact will only succeed if the exact amount of fds has been received (unless combined with UNIX_FDS_ACCEPT_NONE).

View Source
const UnixFdsAcceptLess uint = C.UNIX_FDS_ACCEPT_LESS

UnixFdsAcceptLess will also succeed if less than the requested number of fd has been received. If the UNIX_FDS_ACCEPT_NONE flag is not raised than at least one fd must be received.

View Source
const UnixFdsAcceptMask uint = C.UNIX_FDS_ACCEPT_MASK

UnixFdsAcceptMask is the value of all the above flags or-ed together.

View Source
const UnixFdsAcceptMore uint = C.UNIX_FDS_ACCEPT_MORE

UnixFdsAcceptMore will also succeed if more than the requested number of fds have been received. Any additional fds will be silently closed. If the UNIX_FDS_ACCEPT_NONE flag is not raised than at least one fd must be received.

View Source
const UnixFdsAcceptNone uint = C.UNIX_FDS_ACCEPT_NONE

UnixFdsAcceptNone can be specified with any of the above flags and indicates that the caller will accept no file descriptors to be received.

View Source
const UnixFdsReceivedExact uint = C.UNIX_FDS_RECEIVED_EXACT

UnixFdsReceivedExact indicates that the exact number of fds was received.

View Source
const UnixFdsReceivedLess uint = C.UNIX_FDS_RECEIVED_LESS

UnixFdsReceivedLess indicates that less than the requested number of fd has been received.

View Source
const UnixFdsReceivedMore uint = C.UNIX_FDS_RECEIVED_MORE

UnixFdsReceivedMore indicates that more than the requested number of fd has been received.

View Source
const UnixFdsReceivedNone uint = C.UNIX_FDS_RECEIVED_NONE

UnixFdsReceivedNone indicates that no fds have been received.

Variables

This section is empty.

Functions

func AbstractUnixReceiveFd

func AbstractUnixReceiveFd(sockFD int, flags uint) (*os.File, error)

AbstractUnixReceiveFd receives a Unix file descriptor from a Unix socket.

func AbstractUnixReceiveFdData

func AbstractUnixReceiveFdData(sockFD int, numFds int, flags uint, iov unsafe.Pointer, iovLen int32) (uint64, []C.int, error)

AbstractUnixReceiveFdData is a low level function to receive a file descriptor over a unix socket.

func AbstractUnixSendFd

func AbstractUnixSendFd(sockFD int, sendFD int) error

AbstractUnixSendFd sends a Unix file descriptor over a Unix socket.

func NetnsGetifaddrs

func NetnsGetifaddrs(initPID int32, hostInterfaces []net.Interface) (map[string]api.InstanceStateNetwork, error)

NetnsGetifaddrs returns a map of InstanceStateNetwork for a particular process.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL