HaveProgType probes the running kernel for the availability of the specified program type.
Deprecated: use HaveProgramType() instead.
var HaveProgType = HaveProgramType
func HaveBoundedLoops() error
HaveBoundedLoops probes the running kernel if bounded loops are supported.
See the package documentation for the meaning of the error return value.
func HaveLargeInstructions() error
HaveLargeInstructions probes the running kernel if more than 4096 instructions per program are supported.
See the package documentation for the meaning of the error return value.
func HaveMapType(mt ebpf.MapType) error
HaveMapType probes the running kernel for the availability of the specified map type.
See the package documentation for the meaning of the error return value.
func HaveProgramHelper(pt ebpf.ProgramType, helper asm.BuiltinFunc) error
HaveProgramHelper probes the running kernel for the availability of the specified helper function to a specified program type. Return values have the following semantics:
err == nil: The feature is available. errors.Is(err, ebpf.ErrNotSupported): The feature is not available. err != nil: Any errors encountered during probe execution, wrapped.
Note that the latter case may include false negatives, and that program creation may succeed despite an error being returned. Only `nil` and `ebpf.ErrNotSupported` are conclusive.
Probe results are cached and persist throughout any process capability changes.
func HaveProgramType(pt ebpf.ProgramType) error
HaveProgramType probes the running kernel for the availability of the specified program type.
See the package documentation for the meaning of the error return value.
func HaveV2ISA() error
HaveV2ISA probes the running kernel if instructions of the v2 ISA are supported.
See the package documentation for the meaning of the error return value.
func HaveV3ISA() error
HaveV3ISA probes the running kernel if instructions of the v3 ISA are supported.
See the package documentation for the meaning of the error return value.
func LinuxVersionCode() (uint32, error)
LinuxVersionCode returns the version of the currently running kernel as defined in the LINUX_VERSION_CODE compile-time macro. It is represented in the format described by the KERNEL_VERSION macro from linux/version.h.
Do not use the version to make assumptions about the presence of certain kernel features, always prefer feature probes in this package. Some distributions backport or disable eBPF features.