26 #ifndef APACHE_HTTP_CONFIG_H
27 #define APACHE_HTTP_CONFIG_H
76 #if defined(AP_HAVE_DESIGNATED_INITIALIZER) || defined(DOXYGEN)
84 const char *(*no_args) (
cmd_parms *parms,
void *mconfig);
86 const char *(*raw_args) (
cmd_parms *parms,
void *mconfig,
89 const char *(*take_argv) (
cmd_parms *parms,
void *mconfig,
90 int argc,
char *
const argv[]);
92 const char *(*take1) (
cmd_parms *parms,
void *mconfig,
const char *w);
94 const char *(*take2) (
cmd_parms *parms,
void *mconfig,
const char *w,
97 const char *(*take3) (
cmd_parms *parms,
void *mconfig,
const char *w,
98 const char *w2,
const char *w3);
100 const char *(*flag) (
cmd_parms *parms,
void *mconfig,
int on);
104 # define AP_NO_ARGS func.no_args
106 # define AP_RAW_ARGS func.raw_args
108 # define AP_TAKE_ARGV func.take_argv
110 # define AP_TAKE1 func.take1
112 # define AP_TAKE2 func.take2
114 # define AP_TAKE3 func.take3
116 # define AP_FLAG func.flag
119 # define AP_INIT_NO_ARGS(directive, func, mconfig, where, help) \
120 { directive, { .no_args=func }, mconfig, where, NO_ARGS, help }
122 # define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help) \
123 { directive, { .raw_args=func }, mconfig, where, RAW_ARGS, help }
125 # define AP_INIT_TAKE_ARGV(directive, func, mconfig, where, help) \
126 { directive, { .take_argv=func }, mconfig, where, TAKE_ARGV, help }
128 # define AP_INIT_TAKE1(directive, func, mconfig, where, help) \
129 { directive, { .take1=func }, mconfig, where, TAKE1, help }
131 # define AP_INIT_ITERATE(directive, func, mconfig, where, help) \
132 { directive, { .take1=func }, mconfig, where, ITERATE, help }
134 # define AP_INIT_TAKE2(directive, func, mconfig, where, help) \
135 { directive, { .take2=func }, mconfig, where, TAKE2, help }
137 # define AP_INIT_TAKE12(directive, func, mconfig, where, help) \
138 { directive, { .take2=func }, mconfig, where, TAKE12, help }
140 # define AP_INIT_ITERATE2(directive, func, mconfig, where, help) \
141 { directive, { .take2=func }, mconfig, where, ITERATE2, help }
143 # define AP_INIT_TAKE13(directive, func, mconfig, where, help) \
144 { directive, { .take3=func }, mconfig, where, TAKE13, help }
146 # define AP_INIT_TAKE23(directive, func, mconfig, where, help) \
147 { directive, { .take3=func }, mconfig, where, TAKE23, help }
149 # define AP_INIT_TAKE123(directive, func, mconfig, where, help) \
150 { directive, { .take3=func }, mconfig, where, TAKE123, help }
152 # define AP_INIT_TAKE3(directive, func, mconfig, where, help) \
153 { directive, { .take3=func }, mconfig, where, TAKE3, help }
155 # define AP_INIT_FLAG(directive, func, mconfig, where, help) \
156 { directive, { .flag=func }, mconfig, where, FLAG, help }
160 typedef const char *(*cmd_func) ();
162 # define AP_NO_ARGS func
163 # define AP_RAW_ARGS func
164 # define AP_TAKE_ARGV func
165 # define AP_TAKE1 func
166 # define AP_TAKE2 func
167 # define AP_TAKE3 func
168 # define AP_FLAG func
170 # define AP_INIT_NO_ARGS(directive, func, mconfig, where, help) \
171 { directive, func, mconfig, where, NO_ARGS, help }
172 # define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help) \
173 { directive, func, mconfig, where, RAW_ARGS, help }
174 # define AP_INIT_TAKE_ARGV(directive, func, mconfig, where, help) \
175 { directive, func, mconfig, where, TAKE_ARGV, help }
176 # define AP_INIT_TAKE1(directive, func, mconfig, where, help) \
177 { directive, func, mconfig, where, TAKE1, help }
178 # define AP_INIT_ITERATE(directive, func, mconfig, where, help) \
179 { directive, func, mconfig, where, ITERATE, help }
180 # define AP_INIT_TAKE2(directive, func, mconfig, where, help) \
181 { directive, func, mconfig, where, TAKE2, help }
182 # define AP_INIT_TAKE12(directive, func, mconfig, where, help) \
183 { directive, func, mconfig, where, TAKE12, help }
184 # define AP_INIT_ITERATE2(directive, func, mconfig, where, help) \
185 { directive, func, mconfig, where, ITERATE2, help }
186 # define AP_INIT_TAKE13(directive, func, mconfig, where, help) \
187 { directive, func, mconfig, where, TAKE13, help }
188 # define AP_INIT_TAKE23(directive, func, mconfig, where, help) \
189 { directive, func, mconfig, where, TAKE23, help }
190 # define AP_INIT_TAKE123(directive, func, mconfig, where, help) \
191 { directive, func, mconfig, where, TAKE123, help }
192 # define AP_INIT_TAKE3(directive, func, mconfig, where, help) \
193 { directive, func, mconfig, where, TAKE3, help }
194 # define AP_INIT_FLAG(directive, func, mconfig, where, help) \
195 { directive, func, mconfig, where, FLAG, help }
233 #define OR_FILEINFO 4
237 #define OR_INDEXES 16
240 #define ACCESS_CONF 64
241 #define RSRC_CONF 128
242 #define EXEC_ON_READ 256
248 #define NONFATAL_OVERRIDE 512
249 #define NONFATAL_UNKNOWN 1024
250 #define NONFATAL_ALL (NONFATAL_OVERRIDE|NONFATAL_UNKNOWN)
252 #define PROXY_CONF 2048
255 #define OR_ALL (OR_LIMIT|OR_OPTIONS|OR_FILEINFO|OR_AUTHCFG|OR_INDEXES)
264 #define DECLINE_CMD "\a\b"
339 #define AP_MODULE_FLAG_NONE (0)
340 #define AP_MODULE_FLAG_ALWAYS_MERGE (1 << 0)
392 void *(*merge_dir_config) (
apr_pool_t *
p,
void *base_conf,
void *new_conf);
434 #ifdef AP_MAYBE_UNUSED
435 #elif defined(__GNUC__)
436 # define AP_MAYBE_UNUSED(x) x __attribute__((unused))
437 #elif defined(__LCLINT__)
438 # define AP_MAYBE_UNUSED(x) x
440 # define AP_MAYBE_UNUSED(x) x
456 #define APLOG_USE_MODULE(foo) \
457 extern module AP_MODULE_DECLARE_DATA foo##_module; \
458 AP_MAYBE_UNUSED(static int * const aplog_module_index) = &(foo##_module.module_index)
467 #define AP_DECLARE_MODULE(foo) \
468 APLOG_USE_MODULE(foo); \
469 module AP_MODULE_DECLARE_DATA foo##_module
486 #define STANDARD_MODULE_STUFF this_module_needs_to_be_ported_to_apache_2_0
489 #define STANDARD20_MODULE_STUFF MODULE_MAGIC_NUMBER_MAJOR, \
490 MODULE_MAGIC_NUMBER_MINOR, \
495 MODULE_MAGIC_COOKIE, \
499 #define MPM20_MODULE_STUFF MODULE_MAGIC_NUMBER_MAJOR, \
500 MODULE_MAGIC_NUMBER_MINOR, \
539 #define AP_MODULE_FLAGS_MMN_MAJOR 20161018
540 #define AP_MODULE_FLAGS_MMN_MINOR 7
541 #define AP_MODULE_HAS_FLAGS(m) \
542 AP_MODULE_MAGIC_AT_LEAST(AP_MODULE_FLAGS_MMN_MAJOR, \
543 AP_MODULE_FLAGS_MMN_MINOR)
551 #if !defined(AP_DEBUG)
553 #define ap_get_module_config(v,m) \
554 (((void **)(v))[(m)->module_index])
555 #define ap_set_module_config(v,m,val) \
556 ((((void **)(v))[(m)->module_index]) = (val))
605 int index,
int level);
607 #if !defined(AP_DEBUG)
609 #define ap_get_conn_logconf(c) \
610 ((c)->log ? (c)->log : \
611 &(c)->base_server->log)
613 #define ap_get_conn_server_logconf(c,s) \
614 ( ( (c)->log != &(c)->base_server->log && (c)->log != NULL ) ? \
618 #define ap_get_request_logconf(r) \
619 ((r)->log ? (r)->log : \
620 (r)->connection->log ? (r)->connection->log : \
623 #define ap_get_module_loglevel(l,i) \
624 (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ? \
626 (l)->module_levels[i])
628 #define ap_get_server_module_loglevel(s,i) \
629 (ap_get_module_loglevel(&(s)->log,i))
631 #define ap_get_conn_module_loglevel(c,i) \
632 (ap_get_module_loglevel(ap_get_conn_logconf(c),i))
634 #define ap_get_conn_server_module_loglevel(c,s,i) \
635 (ap_get_module_loglevel(ap_get_conn_server_logconf(c,s),i))
637 #define ap_get_request_module_loglevel(r,i) \
638 (ap_get_module_loglevel(ap_get_request_logconf(r),i))
913 const char *orig_directive);
953 const char *(*cb)(
ap_dir_match_t *w,
const char *fname),
void *ctx)
969 #define NOT_IN_VIRTUALHOST 0x01
970 #define NOT_IN_LIMIT 0x02
971 #define NOT_IN_DIRECTORY 0x04
972 #define NOT_IN_LOCATION 0x08
973 #define NOT_IN_FILES 0x10
974 #define NOT_IN_HTACCESS 0x20
975 #define NOT_IN_PROXY 0x40
977 #define NOT_IN_DIR_LOC_FILE (NOT_IN_DIRECTORY|NOT_IN_LOCATION|NOT_IN_FILES)
979 #define NOT_IN_DIR_CONTEXT (NOT_IN_LIMIT|NOT_IN_DIR_LOC_FILE|NOT_IN_PROXY)
981 #define GLOBAL_ONLY (NOT_IN_VIRTUALHOST|NOT_IN_DIR_CONTEXT)
1072 const char *config_name,
1184 const char *access_name);
1195 const char *hostname,
1303 const char *section,
1439 (
request_rec *
r, const
char *dir_name, const
char *access_name,
1447 const
char **full_name);
Symbol export macros and hook functions.
#define AP_DECLARE_HOOK(ret, name, args)
Definition: ap_hooks.h:74
void ap_register_hooks(module *m, apr_pool_t *p)
cmd_how
Definition: http_config.h:49
char * ap_runtime_dir_relative(apr_pool_t *p, const char *fname)
#define ap_get_module_config(v, m)
Definition: http_config.h:553
apr_status_t ap_pool_cleanup_set_null(void *data)
AP_DECLARE_DATA module * ap_preloaded_modules[]
apr_status_t ap_open_htaccess(request_rec *r, const char *dir_name, const char *access_name, ap_configfile_t **conffile, const char **full_name)
void * ap_retained_data_get(const char *key)
ap_conf_vector_t * ap_create_conn_config(apr_pool_t *p)
const char * ap_walk_config(ap_directive_t *conftree, cmd_parms *parms, ap_conf_vector_t *section_vector)
AP_DECLARE_DATA ap_module_symbol_t ap_prelinked_module_symbols[]
void ap_set_module_loglevel(apr_pool_t *p, struct ap_logconf *l, int index, int level)
#define ap_get_request_module_loglevel(r, i)
Definition: http_config.h:637
const command_rec * ap_find_command(const char *name, const command_rec *cmds)
const char * ap_add_module(module *m, apr_pool_t *p, const char *s)
const char * ap_build_config(cmd_parms *parms, apr_pool_t *conf_pool, apr_pool_t *temp_pool, ap_directive_t **conftree)
const char * ap_set_string_slot_lower(cmd_parms *cmd, void *struct_ptr, const char *arg)
int ap_cfg_closefile(ap_configfile_t *cfp)
void ap_remove_loaded_module(module *mod)
const char * ap_set_int_slot(cmd_parms *cmd, void *struct_ptr, const char *arg)
void ap_run_rewrite_args(process_rec *process)
apr_status_t ap_pcfg_openfile(ap_configfile_t **ret_cfg, apr_pool_t *p, const char *name)
struct ap_conf_vector_t ap_conf_vector_t
Definition: http_config.h:512
server_rec * ap_read_config(process_rec *process, apr_pool_t *temp_pool, const char *config_name, ap_directive_t **conftree)
const 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, const char *orig_directive)
#define ap_get_server_module_loglevel(s, i)
Definition: http_config.h:628
const char * ap_set_file_slot(cmd_parms *cmd, void *struct_ptr, const char *arg)
const char * ap_setup_prelinked_modules(process_rec *process)
int ap_exists_directive(apr_pool_t *p, const char *name)
void * ap_set_config_vectors(server_rec *server, ap_conf_vector_t *section_vector, const char *section, module *mod, apr_pool_t *pconf)
void * ap_retained_data_create(const char *key, apr_size_t size)
#define ap_get_conn_server_module_loglevel(c, s, i)
Definition: http_config.h:634
ap_conf_vector_t * ap_merge_per_dir_configs(apr_pool_t *p, ap_conf_vector_t *base, ap_conf_vector_t *new_conf)
int ap_parse_htaccess(ap_conf_vector_t **result, request_rec *r, int override, int override_opts, apr_table_t *override_list, const char *path, const char *access_name)
int ap_get_module_flags(const module *m)
void ap_show_directives(void)
void ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server)
const char * ap_process_fnmatch_configs(server_rec *s, const char *fname, ap_directive_t **conftree, apr_pool_t *p, apr_pool_t *ptemp, int optional)
int ap_process_config_tree(server_rec *s, ap_directive_t *conftree, apr_pool_t *p, apr_pool_t *ptemp)
#define ap_get_conn_module_loglevel(c, i)
Definition: http_config.h:631
AP_DECLARE_DATA module * ap_top_module
const char * ap_soak_end_container(cmd_parms *cmd, const char *directive)
int ap_invoke_handler(request_rec *r)
const char * ap_add_loaded_module(module *mod, apr_pool_t *p, const char *s)
const char * ap_show_mpm(void)
const char * ap_set_deprecated(cmd_parms *cmd, void *struct_ptr, const char *arg)
AP_DECLARE_DATA module ** ap_loaded_modules
#define ap_set_module_config(v, m, val)
Definition: http_config.h:555
const char * ap_parse_log_level(const char *str, int *val)
apr_status_t ap_cfg_getc(char *ch, ap_configfile_t *cfp)
const command_rec * ap_find_command_in_modules(const char *cmd_name, module **mod)
const char * ap_set_string_slot(cmd_parms *cmd, void *struct_ptr, const char *arg)
ap_conf_vector_t * ap_create_request_config(apr_pool_t *p)
void ap_reserve_module_slots(int count)
void ap_remove_module(module *m)
void ap_merge_log_config(const struct ap_logconf *old_conf, struct ap_logconf *new_conf)
ap_dir_match_t * ap_dir_cfgmatch(cmd_parms *cmd, int flags, const char *(*cb)(ap_dir_match_t *w, const char *fname), void *ctx) __attribute__((nonnull(1
const char * ap_init_virtual_host(apr_pool_t *p, const char *hostname, server_rec *main_server, server_rec **ps)
int ap_method_is_limited(cmd_parms *cmd, const char *method)
char * ap_state_dir_relative(apr_pool_t *p, const char *fname)
const char * ap_set_flag_slot_char(cmd_parms *cmd, void *struct_ptr, int arg)
const char * ap_find_module_name(module *m)
const char * ap_find_module_short_name(int module_index)
void ap_single_module_configure(apr_pool_t *p, server_rec *s, module *m)
ap_configfile_t * ap_pcfg_open_custom(apr_pool_t *p, const char *descr, void *param, apr_status_t(*getc_func)(char *ch, void *param), apr_status_t(*gets_func)(void *buf, apr_size_t bufsiz, void *param), apr_status_t(*close_func)(void *param))
const char * ap_set_flag_slot(cmd_parms *cmd, void *struct_ptr, int arg)
module * ap_find_linked_module(const char *name)
ap_conf_vector_t * ap_create_per_dir_config(apr_pool_t *p)
apr_status_t ap_cfg_getline(char *buf, apr_size_t bufsize, ap_configfile_t *cfp)
struct ap_logconf * ap_new_log_config(apr_pool_t *p, const struct ap_logconf *old)
void ap_reset_module_loglevels(struct ap_logconf *l, int val)
void ap_reserve_module_slots_directive(const char *directive)
const char * ap_process_resource_config(server_rec *s, const char *fname, ap_directive_t **conftree, apr_pool_t *p, apr_pool_t *ptemp)
AP_DECLARE_DATA module * ap_prelinked_modules[]
void ap_show_modules(void)
const char * ap_pcfg_strerror(apr_pool_t *p, ap_configfile_t *cfp, apr_status_t rc)
char * ap_server_root_relative(apr_pool_t *p, const char *fname)
@ RAW_ARGS
Definition: http_config.h:50
@ TAKE12
Definition: http_config.h:61
@ TAKE1
Definition: http_config.h:51
@ TAKE23
Definition: http_config.h:63
@ TAKE3
Definition: http_config.h:62
@ TAKE_ARGV
Definition: http_config.h:66
@ TAKE2
Definition: http_config.h:52
@ FLAG
Definition: http_config.h:59
@ TAKE123
Definition: http_config.h:64
@ TAKE13
Definition: http_config.h:65
@ ITERATE
Definition: http_config.h:53
@ ITERATE2
Definition: http_config.h:56
@ NO_ARGS
Definition: http_config.h:60
dav_resource int dav_locktoken dav_response int flags
Definition: mod_dav.h:1458
dav_buffer apr_size_t size
Definition: mod_dav.h:461
request_rec * r
Definition: mod_dav.h:518
dav_buffer const char * str
Definition: mod_dav.h:465
const char * s
Definition: mod_dav.h:1327
const char * name
Definition: mod_dav.h:805
apr_uint64_t ap_method_mask_t
Definition: httpd.h:642
const char * ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden)
int apr_status_t
Definition: apr_errno.h:44
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
struct apr_table_t apr_table_t
Definition: apr_tables.h:56
void test_config(apr_pool_t *pconf, server_rec *s)
int handler(request_rec *r)
int pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
int check_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
int open_logs(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
void optional_fn_retrieve(void)
apr_status_t open_htaccess(request_rec *r, const char *dir_name, const char *access_name, ap_configfile_t **conffile, const char **full_name)
int post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
void child_init(apr_pool_t *pchild, server_rec *s)
int quick_handler(request_rec *r, int lookup_uri)
int header_parser(request_rec *r)
#define AP_DECLARE_DATA
Definition: macros.h:15
#define AP_DECLARE(x)
Definition: macros.h:1
#define AP_CORE_DECLARE(x)
Definition: macros.h:3
#define AP_DECLARE_NONSTD(x)
Definition: macros.h:2
Definition: http_config.h:268
apr_status_t(* getch)(char *ch, void *param)
Definition: http_config.h:270
unsigned line_number
Definition: http_config.h:280
const char * name
Definition: http_config.h:278
void * param
Definition: http_config.h:276
apr_status_t(* close)(void *param)
Definition: http_config.h:274
apr_status_t(* getstr)(void *buf, apr_size_t bufsiz, void *param)
Definition: http_config.h:272
Structure used to build the config tree.
Definition: util_cfgtree.h:46
Structure for handling HTTP methods.
Definition: httpd.h:658
This structure is used to assign symbol names to module pointers.
Definition: http_config.h:988
module * modp
Definition: http_config.h:990
const char * name
Definition: http_config.h:989
Definition: ap_regex.h:111
Definition: http_config.h:288
ap_regex_t * regex
Definition: http_config.h:333
ap_method_mask_t limited
Definition: http_config.h:298
ap_directive_t * directive
Definition: http_config.h:307
apr_table_t * override_list
Definition: http_config.h:296
apr_pool_t * pool
Definition: http_config.h:310
const ap_directive_t * err_directive
Definition: http_config.h:326
ap_configfile_t * config_file
Definition: http_config.h:305
void * info
Definition: http_config.h:290
apr_array_header_t * limited_xmethods
Definition: http_config.h:300
apr_pool_t * temp_pool
Definition: http_config.h:313
int override_opts
Definition: http_config.h:294
server_rec * server
Definition: http_config.h:315
const command_rec * cmd
Definition: http_config.h:321
char * path
Definition: http_config.h:319
ap_directive_t * parent
Definition: http_config.h:330
struct ap_conf_vector_t * context
Definition: http_config.h:324
ap_method_list_t * xlimited
Definition: http_config.h:302
Definition: http_config.h:204
const char * errmsg
Definition: http_config.h:217
const char * name
Definition: http_config.h:206
void * cmd_data
Definition: http_config.h:210
enum cmd_how args_how
Definition: http_config.h:214
cmd_func func
Definition: http_config.h:208
int req_override
Definition: http_config.h:212
Structure to store things which are per connection.
Definition: httpd.h:1193
Definition: http_config.h:348
int module_index
Definition: http_config.h:357
void(* rewrite_args)(process_rec *process)
Definition: http_config.h:377
void(* register_hooks)(apr_pool_t *p)
Definition: http_config.h:420
unsigned long magic
Definition: http_config.h:371
const char * name
Definition: http_config.h:360
int minor_version
Definition: http_config.h:355
int version
Definition: http_config.h:352
struct module_struct * next
Definition: http_config.h:367
const command_rec * cmds
Definition: http_config.h:412
int flags
Definition: http_config.h:423
void * dynamic_load_handle
Definition: http_config.h:362
A structure that represents one process.
Definition: httpd.h:840
A structure that represents the current request.
Definition: httpd.h:856
A structure to store information for each virtual server.
Definition: httpd.h:1382
Definition: http_config.h:82