Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Arch ¶
func Arch() string
Arch returns the kernel architecture value, often used within the kernel `include/arch` directory.
func FindHeaderDirs ¶
FindHeaderDirs finds kernel header base directories that contain a `LINUX_VERSION_CODE` matching the running kernel. If no directories are found, it will attempt a fallback to extracting from `/sys/kernel/kheaders.tar.xz` which is enabled via the `kheaders` kernel module and the `CONFIG_KHEADERS` kernel config option. The `kheaders` module will be automatically added and removed if present and needed.
func IsDebugFSMounted ¶
IsDebugFSMounted would test the existence of file /sys/kernel/debug/tracing/kprobe_events to determine if debugfs is mounted or not returns a boolean and a possible error message
func IsIPv6Enabled ¶
func IsIPv6Enabled() bool
IsIPv6Enabled returns whether or not IPv6 has been enabled on the host
func ValidateHeaderDir ¶
ValidateHeaderDir verifies that the kernel headers in the directory match the kernel version of the running host
Types ¶
type Version ¶
type Version uint32
Version is a numerical representation of a kernel version
func HostVersion ¶
HostVersion returns the running kernel version of the host
func ParseVersion ¶
ParseVersion parses a string in the format of x.x.x to a Version
func VersionCode ¶
VersionCode returns a Version computed from the individual parts of a x.x.x version