Documentation ¶
Index ¶
- Constants
- func AbstractUnixReceiveFd(sockFD int, flags uint) (*os.File, error)
- func AbstractUnixReceiveFdData(sockFD int, numFds int, flags uint, iov unsafe.Pointer, iovLen int32) (uint64, []C.int, error)
- func AbstractUnixSendFd(sockFD int, sendFD int) error
- func NetnsGetifaddrs(initPID int32, hostInterfaces []net.Interface) (map[string]api.InstanceStateNetwork, error)
Constants ¶
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).
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.
const UnixFdsAcceptMask uint = C.UNIX_FDS_ACCEPT_MASK
UnixFdsAcceptMask is the value of all the above flags or-ed together.
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.
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.
const UnixFdsReceivedExact uint = C.UNIX_FDS_RECEIVED_EXACT
UnixFdsReceivedExact indicates that the exact number of fds was received.
const UnixFdsReceivedLess uint = C.UNIX_FDS_RECEIVED_LESS
UnixFdsReceivedLess indicates that less than the requested number of fd has been received.
const UnixFdsReceivedMore uint = C.UNIX_FDS_RECEIVED_MORE
UnixFdsReceivedMore indicates that more than the requested number of fd has been received.
const UnixFdsReceivedNone uint = C.UNIX_FDS_RECEIVED_NONE
UnixFdsReceivedNone indicates that no fds have been received.
Variables ¶
This section is empty.
Functions ¶
func AbstractUnixReceiveFd ¶
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 ¶
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.