kmodule

package
v0.0.0-...-7eb602e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2018 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
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

This section is empty.

Types

type ProbeOpts

type ProbeOpts struct {
	DryRun bool
}

ProbeOpts contains optional parameters to Probe.

An empty ProbeOpts{} should lead to the default behavior.

type SyscallError

type SyscallError struct {
	Msg   string
	Errno syscall.Errno
}

SyscallError contains an error message as well as the actual syscall Errno

func Delete

func Delete(name string, flags uintptr) *SyscallError

Delete removes a kernel module.

func FileInit

func FileInit(f *os.File, opts string, flags uintptr) *SyscallError

FileInit loads the kernel module contained by `f` with the given opts and flags.

FileInit falls back to Init when the finit_module(2) syscall is not available.

func Init

func Init(image []byte, opts string) *SyscallError

Init loads the kernel module given by image with the given options.

func Probe

func Probe(name string, modParams string) *SyscallError

Probe loads the given kernel module and its dependencies. It is calls ProbeOptions with the default ProbeOpts.

func ProbeOptions

func ProbeOptions(name, modParams string, opts ProbeOpts) *SyscallError

ProbeOptions loads the given kernel module and its dependencies. This functions takes ProbeOpts.

func (*SyscallError) Error

func (s *SyscallError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL