package
0.17.3
Repository: https://github.com/cilium/ebpf.git
Documentation: pkg.go.dev

# Functions

As returns typ if is of type T.
Assign per-instruction metadata to the instructions in insns.
CheckTypeCompatibility checks local and target types for Compatibility according to CO-RE rules.
Copy a Type recursively.
CORERelocate calculates changes needed to adjust eBPF instructions for differences in types.
FindHandle returns the first handle for which predicate returns true.
FlushKernelSpec removes any cached kernel type information.
KernelMarshalOptions will generate BTF suitable for the current kernel.
LoadFuncInfos parses BTF func info from kernel wire format into a [FuncOffsets], a sorted slice of [btf.Func]s of (sub)programs within a BPF program with their corresponding raw instruction offsets.
LoadKernelModuleSpec returns the BTF information for the named kernel module.
LoadKernelSpec returns the current kernel's BTF information.
LoadLineInfos parses BTF line info in kernel wire format.
LoadSpec opens file and calls LoadSpecFromReader on it.
LoadSpecAndExtInfosFromReader reads from an ELF.
LoadSpecFromReader reads from an ELF or a raw BTF blob.
LoadSplitSpecFromReader loads split BTF from a reader.
MarshalExtInfos encodes function and line info embedded in insns into kernel wire format.
MarshalMapKV creates a BTF object containing a map key and value.
NewBuilder creates a Builder from a list of types.
NewHandle loads the contents of a [Builder] into the kernel.
NewHandleFromID returns the BTF handle for a given id.
NewHandleFromRawBTF loads raw BTF into the kernel.
QualifiedType returns the type with all qualifiers removed.
Sizeof returns the size of a type in bytes.
UnderlyingType skips qualifiers and Typedefs.
WithFuncMetadata adds a btf.Func to the Metadata of asm.Instruction.

# Constants

Valid IntEncodings.
Valid IntEncodings.
A constant used when CO-RE relocation has to remove instructions.
extern.
extern.
Valid types of forward declaration.
Valid types of forward declaration.
global.
global.
Valid IntEncodings.
static.
static.
Valid IntEncodings.

# Variables

Errors returned by BTF functions.
Errors returned by BTF functions.
Errors returned by BTF functions.
Errors returned by BTF functions.
The size of a FuncInfo in BTF wire format.

# Structs

Array is an array with a fixed number of elements.
Builder turns Types into raw BTF.
Const is a qualifier.
COREFixup is the result of computing a CO-RE relocation for a target.
CORERelocationInfos contains a sorted list of co:re relocation infos.
Datasec is a global program section containing data.
Enum lists possible values.
EnumValue is part of an Enum Is is not a valid Type.
ExtInfos contains ELF section metadata.
Float is a float of a given length.
Func is a function definition.
FuncOffset represents a [btf.Func] and its raw instruction offset within a BPF program.
FuncProto is a function declaration.
Fwd is a forward declaration of a Type.
GoFormatter converts a Type to Go syntax.
Handle is a reference to BTF loaded into the kernel.
HandleInfo describes a Handle.
HandleIterator allows enumerating BTF blobs loaded into the kernel.
Int is an integer of a given length.
Line represents the location and contents of a single line of source code a BPF ELF was compiled from.
LineOffset represents a line info and its raw instruction offset.
Member is part of a Struct or Union.
Pointer is a pointer to another type.
Restrict is a qualifier.
Spec allows querying a set of Types and loading the set into the kernel.
Struct is a compound type of consecutive members.
Typedef is an alias of a Type.
TypesIterator iterates over types of a given spec.
TypeTag associates metadata with a pointer type.
Union is a compound type where members occupy the same memory.
Var is a global variable.
VarSecinfo describes variable in a Datasec.
Void is the unit type of BTF.
Volatile is a qualifier.

# Interfaces

Type represents a type described by BTF.

# Type aliases

A value in bits.
FuncLinkage describes BTF function linkage metadata.
FuncOffsets is a sorted slice of FuncOffset.
FwdKind is the type of forward declaration.
ID represents the unique ID of a BTF object.
LineOffsets contains a sorted list of line infos.
TypeID identifies a type in a BTF section.
VarLinkage describes BTF variable linkage metadata.