dataplane

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Packet

type Packet C.struct_packet

func NewPacketFromData

func NewPacketFromData(data PacketData) (*Packet, error)

func NewPacketFromSegments

func NewPacketFromSegments(segments [][]byte, txDeviceId, rxDeviceId uint16) (*Packet, error)

NewPacketFromSegments builds a chained (multi-segment) packet from the given segments, copied in order into separate tightly-sized mbuf segments.

Each element of segments becomes one mbuf segment allocated at exactly that segment's length, so an over-read past a segment boundary is detectable by AddressSanitizer. parse_packet is run on the assembled head mbuf. Returns an error if segments is empty, the total payload is zero, or the underlying C call fails.

func (*Packet) Data

func (packet *Packet) Data() PacketData

func (*Packet) Free

func (packet *Packet) Free()

func (*Packet) Info

func (packet *Packet) Info() *framework.PacketInfo

func (*Packet) Next

func (packet *Packet) Next() *Packet

type PacketData

type PacketData struct {
	Payload    []uint8
	TxDeviceId uint16
	RxDeviceId uint16
}

func NewPacketData

func NewPacketData(txDeviceId uint16, rxDeviceId uint16, packet gopacket.Packet) PacketData

func PacketsData

func PacketsData(txDeviceId uint16, rxDeviceId uint16, packets ...gopacket.Packet) []PacketData

type PacketFront

type PacketFront C.struct_packet_front

func NewPacketFront

func NewPacketFront(
	pinner *runtime.Pinner,
	input *PacketList,
	output *PacketList,
	drop *PacketList,
) *PacketFront

func NewPacketFrontFromPackets

func NewPacketFrontFromPackets(pinner *runtime.Pinner, packets ...gopacket.Packet) (*PacketFront, error)

func NewPacketFrontFromPayload

func NewPacketFrontFromPayload(pinner *runtime.Pinner, payload [][]byte) (*PacketFront, error)

func (*PacketFront) DropList

func (pf *PacketFront) DropList() *PacketList

func (*PacketFront) Free

func (pf *PacketFront) Free()

func (*PacketFront) InputList

func (pf *PacketFront) InputList() *PacketList

func (*PacketFront) OutputList

func (pf *PacketFront) OutputList() *PacketList

func (*PacketFront) Payload

func (pf *PacketFront) Payload() PacketFrontPayload

type PacketFrontPayload

type PacketFrontPayload struct {
	Output [][]byte
	Input  [][]byte
	Drop   [][]byte
}

type PacketList

type PacketList C.struct_packet_list

func NewPacketList

func NewPacketList(pinner *runtime.Pinner, packets []*Packet) *PacketList

func NewPacketListFromData

func NewPacketListFromData(pinner *runtime.Pinner, data ...PacketData) (*PacketList, error)

func NewPacketListFromPackets

func NewPacketListFromPackets(pinner *runtime.Pinner, packets ...gopacket.Packet) (*PacketList, error)

func (*PacketList) Add

func (packetList *PacketList) Add(packet *Packet)

func (*PacketList) Count

func (packetList *PacketList) Count() int

func (*PacketList) Data

func (packetList *PacketList) Data() []PacketData

func (*PacketList) First

func (packetList *PacketList) First() *Packet

func (*PacketList) Free

func (packetList *PacketList) Free()

func (*PacketList) Info

func (packetList *PacketList) Info() []*framework.PacketInfo

Jump to

Keyboard shortcuts

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