tap

package
v0.0.0-...-8fa78e2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	Mtu     int
	Pktmbuf *pktmbuf.Pktmbuf
}

type SwxPortTapParams

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

func (*SwxPortTapParams) FreeParams

func (e *SwxPortTapParams) FreeParams()

func (*SwxPortTapParams) GetReaderParams

func (e *SwxPortTapParams) GetReaderParams() unsafe.Pointer

func (*SwxPortTapParams) GetWriterParams

func (e *SwxPortTapParams) GetWriterParams() unsafe.Pointer

func (*SwxPortTapParams) PortName

func (e *SwxPortTapParams) PortName() string

func (*SwxPortTapParams) PortType

func (e *SwxPortTapParams) PortType() string

type Tap

type Tap struct {
	*device.Device
	// contains filtered or unexported fields
}

Tap represents a Tap record stored in a tap store

func (*Tap) BindToPipelineInputPort

func (tap *Tap) BindToPipelineInputPort(pl *pipeline.Pipeline, portID int, rxq uint16, bsz uint) error

bind to given pipeline input port. A tap has 1 queue so only queue number 0 is valid.

func (*Tap) BindToPipelineOutputPort

func (tap *Tap) BindToPipelineOutputPort(pl *pipeline.Pipeline, portID int, txq uint16, bsz uint) error

bind to given pipeline output port. A tap has 1 queue so only queue number 0 is valid.

func (*Tap) Fd

func (tap *Tap) Fd() C.int

Fd returns the File descripter of the Tap interface

func (*Tap) Free

func (tap *Tap) Free() error

Free deletes the current Tap record and calls the clean callback function given at init

func (*Tap) Init

func (tap *Tap) Init(name string, params *Params, clean func()) error

Create Tap interface. Returns a pointer to a Tap structure or nil with error.

func (*Tap) Type

func (tap *Tap) Type() string

Jump to

Keyboard shortcuts

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