xdp

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadBpfObjects

func LoadBpfObjects(obj interface{}, opts *ebpf.CollectionOptions) error

loadBpfObjects loads bpf and converts it into a struct.

The following types are suitable as obj argument:

*bpfObjects
*bpfPrograms
*bpfMaps

See ebpf.CollectionSpec.LoadAndAssign documentation for details.

Types

type BpfObjects

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

bpfObjects contains all objects after they have been loaded into the kernel.

It can be passed to loadBpfObjects or ebpf.CollectionSpec.LoadAndAssign.

func (*BpfObjects) Close

func (o *BpfObjects) Close() error

type BpfPktEvent

type BpfPktEvent struct {
	Timestamp     uint64
	PktLen        uint32
	PktOffset     uint32
	IpVersion     uint16
	IpProto       uint16
	PayloadOffset uint16
	SrcAddr       uint32
	SrcAddr6      [4]uint32
	SrcPort       uint16
	DstAddr       uint32
	DstAddr6      [4]uint32
	DstPort       uint16
}

Jump to

Keyboard shortcuts

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