bpf

package
v0.0.0-...-6c4fd92 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: NIST-PD-fallback Imports: 5 Imported by: 0

Documentation

Overview

Package bpf provides access to compiled eBPF ELF objects.

Index

Constants

View Source
const EnvBpfPath = "NDNDPDK_BPF_PATH"

EnvBpfPath declares an environment variable to explicitly specify a directory containing compiled eBPF ELF objects.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kind

type Kind string

Kind indicates the kind of compiled eBPF ELF object.

const (
	Strategy Kind = "strategy"
	XDP      Kind = "xdp"
)

Kind definitions.

func (Kind) Find

func (kind Kind) Find(name string) (path string, e error)

Find determines the filesystem path of a compiled eBPF ELF object. It first constructs a filename from the kind and short name. It then searches the file in the following locations:

  1. The path specified in NDNDPDK_BPF_PATH environ.
  2. ../lib/bpf relative to the executable. From /usr/local/bin/ndndpdk-svc, this step looks for eBPF objects in /usr/local/lib/bpf.
  3. build/lib/bpf in the source tree. This is used in unit tests, and is skipped if the executable is installed under /usr.

Jump to

Keyboard shortcuts

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