bpf

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	XDP_ABORTED uint32 = iota
	XDP_DROP
	XDP_PASS
	XDP_TX
	XDP_REDIRECT
)

Variables

View Source
var Srv6LayerType = gopacket.RegisterLayerType(
	2001,
	gopacket.LayerTypeMetadata{
		Name:    "Srv6LayerType",
		Decoder: gopacket.DecodeFunc(decodeSrv6Layer),
	},
)

Functions

func PrintEntrys

func PrintEntrys(entry XdpProbeData, count uint64)

func ReadXdpObjects

func ReadXdpObjects(ops *ebpf.CollectionOptions) (*xdpObjects, error)

Types

type Srv6Layer

type Srv6Layer struct {
	layers.BaseLayer
	NextHeader   uint8
	HdrExtLen    uint8
	RoutingType  uint8
	SegmentsLeft uint8
	LastEntry    uint8
	Flags        uint8
	Tag          uint16
	Segments     []net.IP
}

func (*Srv6Layer) DecodeFromBytes

func (i *Srv6Layer) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error

func (*Srv6Layer) LayerType

func (l *Srv6Layer) LayerType() gopacket.LayerType

func (*Srv6Layer) NextLayerType

func (i *Srv6Layer) NextLayerType() gopacket.LayerType

func (*Srv6Layer) SerializeTo

type XdpProbeData

type XdpProbeData struct {
	H_dest   [6]uint8
	H_source [6]uint8
	H_proto  uint16

	V6Srcaddr    struct{ In6U struct{ U6Addr8 [16]uint8 } }
	V6Dstaddr    struct{ In6U struct{ U6Addr8 [16]uint8 } }
	NextHdr      uint8
	HdrExtLen    uint8
	RoutingType  uint8
	SegmentsLeft uint8
	LastEntry    uint8
	Flags        uint8
	Tag          uint16
	Segments     [10]struct{ In6U struct{ U6Addr8 [16]uint8 } }
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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