fifo

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FifoStats

type FifoStats struct {
	// contains filtered or unexported fields
}

func MakeFifoStats

func MakeFifoStats(depth uint32) FifoStats

func (*FifoStats) Reads

func (s *FifoStats) Reads(batchSize uint32) *tcpip.StatCounter

func (*FifoStats) Size

func (s *FifoStats) Size() uint32

func (*FifoStats) Writes

func (s *FifoStats) Writes(batchSize uint32) *tcpip.StatCounter

type MappedVMO

type MappedVMO struct {
	// contains filtered or unexported fields
}

MappedVMO own a VMO and its mapping into process memory. It provides common operations for memory mapped VMOs. Closing it will cause the mapped region to be unmapped.

func MapVMO

func MapVMO(vmo zx.VMO) (MappedVMO, error)

MapVMO maps a vmo into the process' memory space. It does not take ownership of the VMO.

func NewMappedVMO

func NewMappedVMO(size uint64, name string) (MappedVMO, zx.VMO, error)

NewMappedVMO creates a new VMO the given name and size, in bytes, and maps it to the process' memory space.

func (*MappedVMO) Close

func (vmo *MappedVMO) Close() error

Close unmaps the mapped VMO region and closes the VMO object.

func (*MappedVMO) GetData

func (vmo *MappedVMO) GetData(offset, len uint64) []byte

GetData returns a slice view into the mapped VMO with offset and length. If the provided range is not within bounds of the VMO, GetData panics.

func (*MappedVMO) GetPointer

func (vmo *MappedVMO) GetPointer(offset uint64) unsafe.Pointer

GetPointer returns a pointer to the mapped VMO at offset. If the offset is not within bounds of the mapped VMO, GetPointer panics.

func (*MappedVMO) Len

func (vmo *MappedVMO) Len() uint64

Len returns the length of the VMO.

type RxStats

type RxStats struct {
	FifoStats
}

type TxStats

type TxStats struct {
	FifoStats
	Drops tcpip.StatCounter
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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