SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Old RedHat 7.X modutils-2.4.2-2.i686.rpm

QUERY_MODULE

Section: Linux Module Support (2)
Updated: 26 Dec 1996
Index 

NAME

query_module - query the kernel for various bits pertaining to modules. 

SYNOPSIS

#include <linux/module.h>int query_module(const char *name, int which,void *buf, size_t bufsize, size_t *ret);
 

DESCRIPTION

query_modulerequests information related to loadable modules from the kernel. Theprecise nature of the information and its format depends on the whichsub function. Some functions require name to name a currentlyloaded module, some allow name to be NULL indicating thekernel proper.

 

VALUES OF WHICH

0
Always returns success. Used to probe for the system call.
QM_MODULES
Returns the names of all loaded modules. The output buffer format isadjacent null-terminated strings; ret is set to the number ofmodules.
QM_DEPS
Returns the names of all modules used by the indicated module. Theoutput buffer format is adjacent null-terminated strings; ret isset to the number of modules.
QM_REFS
Returns the names of all modules using the indicated module. This isthe inverse of QM_DEPS. The output buffer format is adjacentnull-terminated strings; ret is set to the number of modules.
QM_SYMBOLS
Returns the symbols and values exported by the kernel or the indicatedmodule. The buffer format is an array of:

struct module_symbol{  unsigned long value;  unsigned long name;};

followed by null-terminated strings. The value of name is thecharacter offset of the string relative to the start of buf;ret is set to the number of symbols.

QM_INFO
Returns miscellaneous information about the indicated module. The outputbuffer format is:

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 isa mask of MOD_RUNNING, MOD_AUTOCLEAN, et al that indicatesthe current status of the module. ret is set to the size ofthe module_info struct.

 

RETURN VALUE

On success, zero is returned. On error, -1 is returned and errnois set appropriately. 

ERRORS

ENOENT
No module by that name exists.
EINVAL
Invalid which, or name indicates the kernel for aninappropriate sub function.
ENOSPC
The buffer size provided was too small. ret is set to theminimum size needed.
EFAULT
At least one of name, buf, or ret wasoutside the program's accessible address space.
 

SEE ALSO

create_module(2), init_module(2), delete_module(2).


 

Index

NAME
SYNOPSIS
DESCRIPTION
VALUES OF WHICH
RETURN VALUE
ERRORS
SEE ALSO

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector