FAQ

SUN HTTPd - FAQ

How do I create a module?

Just write a C code something like this:

#include <sunhttpd_module.h>

const char mod_name[128] = "<Your module name>";

int mod_request(struct sunhttpd_module_args args){
    /* This gets called when request comes.
     * Return 0 for the successful status, and return else if not.
     * Read sunhttpd_module.h for about sunhttpd_module_args.
     */
}

int mod_ext(char** args){
    /* This gets called on External directive.
     * Do not free elements of args or args!
     *
     * Also return 0 for the successful status, and return else if not.
     */
}
And compile it as a shared library.

Nishi <nishi@nishi.boats>
$Id: index.html,v 1.6 2023/12/01 09:41:33 nishi Exp $