httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@leland.Stanford.EDU>
Subject Re: apache/linux modules
Date Tue, 03 Feb 1998 04:26:14 GMT
On Mon, 2 Feb 1998, Cristian Gafton wrote:

> I propose to have the modules shared objects named like mod-NAME.so. Each
> module exports a symbol (struct module) named "module". We load all the
> .so files and try to resolve in each module the "module" symbol. We then
> fill in the preloaded_modules and prelinked_modules arrays with relevant
> information and proceed further.

"We" shouldn't do anything. A module that loads modules (e.g., mod_dld,
mod_dll, mod_so) just needs to extract the module structure and call
add_module() on it. The Apache core takes care of the rest.

> We could have the modules ecport a version symbol ("mod_version") and try
> to dlsym() that symbol also and compare it with the current server version
> to be sure that the module was compiled for this version of apache.

This is already done. If the module's API version (found in the version
member of module_struct) doesn't match the current MODULE_MAGIC_NUMBER
(which is changed every time we change the API), Apache will refuse to
load a module.

-- Alexei Kosut <akosut@stanford.edu> <http://www.stanford.edu/~akosut/>
   Stanford University, Class of 2001 * Apache <http://www.apache.org> *



Mime
View raw message