Documentation
¶
Overview ¶
Package kmodule interfaces with Linux kernel modules.
kmodule allows loading and unloading kernel modules with dependencies, as well as locating them through probing.
Index ¶
- Constants
- func CompressionReader(file *os.File) (reader io.Reader, err error)
- func Delete(name string, flags uintptr) error
- func FileInit(f *os.File, opts string, flags uintptr) error
- func Init(image []byte, opts string) error
- func Probe(name string, modParams string) error
- func ProbeOptions(name, modParams string, opts ProbeOpts) error
- type ProbeOpts
Constants ¶
const ( // Ignore symbol version hashes. MODULE_INIT_IGNORE_MODVERSIONS = 0x1 // Ignore kernel version magic. MODULE_INIT_IGNORE_VERMAGIC = 0x2 )
Flags to finit_module(2) / FileInit.
Variables ¶
This section is empty.
Functions ¶
func CompressionReader ¶ added in v0.15.0
Wrapper for the compression readers
func FileInit ¶
FileInit loads the kernel module contained by `f` with the given opts and flags. Uncompresses modules with a .xz and .gz suffix before loading.
FileInit falls back to init_module(2) via Init when the finit_module(2) syscall is not available and when loading compressed modules.
func Probe ¶
Probe loads the given kernel module and its dependencies. It is calls ProbeOptions with the default ProbeOpts.
func ProbeOptions ¶
ProbeOptions loads the given kernel module and its dependencies. This functions takes ProbeOpts.