bpf

package
v0.0.0-...-987032a Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SockFilter = "sock_filter.o"
	TcPktMap   = "/sys/fs/bpf/tc/globals/my_pkt"
)

Variables

This section is empty.

Functions

func Load

func Load(ifaceName string, port uint16) error

Types

type EventKey

type EventKey struct {
	Seq   uint8
	Sport uint16
	Dport uint16
	Saddr uint32
	Daddr uint32
}

type EventValue

type EventValue struct {
	// tcp payload offset
	Offset  uint32
	PktLen  uint32
	ClassId uint32
}

type Objs

type Objs struct {
	Prog         *ebpf.Program `ebpf:"sql_filter"`
	TailProg1    *ebpf.Program `ebpf:"sql_filter_1"`
	FilterHelper *ebpf.Map     `ebpf:"filter_helper"`
	Buf          *ebpf.Map     `ebpf:"buf"`
	JmpTable     *ebpf.Map     `ebpf:"jmp_table"`
	MyPkt        *ebpf.Map     `ebpf:"my_pkt"`
	MyPktEvt     *ebpf.Map     `ebpf:"my_pkt_evt"`
}

Jump to

Keyboard shortcuts

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