http_config.h revision e95f5a6ebefb83d0e8a82cbc4db7d354957a817d
842ae4bd224140319ae7feec1872b93dfd491143fielding/* ====================================================================
842ae4bd224140319ae7feec1872b93dfd491143fielding * The Apache Software License, Version 1.1
842ae4bd224140319ae7feec1872b93dfd491143fielding * Copyright (c) 2000 The Apache Software Foundation. All rights
842ae4bd224140319ae7feec1872b93dfd491143fielding * reserved.
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding * Redistribution and use in source and binary forms, with or without
04891cf70e0bfc38bfb027541dc821f04c754ff7nd * modification, are permitted provided that the following conditions
04891cf70e0bfc38bfb027541dc821f04c754ff7nd * 1. Redistributions of source code must retain the above copyright
04891cf70e0bfc38bfb027541dc821f04c754ff7nd * notice, this list of conditions and the following disclaimer.
04891cf70e0bfc38bfb027541dc821f04c754ff7nd * 2. Redistributions in binary form must reproduce the above copyright
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding * notice, this list of conditions and the following disclaimer in
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding * the documentation and/or other materials provided with the
3568de757bac0b47256647504c186d17ca272f85rbb * distribution.
3568de757bac0b47256647504c186d17ca272f85rbb * 3. The end-user documentation included with the redistribution,
3568de757bac0b47256647504c186d17ca272f85rbb * if any, must include the following acknowledgment:
3568de757bac0b47256647504c186d17ca272f85rbb * "This product includes software developed by the
3568de757bac0b47256647504c186d17ca272f85rbb * Apache Software Foundation (http://www.apache.org/)."
3568de757bac0b47256647504c186d17ca272f85rbb * Alternately, this acknowledgment may appear in the software itself,
3568de757bac0b47256647504c186d17ca272f85rbb * if and wherever such third-party acknowledgments normally appear.
3568de757bac0b47256647504c186d17ca272f85rbb * 4. The names "Apache" and "Apache Software Foundation" must
3568de757bac0b47256647504c186d17ca272f85rbb * not be used to endorse or promote products derived from this
3568de757bac0b47256647504c186d17ca272f85rbb * software without prior written permission. For written
3568de757bac0b47256647504c186d17ca272f85rbb * permission, please contact apache@apache.org.
3568de757bac0b47256647504c186d17ca272f85rbb * 5. Products derived from this software may not be called "Apache",
3568de757bac0b47256647504c186d17ca272f85rbb * nor may "Apache" appear in their name, without prior written
3568de757bac0b47256647504c186d17ca272f85rbb * permission of the Apache Software Foundation.
3568de757bac0b47256647504c186d17ca272f85rbb * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
3568de757bac0b47256647504c186d17ca272f85rbb * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
3568de757bac0b47256647504c186d17ca272f85rbb * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3568de757bac0b47256647504c186d17ca272f85rbb * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
3568de757bac0b47256647504c186d17ca272f85rbb * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3568de757bac0b47256647504c186d17ca272f85rbb * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3568de757bac0b47256647504c186d17ca272f85rbb * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
3568de757bac0b47256647504c186d17ca272f85rbb * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
3568de757bac0b47256647504c186d17ca272f85rbb * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3568de757bac0b47256647504c186d17ca272f85rbb * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
3568de757bac0b47256647504c186d17ca272f85rbb * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3568de757bac0b47256647504c186d17ca272f85rbb * SUCH DAMAGE.
3568de757bac0b47256647504c186d17ca272f85rbb * ====================================================================
3568de757bac0b47256647504c186d17ca272f85rbb * This software consists of voluntary contributions made by many
3568de757bac0b47256647504c186d17ca272f85rbb * individuals on behalf of the Apache Software Foundation. For more
3568de757bac0b47256647504c186d17ca272f85rbb * information on the Apache Software Foundation, please see
3568de757bac0b47256647504c186d17ca272f85rbb * Portions of this software are based upon public domain software
3568de757bac0b47256647504c186d17ca272f85rbb * originally written at the National Center for Supercomputing Applications,
3568de757bac0b47256647504c186d17ca272f85rbb * University of Illinois, Urbana-Champaign.
3568de757bac0b47256647504c186d17ca272f85rbbextern "C" {
db12cd62083041bf90945eeb90cc40fbd2340797trawick * @package Apache Configuration
3568de757bac0b47256647504c186d17ca272f85rbb * The central data structures around here...
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz/* Command dispatch structures... */
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding * How the directives arguments should be parsed.
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @tip Note that for all of these except RAW_ARGS, the config routine is
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding * passed a freshly allocated string which can be modified or stored
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding * or whatever... it's only necessary to do pstrdup() stuff with
8f3ec4772d2aeb347cf40e87c77627bb784dd018rbb * RAW_ARGS -- cmd_func parses command line itself
8f3ec4772d2aeb347cf40e87c77627bb784dd018rbb * TAKE1 -- one argument only
3d96ee83babeec32482c9082c9426340cee8c44dwrowe * TAKE2 -- two arguments only
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding * ITERATE -- one argument, occuring multiple times
b6e310e482c42cc323a28fa6fec653e11e0552e5jorton * * (e.g., IndexIgnore)
cd8f8c995d415473f3bfb0b329b2450f2a722c3atrawick * ITERATE2 -- two arguments, 2nd occurs multiple times
98fb535f829e2a95aabd82420931f476661fa8e3jorton * * (e.g., AddIcon)
f0e395a55abfcad3d2bd7c63470003b08a93d567nd * FLAG -- One of 'On' or 'Off'
f0e395a55abfcad3d2bd7c63470003b08a93d567nd * NO_ARGS -- No args at all, e.g. </Directory>
f0e395a55abfcad3d2bd7c63470003b08a93d567nd * TAKE12 -- one or two arguments
f0e395a55abfcad3d2bd7c63470003b08a93d567nd * TAKE3 -- three arguments only
98fb535f829e2a95aabd82420931f476661fa8e3jorton * TAKE23 -- two or three arguments
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * TAKE123 -- one, two or three arguments
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * TAKE13 -- one or three arguments
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * @defvar enum cmd_how
3568de757bac0b47256647504c186d17ca272f85rbb * (e.g., IndexIgnore)
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz ITERATE2, /* two arguments, 2nd occurs multiple times
3568de757bac0b47256647504c186d17ca272f85rbb * (e.g., AddIcon)
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz NO_ARGS, /* No args at all, e.g. </Directory> */
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantztypedef union {
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding const char *(*no_args) (cmd_parms *parms, void *mconfig);
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding const char *(*raw_args) (cmd_parms *parms, void *mconfig,
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz const char *args);
3568de757bac0b47256647504c186d17ca272f85rbb const char *(*take1) (cmd_parms *parms, void *mconfig, const char *w);
fc1efab92032301e317f07e1b3a00082d9d71f3frbb const char *(*take2) (cmd_parms *parms, void *mconfig, const char *w,
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz const char *w2);
24b534291150023e6b68eca89ddd33e475ccddc0wrowe const char *(*take3) (cmd_parms *parms, void *mconfig, const char *w,
24b534291150023e6b68eca89ddd33e475ccddc0wrowe const char *(*flag) (cmd_parms *parms, void *mconfig, int on);
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz# define AP_INIT_NO_ARGS(directive, func, mconfig, where, help) \
3568de757bac0b47256647504c186d17ca272f85rbb { directive, { .no_args=func }, mconfig, where, RAW_ARGS, help }
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz# define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help) \
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
3568de757bac0b47256647504c186d17ca272f85rbb# define AP_INIT_TAKE1(directive, func, mconfig, where, help) \
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz { directive, { .take1=func }, mconfig, where, TAKE1, help }
3568de757bac0b47256647504c186d17ca272f85rbb# define AP_INIT_ITERATE(directive, func, mconfig, where, help) \
3568de757bac0b47256647504c186d17ca272f85rbb { directive, { .take1=func }, mconfig, where, ITERATE, help }
3568de757bac0b47256647504c186d17ca272f85rbb# define AP_INIT_TAKE2(directive, func, mconfig, where, help) \
3568de757bac0b47256647504c186d17ca272f85rbb { directive, { .take2=func }, mconfig, where, TAKE2, help }
3568de757bac0b47256647504c186d17ca272f85rbb# define AP_INIT_TAKE12(directive, func, mconfig, where, help) \
3568de757bac0b47256647504c186d17ca272f85rbb { directive, { .take2=func }, mconfig, where, TAKE12, help }
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz# define AP_INIT_ITERATE2(directive, func, mconfig, where, help) \
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz { directive, { .take2=func }, mconfig, where, ITERATE2, help }
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz# define AP_INIT_TAKE23(directive, func, mconfig, where, help) \
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz { directive, { .take3=func }, mconfig, where, TAKE23, help }
3568de757bac0b47256647504c186d17ca272f85rbb# define AP_INIT_TAKE3(directive, func, mconfig, where, help) \
3568de757bac0b47256647504c186d17ca272f85rbb { directive, { .take3=func }, mconfig, where, TAKE3, help }
3568de757bac0b47256647504c186d17ca272f85rbb# define AP_INIT_FLAG(directive, func, mconfig, where, help) \
3568de757bac0b47256647504c186d17ca272f85rbb { directive, { .flag=func }, mconfig, where, FLAG, help }
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantztypedef const char *(*cmd_func) ();
3568de757bac0b47256647504c186d17ca272f85rbb# define AP_INIT_NO_ARGS(directive, func, mconfig, where, help) \
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding { directive, func, mconfig, where, RAW_ARGS, help }
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding# define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help) \
239f998fbee5ac5b114b965bb76e217cce0003edstoddard# define AP_INIT_TAKE1(directive, func, mconfig, where, help) \
3568de757bac0b47256647504c186d17ca272f85rbb# define AP_INIT_ITERATE(directive, func, mconfig, where, help) \
6653a33e820463abd4f81915b7a1eba0f602e200brianp# define AP_INIT_TAKE2(directive, func, mconfig, where, help) \
41634f717c623556a16b27b25d7d909a66fe20f8wrowe# define AP_INIT_TAKE12(directive, func, mconfig, where, help) \
6653a33e820463abd4f81915b7a1eba0f602e200brianp# define AP_INIT_ITERATE2(directive, func, mconfig, where, help) \
ad83978f20c7d1a4323059d9af122e56fcd353bdstoddard# define AP_INIT_TAKE23(directive, func, mconfig, where, help) \
7cd5419264796cfeaf8215383cf0f89130a81fectrawick# define AP_INIT_TAKE3(directive, func, mconfig, where, help) \
6653a33e820463abd4f81915b7a1eba0f602e200brianp# define AP_INIT_FLAG(directive, func, mconfig, where, help) \
dd028aa8111afb6534fece555e8c2d408894671etrawick * The command record structure. Each modules can define a table of these
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding * to define the directives it will implement.
ca53a74f4012a45cbad48e940eddf27d866981f9dougm /** Name of this command */
ca53a74f4012a45cbad48e940eddf27d866981f9dougm const char *name;
ca53a74f4012a45cbad48e940eddf27d866981f9dougm /** The function to be called when this directive is parsed */
dd028aa8111afb6534fece555e8c2d408894671etrawick /** Extra data, for functions which implement multiple commands... */
6653a33e820463abd4f81915b7a1eba0f602e200brianp /** What overrides need to be allowed to enable this command. */
6653a33e820463abd4f81915b7a1eba0f602e200brianp /** What the command expects as arguments
6653a33e820463abd4f81915b7a1eba0f602e200brianp * @defvar cmd_how args_how*/
6653a33e820463abd4f81915b7a1eba0f602e200brianp /** 'usage' message, in case of syntax errors */
6653a33e820463abd4f81915b7a1eba0f602e200brianp const char *errmsg;
6653a33e820463abd4f81915b7a1eba0f602e200brianp/* The allowed locations for a configuration directive are the union of
6653a33e820463abd4f81915b7a1eba0f602e200brianp * those indicated by each set bit in the req_override mask.
6653a33e820463abd4f81915b7a1eba0f602e200brianp * (req_override & RSRC_CONF) => *.conf outside <Directory> or <Location>
6653a33e820463abd4f81915b7a1eba0f602e200brianp * (req_override & ACCESS_CONF) => *.conf inside <Directory> or <Location>
cd8f8c995d415473f3bfb0b329b2450f2a722c3atrawick * (req_override & OR_AUTHCFG) => *.conf inside <Directory> or <Location>
cd8f8c995d415473f3bfb0b329b2450f2a722c3atrawick * and .htaccess when AllowOverride AuthConfig
cd8f8c995d415473f3bfb0b329b2450f2a722c3atrawick * (req_override & OR_LIMIT) => *.conf inside <Directory> or <Location>
239f998fbee5ac5b114b965bb76e217cce0003edstoddard * and .htaccess when AllowOverride Limit
3568de757bac0b47256647504c186d17ca272f85rbb * (req_override & OR_OPTIONS) => *.conf anywhere
3568de757bac0b47256647504c186d17ca272f85rbb * and .htaccess when AllowOverride Options
3568de757bac0b47256647504c186d17ca272f85rbb * (req_override & OR_FILEINFO) => *.conf anywhere
12901074f5d6b36d08be84d8637b6f2c21e0da26trawick * and .htaccess when AllowOverride FileInfo
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * (req_override & OR_INDEXES) => *.conf anywhere
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * and .htaccess when AllowOverride Indexes
3568de757bac0b47256647504c186d17ca272f85rbb#define OR_ALL (OR_LIMIT|OR_OPTIONS|OR_FILEINFO|OR_AUTHCFG|OR_INDEXES)
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * This can be returned by a function if they don't wish to handle
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * a command. Make it something not likely someone will actually use
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * as an error code.
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @defvar DECLINE_CMD "\a\b"
9f979f5c8061f6f6f560d1824e0e378ff5b91931rpluem/** Common structure for reading of config files / passwd files etc. */
9f979f5c8061f6f6f560d1824e0e378ff5b91931rpluem /** a getc()-like function
9f979f5c8061f6f6f560d1824e0e378ff5b91931rpluem * @deffunc int getch(void *param) */
83a5021aef5ebb67395b93f75df4fd0f0b4fc8c8fuankg /** a fgets()-like function
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @deffunc void *getstr(void *buf, size_t bufsize, void *param)*/
9f979f5c8061f6f6f560d1824e0e378ff5b91931rpluem void *(*getstr) (void *buf, size_t bufsiz, void *param);
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard /** a close hander function
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @deffunc int close(void *param)*/
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard /** the argument passed to getch/getstr/close */
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard /** the filename / description */
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard const char *name;
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard /** current line number, starting at 1 */
3568de757bac0b47256647504c186d17ca272f85rbb * This structure is passed to a command which is being invoked,
3568de757bac0b47256647504c186d17ca272f85rbb * to carry a large variety of miscellaneous data which is all of
cd8f8c995d415473f3bfb0b329b2450f2a722c3atrawick * use to *somebody*...
7cd5419264796cfeaf8215383cf0f89130a81fectrawick /** Argument to command from cmd_table */
e8f95a682820a599fe41b22977010636be5c2717jim /** Which allow-override bits are set */
cd8f8c995d415473f3bfb0b329b2450f2a722c3atrawick /** Which methods are <Limit>ed */
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard /** Config file structure. */
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm /** the directive specifying this command */
dd028aa8111afb6534fece555e8c2d408894671etrawick /** Pool to allocate new storage in */
3cbd177a6c885562f9ad0cf11695f044489c881dgregames /** Pool for scratch memory; persists during configuration, but
3cbd177a6c885562f9ad0cf11695f044489c881dgregames * wiped before the first request is served... */
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard /** Server_rec being configured for */
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz /** If configuring for a directory, pathname of that directory.
5a0f707b48da7703cbe6bc087f13a6735b1c742dgregames * NOPE! That's what it meant previous to the existance of <Files>,
5a0f707b48da7703cbe6bc087f13a6735b1c742dgregames * <Location> and regex matching. Now the only usefulness that can be
5a0f707b48da7703cbe6bc087f13a6735b1c742dgregames * derived from this field is whether a command is being called in a
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * server context (path == NULL) or being called in a dir context
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * (path != NULL). */
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz /** configuration command */
7cd5419264796cfeaf8215383cf0f89130a81fectrawick /** per_dir_config vector passed to handle_command */
7cd5419264796cfeaf8215383cf0f89130a81fectrawick /** directive with syntax error */
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * Module structures. Just about everything is dispatched through
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * these, directly or indirectly (through the command and handler
7cd5419264796cfeaf8215383cf0f89130a81fectrawick /** API version, *not* module version; check that module is
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * compatible with this version of the server.
7cd5419264796cfeaf8215383cf0f89130a81fectrawick /** API minor version. Provides API feature milestones. Not checked
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * during module init */
7cd5419264796cfeaf8215383cf0f89130a81fectrawick /** Index to this modules structures in config vectors. */
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz /** The name of the module's C file */
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard const char *name;
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard /** The handle for the DSO. Internal use only */
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard /** A pointer to the next module in the list
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @defvar module_struct *next */
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard /** Magic Cookie to identify a module structure; It's mainly
3568de757bac0b47256647504c186d17ca272f85rbb * important for the DSO facility (see also mod_so). */
7cd5419264796cfeaf8215383cf0f89130a81fectrawick unsigned long magic;
7cd5419264796cfeaf8215383cf0f89130a81fectrawick /** Function to allow MPMs to re-write command line arguments. This
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * hook is only available to MPMs.
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * @param The process that the server is running in.
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * @deffunc void rewrite_args(process_rec *process);
3568de757bac0b47256647504c186d17ca272f85rbb /** Function to allow all modules to create per directory configuration
74fd6d9aeadb9022086259c5c1ae00bc0dda9c9astoddard * structures.
72b6f1cf3e616473e1c26464b3193b13c2c09e87brianp * @param p The pool to use for all allocations.
72b6f1cf3e616473e1c26464b3193b13c2c09e87brianp * @param dir The directory currently being processed.
3568de757bac0b47256647504c186d17ca272f85rbb * @return The per-directory structure created
3568de757bac0b47256647504c186d17ca272f85rbb * @deffunc void *create_dir_config(apr_pool_t *p, char *dir)
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard void *(*create_dir_config) (apr_pool_t *p, char *dir);
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard /** Function to allow all modules to merge the per directory configuration
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * structures for two directories.
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @param p The pool to use for all allocations.
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @param base_conf The directory structure created for the parent directory.
1ce78cf71b5baaf2c1ab48e818cb1f2397df5010trawick * @param new_conf The directory structure currently being processed.
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @return The new per-directory structure created
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @deffunc void *merge_dir_config(apr_pool_t *p, void *base_conf, void *new_conf)
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz void *(*merge_dir_config) (apr_pool_t *p, void *base_conf, void *new_conf);
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz /** Function to allow all modules to create per server configuration
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * structures.
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @param p The pool to use for all allocations.
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @param s The server currently being processed.
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @return The per-server structure created
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @deffunc void *create_server_config(apr_pool_t *p, server_rec *dir)
dd028aa8111afb6534fece555e8c2d408894671etrawick void *(*create_server_config) (apr_pool_t *p, server_rec *s);
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard /** Function to allow all modules to merge the per server configuration
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * structures for two servers.
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @param p The pool to use for all allocations.
3568de757bac0b47256647504c186d17ca272f85rbb * @param base_conf The directory structure created for the parent directory.
3568de757bac0b47256647504c186d17ca272f85rbb * @param new_conf The directory structure currently being processed.
3568de757bac0b47256647504c186d17ca272f85rbb * @return The new per-directory structure created
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @deffunc void *merge_dir_config(apr_pool_t *p, void *base_conf, void *new_conf)
f714f1a7002928d785e53e70349700a7f595fee3trawick void *(*merge_server_config) (apr_pool_t *p, void *base_conf, void *new_conf);
3568de757bac0b47256647504c186d17ca272f85rbb /** A command_rec table that describes all of the directives this module
ad83978f20c7d1a4323059d9af122e56fcd353bdstoddard * defines. */
4a13940dc2990df0a798718d3a3f9cf1566c2217bjh /** A hook to allow modules to hook other points in the request processing.
4a13940dc2990df0a798718d3a3f9cf1566c2217bjh * In this function, modules should call the ap_hook_*() functions to
3568de757bac0b47256647504c186d17ca272f85rbb * register an interest in a specific step in processing the current
3568de757bac0b47256647504c186d17ca272f85rbb * request.
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @deffunc void register_hooks(void)
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard void (*register_hooks) (void);
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard/* Initializer for the first few module slots, which are only
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * really set up once we start running. Note that the first two slots
663237d6bcc59ac0997d71d48a1baa55fa29a3d8jim * provide a version check; this should allow us to deal with changes to
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * the API. The major number should reflect changes to the API handler table
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * itself or removal of functionality. The minor number should reflect
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * additions of functionality to the existing API. (the server can detect
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * an old-format module, and either handle it back-compatibly, or at least
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * signal an error). See src/include/ap_mmn.h for MMN version history.
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard#define STANDARD_MODULE_STUFF this_module_needs_to_be_ported_to_apache_2_0
ad83978f20c7d1a4323059d9af122e56fcd353bdstoddard#define STANDARD20_MODULE_STUFF MODULE_MAGIC_NUMBER_MAJOR, \
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * Generic accessors for other modules to get at their own module-specific
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @param conf_vector The vector in which the modules configuration is stored.
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * usually r->per_dir_config or s->module_config
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @param m The module to get the data for.
3568de757bac0b47256647504c186d17ca272f85rbb * @return The module-specific data
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @deffunc void *ap_get_module_config(void *conf_vector, module *m)
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantzAP_DECLARE(void *) ap_get_module_config(void *conf_vector, module *m);
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * Generic accessors for other modules to set at their own module-specific
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @param conf_vector The vector in which the modules configuration is stored.
3568de757bac0b47256647504c186d17ca272f85rbb * usually r->per_dir_config or s->module_config
3568de757bac0b47256647504c186d17ca272f85rbb * @param m The module to set the data for.
3568de757bac0b47256647504c186d17ca272f85rbb * @param val The module-specific data to set
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @deffunc void ap_set_module_config(void *conf_vector, module *m, void *val)
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddardAP_DECLARE(void) ap_set_module_config(void *conf_vector, module *m, void *val);
cd8f8c995d415473f3bfb0b329b2450f2a722c3atrawick (((void **)(v))[(m)->module_index])
beb70d51e435dc36c56a72b6cd83556c04db9283wrowe * Generic command handling function for strings
fe6baec9bbcd36f932b71a355120cd7b5a685d6cfielding * @param cmd The command parameters for this directive
3568de757bac0b47256647504c186d17ca272f85rbb * @param struct_ptr pointer into a given type
3568de757bac0b47256647504c186d17ca272f85rbb * @param arg The argument to the directive
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @return An error string or NULL on success
3568de757bac0b47256647504c186d17ca272f85rbb * @deffunc const char *ap_set_string_slot(cmd_parms *cmd, void *struct_ptr, const char *arg)
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddardAP_DECLARE_NONSTD(const char *) ap_set_string_slot(cmd_parms *, void *,
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard const char *);
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * Return true if the specified method is limited by being listed in
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * a <Limit> container, or by *not* being listed in a <LimiteExcept>
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * container.
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @param method Pointer to a string specifying the method to check.
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @param cmd Pointer to the cmd_parms structure passed to the
1ec8bd0373f11c07688ec9afbbf778cf78a0bc52wrowe * directive handler.
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @return 0 if the method is not limited in the current scope
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @deffunc ap_method_is_limited(cmd_parms *cmd, const char *method)
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddardAP_DECLARE(int) ap_method_is_limited(cmd_parms *cmd, const char *method);
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * Generic command handling function for strings, always sets the value
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * to a lowercase string
cd8f8c995d415473f3bfb0b329b2450f2a722c3atrawick * @param cmd The command parameters for this directive
cd8f8c995d415473f3bfb0b329b2450f2a722c3atrawick * @param struct_ptr pointer into a given type
3568de757bac0b47256647504c186d17ca272f85rbb * @param arg The argument to the directive
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @return An error string or NULL on success
cb97ae2ff6969c2789b8e03f1bc4187fa73b6bafwrowe * @deffunc const char *ap_set_string_slot_lower(cmd_parms *cmd, void *struct_ptr, const char *arg)
0f113d7123e8bd3e3e2e9b6373461a1a773bfccatrawickAP_DECLARE_NONSTD(const char *) ap_set_string_slot_lower(cmd_parms *,
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz void *, const char *);
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * Generic command handling function for flags
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @param cmd The command parameters for this directive
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @param struct_ptr pointer into a given type
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @param arg The argument to the directive (either 1 or 0)
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @return An error string or NULL on success
3568de757bac0b47256647504c186d17ca272f85rbb * @deffunc const char *ap_set_flag_slot(cmd_parms *cmd, void *struct_ptr, int arg)
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantzAP_DECLARE_NONSTD(const char *) ap_set_flag_slot(cmd_parms *, void *, int);
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * Generic command handling function for files
c0659e61002e9d6ff77b2dca72540e0af1b2ca64stoddard * @param cmd The command parameters for this directive
3568de757bac0b47256647504c186d17ca272f85rbb * @param struct_ptr pointer into a given type
3568de757bac0b47256647504c186d17ca272f85rbb * @param arg The argument to the directive
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @return An error string or NULL on success
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @deffunc const char *ap_set_file_slot(cmd_parms *cmd, void *struct_ptr, const char *arg)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawickAP_DECLARE_NONSTD(const char *) ap_set_file_slot(cmd_parms *, void *, const char *);
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * For modules which need to read config files, open logs, etc. ...
f886987cd0bd4220c14043c4d9be77ec22902e73trawick * this returns the fname argument if it begins with '/'; otherwise
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * it relativizes it wrt server_root.
f886987cd0bd4220c14043c4d9be77ec22902e73trawick * @param p pool to allocate data out of
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param fname The file name
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @deffunc const char *ap_server_root_relative(apr_pool_t *p, const char *fname)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawickAP_DECLARE(const char *) ap_server_root_relative(apr_pool_t *p, const char *fname);
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz/* Finally, the hook for dynamically loading modules in... */
2e7f1d7da527c09e717251e186deffe55e6fbd0ftrawick * Add a module to the server
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * @param m the module structure of the module to add
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * @deffunc void ap_add_module(module *m)
2e7f1d7da527c09e717251e186deffe55e6fbd0ftrawick * Remove a module from the server. There are some caveats:
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * when the module is removed, its slot is lost so all the current
3568de757bac0b47256647504c186d17ca272f85rbb * per-dir and per-server configurations are invalid. So we should
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * only ever call this function when you are invalidating almost
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * all our current data. I.e. when doing a restart.
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @param m the module structure of the module to remove
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @deffunc void ap_remove_module(module *m)
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * Add a module to the chained modules list and the list of loaded modules
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @param m the module structure of the module to add
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * @deffunc void ap_add_loaded_module(module *m)
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * Remove a module fromthe chained modules list and the list of loaded modules
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * @param m the module structure of the module to remove
36c8049de63c446926139936c3d195330a0539cetrawick * @deffunc void ap_remove_loaded_module(module *m)
36c8049de63c446926139936c3d195330a0539cetrawickAP_DECLARE(void) ap_remove_loaded_module(module *mod);
36c8049de63c446926139936c3d195330a0539cetrawick * Add a module to the list of loaded module based on the name of the
36c8049de63c446926139936c3d195330a0539cetrawick * @param name The name of the module
36c8049de63c446926139936c3d195330a0539cetrawick * @return 1 on success, 0 on failure
e8f95a682820a599fe41b22977010636be5c2717jim * @deffunc int ap_add_named_module(const char *name)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * Clear all of the modules from the loaded module list
36c8049de63c446926139936c3d195330a0539cetrawick * @deffunc void ap_add_named_module(void)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * Find the name of the specified module
cb97ae2ff6969c2789b8e03f1bc4187fa73b6bafwrowe * @param m The module to get the name for
36c8049de63c446926139936c3d195330a0539cetrawick * @return the name of the module
36c8049de63c446926139936c3d195330a0539cetrawick * @deffunc const char *ap_find_module_name(module *m)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * Find a module based on the name of the module
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param name the name of the module
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @return the module structure if found, NULL otherwise
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @deffunc module *ap_find_linked_module(const char *name)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawickAP_DECLARE(module *) ap_find_linked_module(const char *name);
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * Open a configfile_t as apr_file_t
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param ret_cfg open configfile_t struct pointer
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param p The pool to allocate the structure out of
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param name the name of the file to open
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @deffunc apr_status_t ap_pcfg_openfile(configfile_t **ret_cfg, apr_pool_t *p, const char *name)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawickAP_DECLARE(apr_status_t) ap_pcfg_openfile(configfile_t **, apr_pool_t *p, const char *name);
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * Allocate a configfile_t handle with user defined functions and params
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param p The pool to allocate out of
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param descr The name of the file
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param param The argument passed to getch/getstr/close
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param getc_func The getch function
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param gets_func The getstr function
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param close_func The close function
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @deffunc configfile_t *ap_pcfg_open_custom(apr_pool_t *p, const char *descr, void *param, int(*getc_func)(void*), void *(*gets_func) (void *buf, size_t bufsiz, void *param), int(*close_func)(void *param))
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawickAP_DECLARE(configfile_t *) ap_pcfg_open_custom(apr_pool_t *p, const char *descr,
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick int(*getc_func)(void*),
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick void *(*gets_func) (void *buf, size_t bufsiz, void *param),
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * Read one line from open configfile_t, strip LF, increase line number
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param buf place to store the line read
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param bufsize size of the buffer
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param cfp File to read from
e8f95a682820a599fe41b22977010636be5c2717jim * @return 1 on success, 0 on failure
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @deffunc int ap_cfg_getline(char *buf, size_t bufsize, configfile_t *cfp)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawickAP_DECLARE(int) ap_cfg_getline(char *buf, size_t bufsize, configfile_t *cfp);
f886987cd0bd4220c14043c4d9be77ec22902e73trawick * Read one char from open configfile_t, increase line number upon LF
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * @param cfp The file to read from
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * @return the character read
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * @deffunc int ap_cfg_getc(configfile_t *cfp)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * Detach from open configfile_t, calling the close handler
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param cfp The file to close
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @return 1 on sucess, 0 on failure
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @deffunc int ap_cfg_closefile(configfile_t *cfp)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * Read all data between the current <foo> and the matching </foo>. All
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * of this data is forgotten immediately.
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param cmd The cmd_parms to pass to the directives inside the container
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * @param directive The directive name to read until
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @retrn Error string on failure, NULL on success
f2e009134c7e279f99dfca5bd421f721bf1f7840jorton * @deffunc const char *ap_soak_end_container(cmd_parms *cmd, char *directive)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawickAP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive);
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * Read all data between the current <foo> and the matching </foo> and build
64c351fd973428b5bb4c28e983fa86875ea4e60fdougm * a config tree out of it
2e7f1d7da527c09e717251e186deffe55e6fbd0ftrawick * @param p pool to allocate out of
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param temp_pool Temporary pool to allocate out of
36c8049de63c446926139936c3d195330a0539cetrawick * @param parms The cmd_parms to pass to all directives read
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param current The current node in the tree
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param curr_parent The current parent node
f886987cd0bd4220c14043c4d9be77ec22902e73trawick * @param orig_directive The directive to read until hit.
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @return Error string on failure, NULL on success
cb97ae2ff6969c2789b8e03f1bc4187fa73b6bafwrowe * @deffunc char *ap_build_cont_config(apr_pool_t *p, apr_pool_t *temp_pool, cmd_parms *parms, ap_directive_t **current, ap_directive_t **curr_parent, char *orig_directive)
36c8049de63c446926139936c3d195330a0539cetrawickconst char * ap_build_cont_config(apr_pool_t *p, apr_pool_t *temp_pool,
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * Build a config tree from a config file
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param parms The cmd_parms to pass to all of the directives in the file
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param conf_pool The pconf pool
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param temp_pool The temporary pool
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param conftree Place to store the root node of the config tree
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @return Error string on erro, NULL otherwise
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @deffunc const char *ap_build_config(cmd_parms *parms, apr_pool_t *conf_pool, apr_pool_t *temp_pool, ap_directive_t **conftree)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawickAP_DECLARE(const char *) ap_build_config(cmd_parms *parms,
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * Walk a config tree and setup the server's internal structures
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param conftree The config tree to walk
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param parms The cmd_parms to pass to all functions
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param config The parms context
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @return Error string on error, NULL otherwise
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @deffunc const char *ap_walk_config(ap_directive_t *conftree, cmd_parms *parms, void *config)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawickAP_DECLARE(const char *) ap_walk_config(ap_directive_t *conftree,
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * ap_check_cmd_context() definitions:
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param cmd The cmd_context to check
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @param forbidden Where the command is forbidden. One of:
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * NOT_IN_VIRTUALHOST
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * NOT_IN_LIMIT
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * NOT_IN_DIRECTORY
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * NOT_IN_LOCATION
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * NOT_IN_FILES
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * NOT_IN_DIR_LOC_FILE
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * GLOBAL_ONLY
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @return Error string on error, NULL on success
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * @deffunc const char *ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawickAP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden);
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick/* ap_check_cmd_context(): Forbidden in: */
3568de757bac0b47256647504c186d17ca272f85rbb#define NOT_IN_DIR_LOC_FILE (NOT_IN_DIRECTORY|NOT_IN_LOCATION|NOT_IN_FILES) /* <Directory>/<Location>/<Files>*/
72b6f1cf3e616473e1c26464b3193b13c2c09e87brianp#define GLOBAL_ONLY (NOT_IN_VIRTUALHOST|NOT_IN_LIMIT|NOT_IN_DIR_LOC_FILE)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * The topmost module in the list
e8f95a682820a599fe41b22977010636be5c2717jim * @defvar module *top_module
44d2e75323651320b480d8bc2f098448a08de4fcwrowe * Array of all statically linked modules
44d2e75323651320b480d8bc2f098448a08de4fcwrowe * @defvar module *ap_prelinked_modules[]
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawick * Array of all preloaded modules
2e7f1d7da527c09e717251e186deffe55e6fbd0ftrawick * @defvar module *ap_preloaded_modules[]
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantzextern AP_DECLARE_DATA module *ap_preloaded_modules[];
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * Array of all loaded modules
1ec8bd0373f11c07688ec9afbbf778cf78a0bc52wrowe * @defvar module **ap_loaded_modules
f886987cd0bd4220c14043c4d9be77ec22902e73trawick/** Run a single module's two create_config hooks
f886987cd0bd4220c14043c4d9be77ec22902e73trawick * @param p the pool to allocate out of
f886987cd0bd4220c14043c4d9be77ec22902e73trawick * @param s The server to configure for.
f886987cd0bd4220c14043c4d9be77ec22902e73trawick * @param m The module to configure
f886987cd0bd4220c14043c4d9be77ec22902e73trawickvoid ap_single_module_configure(apr_pool_t *p, server_rec *s, module *m);
1ec8bd0373f11c07688ec9afbbf778cf78a0bc52wrowe * Add all of the prelinked modules into the loaded module list
1ec8bd0373f11c07688ec9afbbf778cf78a0bc52wrowe * @param process The process that is currently running the server
3568de757bac0b47256647504c186d17ca272f85rbb * @deffunc void ap_setup_prelinked_modules(process_rec *process)
8bfe865d8d61be4ba4a89e45427a3c4211ebabdctrawickAP_DECLARE(void) ap_setup_prelinked_modules(process_rec *process);
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz *Show the preloaded configuration directives, the help string explaining
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * the directive arguments, in what module they are handled, and in
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * what parts of the configuration they are allowed. Used for httpd -h.
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @deffunc void ap_show_directives(void)
98fb535f829e2a95aabd82420931f476661fa8e3jorton * Show the preloaded module names. Used for httpd -l.
e8f95a682820a599fe41b22977010636be5c2717jim * @deffunc void ap_show_modules(void)
98fb535f829e2a95aabd82420931f476661fa8e3jorton * Read all config files and setup the server
98fb535f829e2a95aabd82420931f476661fa8e3jorton * @param process The process running the server
98fb535f829e2a95aabd82420931f476661fa8e3jorton * @param temp_pool A pool to allocate temporary data out of.
3568de757bac0b47256647504c186d17ca272f85rbb * @param config_name The name of the config file
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @param conftree Place to store the root of the config tree
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @return The setup server_rec list.
3568de757bac0b47256647504c186d17ca272f85rbb * @deffunc server_rec *ap_read_config(process_rec *process, apr_pool_t *temp_pool, const char *config_name, ap_directive_t **conftree)
0f081398cf0eef8cc7c66a535d450110a92dc8aefieldingAP_DECLARE(server_rec*) ap_read_config(process_rec *process, apr_pool_t *temp_pool, const char *config_name, ap_directive_t **conftree);
0cb6873985efbf0cc9644114925df6baa4b32d5awrowe * Run all post config hooks for loaded modules.
0cb6873985efbf0cc9644114925df6baa4b32d5awrowe * @param pconf The configuration pool
0cb6873985efbf0cc9644114925df6baa4b32d5awrowe * @param plog The logging pool
0cb6873985efbf0cc9644114925df6baa4b32d5awrowe * @param ptemp The temporary pool
0cb6873985efbf0cc9644114925df6baa4b32d5awrowe * @param s The list of server_rec structures
0cb6873985efbf0cc9644114925df6baa4b32d5awrowe * @deffunc void ap_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
0cb6873985efbf0cc9644114925df6baa4b32d5awroweAP_DECLARE(void) ap_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s);
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * Run all rewrite args hooks for loaded modules
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @param process The process currently running the server
3568de757bac0b47256647504c186d17ca272f85rbb * @deffunc void ap_run_rewrite_args(process_rec *process)
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantzAP_DECLARE(void) ap_run_rewrite_args(process_rec *process);
3568de757bac0b47256647504c186d17ca272f85rbb * Run the register hooks function for a specified module
3568de757bac0b47256647504c186d17ca272f85rbb * @param m The module to run the register hooks function fo
3568de757bac0b47256647504c186d17ca272f85rbb * @deffunc void ap_register_hooks(module *m)
cd8f8c995d415473f3bfb0b329b2450f2a722c3atrawick * Setup all virtual hosts
cd8f8c995d415473f3bfb0b329b2450f2a722c3atrawick * @param p The pool to allocate out of
9d0665da83d1e22c0ea0e5f6f940f70f75bf5237ianh * @param main_server The head of the server_rec list
3568de757bac0b47256647504c186d17ca272f85rbb * @deffunc void ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server)
7cd5419264796cfeaf8215383cf0f89130a81fectrawickAP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server);
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * Setup the config vector for a request_rec
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * @param p The pool to allocate the config vector out of
73e8b26287de5c06fa470d36162e103dbac9c7e5wrowe * @return The config vector
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * Setup the config vector for per dir module configs
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * @param p The pool to allocate the config vector out of
7cd5419264796cfeaf8215383cf0f89130a81fectrawick * @return The config vector
ca53a74f4012a45cbad48e940eddf27d866981f9dougm * @deffunc void *ap_create_per_dir_config(apr_pool_t *p)
3d96ee83babeec32482c9082c9426340cee8c44dwroweAP_CORE_DECLARE(void *) ap_create_per_dir_config(apr_pool_t *p);
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * Run all of the modules merge per dir config functions
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @param p The pool to pass to the merge functions
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @param base The base directory config structure
28c170ac8e99644de58cad454c6e0f9b4b359be6jerenkrantz * @param new The new directory config structure
3568de757bac0b47256647504c186d17ca272f85rbbvoid *ap_merge_per_dir_configs(apr_pool_t *p, void *base, void *new);
/* For http_core.c... (<Directory> command and virtual hosts) */
* @deffunc const char *ap_init_virtual_host(apr_pool_t *p, const char *hostname, server_rec *main_server, server_rec **ps)
/* Module-method dispatchers, also for http_request.c */
AP_CORE_DECLARE(const command_rec *) ap_find_command_in_modules(const char *cmd_name, module **mod);
* @deffunc void ap_run_post_config(apr_pool_t *pconf,apr_pool_t *plog,apr_pool_t *ptemp, server_rec *s)
* @deffunc void ap_run_open_logs(apr_pool_t *pconf,apr_pool_t *plog,apr_pool_t *ptemp, server_rec *s)
#ifdef __cplusplus