[−][src]Module linapi::modules
Interface to Dynamically Loaded Linux Kernel Modules.
Examples
Print all currently loaded system modules
let mods = LoadedModule::from_loaded(); for m in mods { println!("Module: {}", m.name()); }
Load a module
let m = ModuleFile::from_name("MyModule"); let loaded = m.load("my_param=1"); println!("Loaded module {}. my_param={}", loaded.name(), std::str::from_utf8(&loaded.parameters()["my_param"]).unwrap());
Implementation
This uses the sysfs interface, documented here and here, and various undocumented interfaces where noted.
Structs
LoadedModule | Describes a loaded Linux kernel Module |
ModInfo | Information on a |
ModParam | |
ModuleFile | A Linux Kernel Module file on disk. |
Enums
Status | Module Init Status |
Taint | Kernel modules can be "tainted", which serve as a marker for debugging purposes. |
Type | Module type |