#include <linux/module.h> int query_module(const char *name, int which, void *buf, size_t bufsize, size_t *ret);
struct module_symbol { unsigned long value; unsigned long name; };
followed by null-terminated strings. The value of name is the character offset of the string relative to the start of buf; ret is set to the number of symbols.
struct module_info { unsigned long address; unsigned long size; unsigned long flags; };
where address is the kernel address at which the module resides, size is the size of the module in bytes, and flags is a mask of MOD_RUNNING, MOD_AUTOCLEAN, et al that indicates the current status of the module. ret is set to the size of the module_info struct.