Implementing Configuration Directives
my_cmds
above is a null-terminated array containing the
commands implemented by the module. Normally they are defined using
macros defined in http_config.h. For example,
static const cmd_rec my_cmds[] = {
AP_INIT_TAKE1("MyFirstDirective", my_first_cmd_func, my_ptr, OR_ALL,
"This is My First Directive"),
/* more directives as applicable */
{ NULL }
} ;
AP_INIT_TAKE1 is one of many such macros, all having the same prototype
(more later). The arguments to it are as follows:
- Directive Name.
- Function implementing the directive.
- Data pointer (often NULL).
- Where this directive is allowed.
- A brief Help message for the directive.