rawfile

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockingRead

func BlockingRead(fd int, b []byte) (int, *tcpip.Error)

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 descirptor becomes readable.

func BlockingReadv

func BlockingReadv(fd int, iovecs []syscall.Iovec) (int, *tcpip.Error)

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 descirptor becomes readable.

func GetMTU

func GetMTU(name string) (uint32, error)

GetMTU determines the MTU of a network interface device.

func NonBlockingWrite

func NonBlockingWrite(fd int, buf []byte) *tcpip.Error

NonBlockingWrite writes the given buffer to a file descriptor. It fails if partial data is written.

func NonBlockingWrite2

func NonBlockingWrite2(fd int, b1, b2 []byte) *tcpip.Error

NonBlockingWrite2 writes up to two byte slices to a file descriptor in a single syscall. It fails if partial data is written.

func TranslateErrno

func TranslateErrno(e syscall.Errno) *tcpip.Error

TranslateErrno translate an errno from the syscall package into a *tcpip.Error.

Valid, but unreconigized errnos will be translated to tcpip.ErrInvalidEndpointState (EINVAL). Panics on invalid errnos.

Types

This section is empty.

Jump to

Keyboard shortcuts

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