26#ifndef APACHE_HTTP_CORE_H
27#define APACHE_HTTP_CORE_H
39#if APR_HAVE_STRUCT_RLIMIT
41#include <sys/resource.h>
76#define OPT_SYM_LINKS 4
82#define OPT_INC_WITH_EXEC 32
84#define OPT_SYM_OWNER 64
88#define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_INC_WITH_EXEC|OPT_SYM_LINKS|OPT_EXECCGI)
100#define REMOTE_HOST (0)
106#define REMOTE_NAME (1)
111#define REMOTE_NOLOOKUP (2)
118#define REMOTE_DOUBLE_REV (3)
127#define SATISFY_NOSPEC 2
131#define AP_MIN_BYTES_TO_WRITE 8000
134# define AP_DEFAULT_MAX_INTERNAL_REDIRECTS 10
137# define AP_DEFAULT_MAX_SUBREQ_DEPTH 10
382#define AP_CORE_MODULE_INDEX 0
383#define ap_get_core_module_config(v) \
384 (((void **)(v))[AP_CORE_MODULE_INDEX])
385#define ap_set_core_module_config(v, val) \
386 ((((void **)(v))[AP_CORE_MODULE_INDEX]) = (val))
388#define AP_CORE_MODULE_INDEX (AP_DEBUG_ASSERT(core_module.module_index == 0), 0)
450#define AP_NOTE_DIRECTORY_WALK 0
451#define AP_NOTE_LOCATION_WALK 1
452#define AP_NOTE_FILE_WALK 2
453#define AP_NOTE_IF_WALK 3
454#define AP_NUM_STD_NOTES 4
494#define ETAG_NONE (1 << 0)
495#define ETAG_MTIME (1 << 1)
496#define ETAG_INODE (1 << 2)
497#define ETAG_SIZE (1 << 3)
498#define ETAG_DIGEST (1 << 4)
499#define ETAG_ALL (ETAG_MTIME | ETAG_INODE | ETAG_SIZE)
501#define ETAG_BACKWARD (ETAG_MTIME | ETAG_SIZE)
504#define AP_CORE_CONFIG_OFF (0)
505#define AP_CORE_CONFIG_ON (1)
506#define AP_CORE_CONFIG_UNSET (2)
509#define AP_CORE_MERGE_FLAG(field, to, base, over) to->field = \
510 over->field != AP_CORE_CONFIG_UNSET \
551#define HOSTNAME_LOOKUP_OFF 0
552#define HOSTNAME_LOOKUP_ON 1
553#define HOSTNAME_LOOKUP_DOUBLE 2
554#define HOSTNAME_LOOKUP_UNSET 3
559#define USE_CANONICAL_NAME_OFF (0)
560#define USE_CANONICAL_NAME_ON (1)
561#define USE_CANONICAL_NAME_DNS (2)
562#define USE_CANONICAL_NAME_UNSET (3)
574#define ADD_DEFAULT_CHARSET_OFF (0)
575#define ADD_DEFAULT_CHARSET_ON (1)
576#define ADD_DEFAULT_CHARSET_UNSET (2)
582 struct rlimit *limit_cpu;
584#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
585 struct rlimit *limit_mem;
588 struct rlimit *limit_nproc;
618#define ENABLE_MMAP_OFF (0)
619#define ENABLE_MMAP_ON (1)
620#define ENABLE_MMAP_UNSET (2)
623#define ENABLE_SENDFILE_OFF (0)
624#define ENABLE_SENDFILE_ON (1)
625#define ENABLE_SENDFILE_UNSET (2)
628#define USE_CANONICAL_PHYS_PORT_OFF (0)
629#define USE_CANONICAL_PHYS_PORT_ON (1)
630#define USE_CANONICAL_PHYS_PORT_UNSET (2)
637#define AP_CONDITION_IF 1
638#define AP_CONDITION_ELSE 2
639#define AP_CONDITION_ELSEIF (AP_CONDITION_ELSE|AP_CONDITION_IF)
650#define AP_MAXRANGES_UNSET -1
651#define AP_MAXRANGES_DEFAULT -2
652#define AP_MAXRANGES_UNLIMITED -3
653#define AP_MAXRANGES_NORANGES 0
670#define AP_CGI_PASS_AUTH_OFF (0)
671#define AP_CGI_PASS_AUTH_ON (1)
672#define AP_CGI_PASS_AUTH_UNSET (2)
689#define AP_SENDFILE_ENABLED(x) \
690 ((x) == ENABLE_SENDFILE_ON ? APR_SENDFILE_ENABLED : 0)
727#define AP_TRACE_UNSET -1
728#define AP_TRACE_DISABLE 0
729#define AP_TRACE_ENABLE 1
730#define AP_TRACE_EXTENDED 2
732#define AP_MERGE_TRAILERS_UNSET 0
733#define AP_MERGE_TRAILERS_ENABLE 1
734#define AP_MERGE_TRAILERS_DISABLE 2
740#define AP_HTTP09_UNSET 0
741#define AP_HTTP09_ENABLE 1
742#define AP_HTTP09_DISABLE 2
745#define AP_HTTP_CONFORMANCE_UNSET 0
746#define AP_HTTP_CONFORMANCE_UNSAFE 1
747#define AP_HTTP_CONFORMANCE_STRICT 2
750#define AP_HTTP_METHODS_UNSET 0
751#define AP_HTTP_METHODS_LENIENT 1
752#define AP_HTTP_METHODS_REGISTERED 2
780 apr_off_t readbytes);
958#define AP_ERRORLOG_FLAG_FIELD_SEP 1
960#define AP_ERRORLOG_FLAG_MESSAGE 2
962#define AP_ERRORLOG_FLAG_REQUIRED 4
964#define AP_ERRORLOG_FLAG_NULL_AS_HYPHEN 8
1030#define AP_SQ_MAIN_STATE 0
1032#define AP_SQ_RUN_MODE 1
1034#define AP_SQ_CONFIG_GEN 2
1041#define AP_SQ_NOT_SUPPORTED -1
1045#define AP_SQ_MS_INITIAL_STARTUP 1
1047#define AP_SQ_MS_CREATE_PRE_CONFIG 2
1049#define AP_SQ_MS_DESTROY_CONFIG 3
1051#define AP_SQ_MS_CREATE_CONFIG 4
1053#define AP_SQ_MS_RUN_MPM 5
1055#define AP_SQ_MS_EXITING 6
1059#define AP_SQ_RM_UNKNOWN 1
1061#define AP_SQ_RM_NORMAL 2
1063#define AP_SQ_RM_CONFIG_TEST 3
1065#define AP_SQ_RM_CONFIG_DUMP 4
#define AP_DECLARE_NONSTD(type)
#define AP_DECLARE_HOOK(ret, name, args)
APR-UTIL registration of functions exported by modules.
static apr_OFN_access_compat_ap_satisfies_t * access_compat_ap_satisfies
static apr_OFN_authn_ap_auth_type_t * authn_ap_auth_type
static apr_OFN_authn_ap_auth_name_t * authn_ap_auth_name
struct ap_conf_vector_t ap_conf_vector_t
#define AP_CORE_DECLARE_NONSTD
void ap_add_output_filters_by_type(request_rec *r)
apr_port_t ap_get_server_port(const request_rec *r)
void ap_register_log_hooks(apr_pool_t *p)
ap_filter_rec_t * ap_subreq_core_filter_handle
apr_off_t ap_get_limit_req_body(const request_rec *r)
void ap_add_file_conf(apr_pool_t *p, core_dir_config *conf, void *url_config)
int ap_exists_config_define(const char *name)
int ap_state_query(int query_code)
const char * ap_get_server_name(request_rec *r)
server_signature_e
Server Signature Enumeration.
ap_filter_rec_t * ap_content_length_filter_handle
apr_status_t ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes)
int ap_core_translate(request_rec *r)
#define ap_get_core_module_config(v)
apr_size_t ap_get_read_buf_size(const request_rec *r)
unsigned char allow_options_t
const char * ap_auth_name(request_rec *r)
const char * ap_add_if_conf(apr_pool_t *p, core_dir_config *conf, void *url_config)
apr_socket_t * ap_get_conn_socket(conn_rec *c)
int ap_satisfies(request_rec *r)
void ap_set_server_protocol(server_rec *s, const char *proto)
int ap_is_recursion_limit_exceeded(const request_rec *r)
const char * ap_document_root(request_rec *r)
apr_status_t ap_get_pollfd_from_conn(conn_rec *c, struct apr_pollfd_t *pfd, apr_interval_time_t *ptimeout)
const char * ap_limit_section(cmd_parms *cmd, void *dummy, const char *arg)
void ap_custom_response(request_rec *r, int status, const char *string)
const char * ap_get_remote_logname(request_rec *r)
const char * ap_get_server_protocol(server_rec *s)
void ap_add_per_dir_conf(server_rec *s, void *dir_config)
void ap_register_config_hooks(apr_pool_t *p)
apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
apr_size_t ap_register_request_note(void)
void ap_add_per_url_conf(server_rec *s, void *url_config)
void ap_register_errorlog_handler(apr_pool_t *p, char *tag, ap_errorlog_handler_fn_t *handler, int flags)
apr_size_t ap_get_limit_xml_body(const request_rec *r)
int ap_allow_overrides(request_rec *r)
ap_filter_rec_t * ap_core_output_filter_handle
void ap_core_reorder_directories(apr_pool_t *, server_rec *)
const char * ap_auth_type(request_rec *r)
int ap_errorlog_handler_fn_t(const ap_errorlog_info *info, const char *arg, char *buf, int buflen)
void ** ap_get_request_note(request_rec *r, apr_size_t note_num)
char * ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r)
const char * ap_get_server_name_for_url(request_rec *r)
unsigned long etag_components_t
#define ap_set_core_module_config(v, val)
ap_filter_rec_t * ap_core_input_filter_handle
int ap_allow_options(request_rec *r)
const unsigned char * buf
apr_dbd_transaction_t int mode
const char apr_ssize_t int flags
#define APR_DECLARE_OPTIONAL_FN(ret, name, args)
apr_vformatter_buff_t * c
const void apr_size_t bytes
apr_int64_t apr_interval_time_t
const char * ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip)
const char * ap_get_useragent_host(request_rec *req, int type, int *str_is_ip)
static int authz_some_auth_required(request_rec *r)
static const char * ap_ident_lookup(request_rec *r)
static void ap_logio_add_bytes_in(conn_rec *c, apr_off_t bytes)
static apr_off_t ap_logio_get_last_bytes(conn_rec *c)
static void ap_logio_add_bytes_out(conn_rec *c, apr_off_t bytes)
ap_errorlog_handler_fn_t * func
const request_rec * rmain
This structure is used for recording information about the registered filters. It associates a name w...
The representation of a filter chain.
Structure to store things which are per connection.
Per-directory configuration.
unsigned add_default_charset
apr_hash_t * response_code_exprs
const char * output_filters
apr_array_header_t * sec_file
etag_components_t etag_add
const char * input_filters
allow_options_t override_opts
const char * add_default_charset_name
server_signature_e server_signature
apr_hash_t * cgi_var_rules
char ** response_code_strings
unsigned int hostname_lookups
apr_array_header_t * refs
apr_array_header_t * sec_if
unsigned int condition_ifelse
etag_components_t etag_remove
unsigned use_canonical_name
ap_expr_info_t * expr_handler
unsigned int enable_sendfile
unsigned int qualify_redirect_url
unsigned int use_canonical_phys_port
apr_table_t * override_list
unsigned int allow_encoded_slashes
ap_expr_info_t * condition
unsigned int cgi_pass_auth
allow_options_t opts_remove
unsigned int decode_encoded_slashes
etag_components_t etag_bits
apr_bucket_brigade * tmpbb
apr_socket_t * client_socket
core_output_filter_ctx_t * out_ctx
Per-request configuration.
char ** response_code_strings
const char * document_root
const char * context_document_root
struct apr_bucket_brigade * bb
const char * context_prefix
const char * ap_document_root
apr_array_header_t * error_log_conn
apr_array_header_t * error_log_req
apr_array_header_t * sec_dir
apr_int32_t flush_max_pipelined
int protocols_honor_order
apr_array_header_t * protocols
apr_size_t flush_max_threshold
unsigned int merge_slashes
apr_array_header_t * error_log_format
unsigned int strict_host_check
apr_array_header_t * sec_url
A structure that represents the current request.
A structure to keep track of authorization requirements.
A structure to store information for each virtual server.
ap_input_mode_t
input filtering modes