Categorygithub.com/DataDog/btf-internals
modulepackage
0.0.0-20220510090419-14c22a91224c
Repository: https://github.com/datadog/btf-internals.git
Documentation: pkg.go.dev

# README

btf-internals

Fork of internal parts of https://github.com/cilium/ebpf making them usable from outside the module.

# Packages

Package btf handles data encoded according to the BPF Type Format.
No description provided by the author
Package sys contains bindings for the BPF syscall.
No description provided by the author

# Functions

Align returns 'n' updated to 'alignment' boundary.
ErrorWithLog returns an error that includes logs from the kernel verifier.
FeatureTest wraps a function so that it is run at most once.
Identifier turns a C style type or field name into an exportable Go equivalent.
KernelRelease returns the release string of the running kernel.
KernelVersion returns the version of the currently running kernel.
NewBufferedSectionReader wraps an io.ReaderAt in an appropriately-sized buffered reader.
NewSafeELFFile reads an ELF safely.
NewVersion creates a version from a string like "Major.Minor.Patch".
NewVersionFromCode creates a version from a LINUX_VERSION_CODE.
OpenSafeELFFile reads an ELF from a file.
No description provided by the author
PossibleCPUs returns the max number of CPUs a system may possibly have Logical CPU numbers must be of the form 0-n.
ReadAllCompressed decompresses a gzipped file into memory.
No description provided by the author
WriteFormatted outputs a formatted src into out.

# Constants

ClangEndian is set to either "el" or "eb" depending on the host's endianness.
Version constant used in ELF binaries indicating that the loader needs to substitute the eBPF program's version with the value of the kernel's KERNEL_VERSION compile-time macro.

# Variables

ErrNotSupported indicates that a feature is not supported by the current kernel.
NativeEndian is set to either binary.BigEndian or binary.LittleEndian, depending on the host's endianness.

# Structs

DiscardZeroes makes sure that all written bytes are zero before discarding them.
No description provided by the author
UnsupportedFeatureError is returned by FeatureTest() functions.
VerifierError includes information from the eBPF verifier.

# Type aliases

FeatureTestFn is used to determine whether the kernel supports a certain feature.
A Version in the form Major.Minor.Patch.