package
0.0.0-20240720002214-37b2b8227b91
Repository: https://github.com/progrium/go-netstack.git
Documentation: pkg.go.dev

# Functions

BlockFromSafePointer returns a Block equivalent to [ptr, ptr+length), which is safe to access without safecopy.
BlockFromSafeSlice returns a Block equivalent to slice, which is safe to access without safecopy.
BlockFromUnsafePointer returns a Block equivalent to [ptr, ptr+len), which is not safe to access without safecopy.
BlockFromUnsafeSlice returns a Block equivalent to bs, which is not safe to access without safecopy.
BlockSeqFromSlice returns a BlockSeq representing all Blocks in slice.
BlockSeqOf returns a BlockSeq representing the single Block b.
CompareAndSwapUint32 invokes safecopy.CompareAndSwapUint32 on the first 4 bytes of b.
Copy copies src.Len() or dst.Len() bytes, whichever is less, from src to dst and returns the number of bytes copied.
CopySeq copies srcs.NumBytes() or dsts.NumBytes() bytes, whichever is less, from srcs to dsts and returns the number of bytes copied.
IovecsFromBlockSeq returns a []unix.Iovec representing seq.
LoadUint32 invokes safecopy.LoadUint32 on the first 4 bytes of b.
ReadFullToBlocks repeatedly invokes r.ReadToBlocks until dsts.NumBytes() bytes have been read or ReadToBlocks returns an error.
SwapUint32 invokes safecopy.SwapUint32 on the first 4 bytes of b.
SwapUint64 invokes safecopy.SwapUint64 on the first 8 bytes of b.
WriteFullFromBlocks repeatedly invokes w.WriteFromBlocks until srcs.NumBytes() bytes have been written or WriteFromBlocks returns an error.
Zero sets all bytes in dst to 0 and returns the number of bytes zeroed.
ZeroSeq sets all bytes in dsts to 0 and returns the number of bytes zeroed.

# Variables

ErrEndOfBlockSeq is returned by BlockSeqWriter when attempting to write beyond the end of the BlockSeq.

# Structs

A Block is a range of contiguous bytes, similar to []byte but with the following differences: - The memory represented by a Block may require the use of safecopy to access.
A BlockSeq represents a sequence of Blocks, each of which has non-zero length.
BlockSeqReader implements Reader by reading from a BlockSeq.
BlockSeqWriter implements Writer by writing to a BlockSeq.
FromIOReader implements Reader for an io.Reader by repeatedly invoking io.Reader.Read until it returns an error or partial read.
FromIOWriter implements Writer for an io.Writer by repeatedly invoking io.Writer.Write until it returns an error or partial write.
FromVecReaderFunc implements Reader for a function that reads data into a [][]byte and returns the number of bytes read as an int64.
FromVecWriterFunc implements Writer for a function that writes data from a [][]byte and returns the number of bytes written.
ToIOReader implements io.Reader for a (safemem.)Reader.
ToIOWriter implements io.Writer for a (safemem.)Writer.

# Interfaces

Reader represents a streaming byte source like io.Reader.
Writer represents a streaming byte sink like io.Writer.

# Type aliases

ReaderFunc implements Reader for a function with the semantics of Reader.ReadToBlocks.
WriterFunc implements Writer for a function with the semantics of Writer.WriteFromBlocks.