bpf

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package bpf provides Go skeletons containing BPF programs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadProbes

func LoadProbes() (*ebpf.CollectionSpec, error)

LoadProbes returns the embedded CollectionSpec for Probes.

func LoadProbesObjects

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

LoadProbesObjects loads Probes and converts it into a struct.

The following types are suitable as obj argument:

*ProbesObjects
*ProbesPrograms
*ProbesMaps

See ebpf.CollectionSpec.LoadAndAssign documentation for details.

func LoadSockTerm

func LoadSockTerm() (*ebpf.CollectionSpec, error)

LoadSockTerm returns the embedded CollectionSpec for SockTerm.

func LoadSockTermObjects

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

LoadSockTermObjects loads SockTerm and converts it into a struct.

The following types are suitable as obj argument:

*SockTermObjects
*SockTermPrograms
*SockTermMaps

See ebpf.CollectionSpec.LoadAndAssign documentation for details.

Types

type ProbesMapSpecs

type ProbesMapSpecs struct {
}

ProbesMapSpecs contains maps before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type ProbesMaps

type ProbesMaps struct {
}

ProbesMaps contains all maps after they have been loaded into the kernel.

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

func (*ProbesMaps) Close

func (m *ProbesMaps) Close() error

type ProbesObjects

type ProbesObjects struct {
	ProbesPrograms
	ProbesMaps
	ProbesVariables
}

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

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

func (*ProbesObjects) Close

func (o *ProbesObjects) Close() error

type ProbesProgramSpecs

type ProbesProgramSpecs struct {
	ProbeFibLookupSkipNeigh *ebpf.ProgramSpec `ebpf:"probe_fib_lookup_skip_neigh"`
}

ProbesProgramSpecs contains programs before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type ProbesPrograms

type ProbesPrograms struct {
	ProbeFibLookupSkipNeigh *ebpf.Program `ebpf:"probe_fib_lookup_skip_neigh"`
}

ProbesPrograms contains all programs after they have been loaded into the kernel.

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

func (*ProbesPrograms) Close

func (p *ProbesPrograms) Close() error

type ProbesSpecs

ProbesSpecs contains maps and programs before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type ProbesVariableSpecs

type ProbesVariableSpecs struct {
}

ProbesVariableSpecs contains global variables before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type ProbesVariables

type ProbesVariables struct {
}

ProbesVariables contains all global variables after they have been loaded into the kernel.

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

type SockTermIpv4RevnatEntry

type SockTermIpv4RevnatEntry struct {
	Address     uint32
	Port        uint16
	RevNatIndex uint16
	// contains filtered or unexported fields
}

type SockTermIpv4RevnatTuple

type SockTermIpv4RevnatTuple struct {
	Cookie  uint64
	Address uint32
	Port    uint16
	Pad     uint16
	// contains filtered or unexported fields
}

type SockTermIpv6RevnatEntry

type SockTermIpv6RevnatEntry struct {
	Address struct {
		Addr [16]uint8
		// contains filtered or unexported fields
	}
	Port        uint16
	RevNatIndex uint16
	// contains filtered or unexported fields
}

type SockTermIpv6RevnatTuple

type SockTermIpv6RevnatTuple struct {
	Cookie  uint64
	Address struct {
		Addr [16]uint8
		// contains filtered or unexported fields
	}
	Port uint16
	Pad  uint16
	// contains filtered or unexported fields
}

type SockTermMapSpecs

type SockTermMapSpecs struct {
	CiliumLb4ReverseSk *ebpf.MapSpec `ebpf:"cilium_lb4_reverse_sk"`
	CiliumLb6ReverseSk *ebpf.MapSpec `ebpf:"cilium_lb6_reverse_sk"`
}

SockTermMapSpecs contains maps before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type SockTermMaps

type SockTermMaps struct {
	CiliumLb4ReverseSk *ebpf.Map `ebpf:"cilium_lb4_reverse_sk"`
	CiliumLb6ReverseSk *ebpf.Map `ebpf:"cilium_lb6_reverse_sk"`
}

SockTermMaps contains all maps after they have been loaded into the kernel.

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

func (*SockTermMaps) Close

func (m *SockTermMaps) Close() error

type SockTermObjects

type SockTermObjects struct {
	SockTermPrograms
	SockTermMaps
	SockTermVariables
}

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

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

func (*SockTermObjects) Close

func (o *SockTermObjects) Close() error

type SockTermProgramSpecs

type SockTermProgramSpecs struct {
	CilSockTcpDestroyV4 *ebpf.ProgramSpec `ebpf:"cil_sock_tcp_destroy_v4"`
	CilSockTcpDestroyV6 *ebpf.ProgramSpec `ebpf:"cil_sock_tcp_destroy_v6"`
	CilSockUdpDestroyV4 *ebpf.ProgramSpec `ebpf:"cil_sock_udp_destroy_v4"`
	CilSockUdpDestroyV6 *ebpf.ProgramSpec `ebpf:"cil_sock_udp_destroy_v6"`
}

SockTermProgramSpecs contains programs before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type SockTermPrograms

type SockTermPrograms struct {
	CilSockTcpDestroyV4 *ebpf.Program `ebpf:"cil_sock_tcp_destroy_v4"`
	CilSockTcpDestroyV6 *ebpf.Program `ebpf:"cil_sock_tcp_destroy_v6"`
	CilSockUdpDestroyV4 *ebpf.Program `ebpf:"cil_sock_udp_destroy_v4"`
	CilSockUdpDestroyV6 *ebpf.Program `ebpf:"cil_sock_udp_destroy_v6"`
}

SockTermPrograms contains all programs after they have been loaded into the kernel.

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

func (*SockTermPrograms) Close

func (p *SockTermPrograms) Close() error

type SockTermSockTermFilter

type SockTermSockTermFilter struct {
	Address struct {
		Addr6 struct {
			Addr [16]uint8
			// contains filtered or unexported fields
		}
		// contains filtered or unexported fields
	}
	Port          uint16
	AddressFamily uint8
	// contains filtered or unexported fields
}

type SockTermSpecs

SockTermSpecs contains maps and programs before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type SockTermVariableSpecs

type SockTermVariableSpecs struct {
	CiliumSockTermFilter *ebpf.VariableSpec `ebpf:"cilium_sock_term_filter"`
}

SockTermVariableSpecs contains global variables before they are loaded into the kernel.

It can be passed ebpf.CollectionSpec.Assign.

type SockTermVariables

type SockTermVariables struct {
	CiliumSockTermFilter *ebpf.Variable `ebpf:"cilium_sock_term_filter"`
}

SockTermVariables contains all global variables after they have been loaded into the kernel.

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

Jump to

Keyboard shortcuts

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