xdp

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BPF_ANY     = C.BPF_ANY
	BPF_NOEXIST = C.BPF_NOEXIST
	BPF_EXIST   = C.BPF_EXIST
)

Variables

This section is empty.

Functions

func BpfMapDeleteElem

func BpfMapDeleteElem(i int, k unsafe.Pointer) int

func BpfMapLookupAndDeleteElem

func BpfMapLookupAndDeleteElem(i int, k, v unsafe.Pointer) int

func BpfMapLookupElem

func BpfMapLookupElem(i int, k, v unsafe.Pointer) int

func BpfMapUpdateElem

func BpfMapUpdateElem(i int, k, v unsafe.Pointer, flags uint64) int

func BpfNumPossibleCpus

func BpfNumPossibleCpus() int

func KtimeGet added in v0.1.16

func KtimeGet() uint64

Types

type XDP

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

func LoadBpfFile

func LoadBpfFile(veth string, bindata []byte, program string, native bool, peth ...string) (*XDP, error)

func LoadBpfFile_

func LoadBpfFile_(bindata []byte, p1, p2 string, native bool, vetha, vethb string, eth ...string) (*XDP, error)

func LoadBpfProgram

func LoadBpfProgram(bindata []byte) (*XDP, error)

func Simple

func Simple(iface string, bindata []byte, program string) (*XDP, error)

func XDPTest

func XDPTest(bindata []byte, program string, native bool, nic string, p2, n2 string) (*XDP, error)

func (*XDP) CheckMap

func (x *XDP) CheckMap(i int, ks, vs int) bool

func (*XDP) FindMap

func (x *XDP) FindMap(m string, l ...int) int

func (*XDP) LoadBpfFile__

func (xdp *XDP) LoadBpfFile__(bindata []byte, p1, p2 string, native bool, vetha, vethb string, eth ...string) error

func (*XDP) LoadBpfSection

func (xdp *XDP) LoadBpfSection(p1 string, native bool, eth string) error

Jump to

Keyboard shortcuts

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