Documentation ¶
Overview ¶
Package rawfile contains utilities for using the netstack with raw host files on Linux hosts.
Index ¶
- func BlockingPoll(fds *PollEvent, nfds int, timeout *unix.Timespec) (int, unix.Errno)
- func BlockingRead(fd int, b []byte) (int, tcpip.Error)
- func BlockingReadv(fd int, iovecs []unix.Iovec) (int, tcpip.Error)
- func BlockingRecvMMsg(fd int, msgHdrs []MMsgHdr) (int, tcpip.Error)
- func GetMTU(name string) (uint32, error)
- func NonBlockingSendMMsg(fd int, msgHdrs []MMsgHdr) (int, tcpip.Error)
- func NonBlockingWrite(fd int, buf []byte) tcpip.Error
- func NonBlockingWriteIovec(fd int, iovec []unix.Iovec) tcpip.Error
- func TranslateErrno(e unix.Errno) tcpip.Error
- type MMsgHdr
- type PollEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockingPoll ¶
BlockingPoll on amd64/arm64 makes the ppoll() syscall while calling the version of entersyscall that relinquishes the P so that other Gs can run. This is meant to be called in cases when the syscall is expected to block. On non amd64/arm64 platforms it just forwards to the ppoll() system call.
func BlockingRead ¶
BlockingRead reads from a file descriptor that is set up as non-blocking. If no data is available, it will block in a poll() syscall until the file descriptor becomes readable.
func BlockingReadv ¶
BlockingReadv reads from a file descriptor that is set up as non-blocking and stores the data in a list of iovecs buffers. If no data is available, it will block in a poll() syscall until the file descriptor becomes readable.
func BlockingRecvMMsg ¶
BlockingRecvMMsg reads from a file descriptor that is set up as non-blocking and stores the received messages in a slice of MMsgHdr structures. If no data is available, it will block in a poll() syscall until the file descriptor becomes readable.
func NonBlockingSendMMsg ¶
NonBlockingSendMMsg sends multiple messages on a socket.
func NonBlockingWrite ¶
NonBlockingWrite writes the given buffer to a file descriptor. It fails if partial data is written.
func NonBlockingWriteIovec ¶
NonBlockingWriteIovec writes iovec to a file descriptor in a single unix. It fails if partial data is written.