版權所有 © 2014 tutorialspoint
#include <linux/module.h> int query_module(const char *name, int which, void *buf, size_t bufsize, size_t *ret);
int query_module(const char *name, int which, void *buf, size_t bufsize, size_t *ret);
以下值可以為 which 指定
struct module_symbol { unsigned long value; unsigned long name; };
後面跟著以 null 結尾的字串。name 的值為字串相對於 buf 開頭的字元偏移量;ret 設定為符號的數量。
struct module_info { unsigned long address; unsigned long size; unsigned long flags; };
其中 address 是模組駐留的核心地址,size 是模組以位元組為單位的大小,flags 是 MOD_RUNNING、MOD_AUTOCLEAN 等的掩碼,指示模組的當前狀態(請參見核心原始檔 include/linux/module.h)。ret 設定為 module_info 結構的大小。
create_module (2)
get_kernel_syms (2)
init_module (2)
廣告