Apache HTTPD
Typedefs

Typedefs

typedef int ap_HOOK_mpm_t(apr_pool_t *pconf, apr_pool_t *plog, server_rec *server_conf)
 
typedef void ap_HOOK_child_status_t(server_rec *s, pid_t pid, ap_generation_t gen, int slot, mpm_child_status state)
 
typedef void ap_HOOK_end_generation_t(server_rec *s, ap_generation_t gen)
 
typedef int ap_HOOK_header_parser_t(request_rec *r)
 
typedef int ap_HOOK_pre_config_t(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
 
typedef int ap_HOOK_check_config_t(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 
typedef void ap_HOOK_test_config_t(apr_pool_t *pconf, server_rec *s)
 
typedef int ap_HOOK_post_config_t(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 
typedef int ap_HOOK_open_logs_t(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 
typedef void ap_HOOK_child_init_t(apr_pool_t *pchild, server_rec *s)
 
typedef int ap_HOOK_handler_t(request_rec *r)
 
typedef int ap_HOOK_quick_handler_t(request_rec *r, int lookup_uri)
 
typedef void ap_HOOK_optional_fn_retrieve_t(void)
 
typedef apr_status_t ap_HOOK_open_htaccess_t(request_rec *r, const char *dir_name, const char *access_name, ap_configfile_t **conffile, const char **full_name)
 
typedef int ap_HOOK_get_mgmt_items_t(apr_pool_t *p, const char *val, apr_hash_t *ht)
 
typedef void ap_HOOK_error_log_t(const ap_errorlog_info *info, const char *errstr)
 
typedef int ap_HOOK_generate_log_id_t(const conn_rec *c, const request_rec *r, const char **id)
 
typedef void ap_HOOK_insert_error_filter_t(request_rec *r)
 
typedef int ap_HOOK_create_request_t(request_rec *r)
 
typedef int ap_HOOK_pre_translate_name_t(request_rec *r)
 
typedef int ap_HOOK_translate_name_t(request_rec *r)
 
typedef int ap_HOOK_map_to_storage_t(request_rec *r)
 
typedef int ap_HOOK_check_user_id_t(request_rec *r)
 
typedef int ap_HOOK_fixups_t(request_rec *r)
 
typedef int ap_HOOK_type_checker_t(request_rec *r)
 
typedef int ap_HOOK_access_checker_t(request_rec *r)
 
typedef int ap_HOOK_access_checker_ex_t(request_rec *r)
 
typedef int ap_HOOK_auth_checker_t(request_rec *r)
 
typedef void ap_HOOK_insert_filter_t(request_rec *r)
 
typedef int ap_HOOK_post_perdir_config_t(request_rec *r)
 
typedef int ap_HOOK_force_authn_t(request_rec *r)
 
typedef apr_status_t ap_HOOK_dirwalk_stat_t(apr_finfo_t *finfo, request_rec *r, apr_int32_t wanted)
 
typedef int ap_HOOK_ssl_conn_is_ssl_t(conn_rec *c)
 
typedef const charap_HOOK_ssl_var_lookup_t(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, const char *name)
 
typedef void ap_HOOK_suspend_connection_t(conn_rec *c, request_rec *r)
 
typedef void ap_HOOK_resume_connection_t(conn_rec *c, request_rec *r)
 
typedef int ap_HOOK_pre_mpm_t(apr_pool_t *p, ap_scoreboard_e sb_type)
 

Detailed Description

Typedef Documentation

◆ ap_HOOK_access_checker_ex_t

typedef int ap_HOOK_access_checker_ex_t(request_rec *r)

This hook is used to apply additional access control and/or bypass authentication for this resource. It runs before a user is authenticated, but after the auth_checker hook. This hook should be registered with ap_hook_check_access_ex().

Parameters
rthe current request
Returns
OK (allow access), DECLINED (let later modules decide), or HTTP_... (deny access)
See also
ap_hook_check_access_ex

Definition at line 463 of file http_request.h.

◆ ap_HOOK_access_checker_t

typedef int ap_HOOK_access_checker_t(request_rec *r)

This hook is used to apply additional access control to this resource. It runs before a user is authenticated, so this hook is really to apply additional restrictions independent of a user. It also runs independent of 'Require' directive usage. This hook should be registered with ap_hook_check_access().

Parameters
rthe current request
Returns
OK, DECLINED, or HTTP_...
See also
ap_hook_check_access

Definition at line 449 of file http_request.h.

◆ ap_HOOK_auth_checker_t

typedef int ap_HOOK_auth_checker_t(request_rec *r)

This hook is used to check to see if the resource being requested is available for the authenticated user (r->user and r->ap_auth_type). It runs after the access_checker and check_user_id hooks. Note that it will only be called if Apache determines that access control has been applied to this resource (through a 'Require' directive). This hook should be registered with ap_hook_check_authz().

Parameters
rthe current request
Returns
OK, DECLINED, or HTTP_...
See also
ap_hook_check_authz

Definition at line 478 of file http_request.h.

◆ ap_HOOK_check_config_t

typedef int ap_HOOK_check_config_t(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)

Run the check_config function for each module

Parameters
pconfThe config pool
plogThe logging streams pool
ptempThe temporary pool
sthe server to operate upon
Returns
OK or DECLINED on success anything else is a error

Definition at line 1326 of file http_config.h.

◆ ap_HOOK_check_user_id_t

typedef int ap_HOOK_check_user_id_t(request_rec *r)

This hook is used to analyze the request headers, authenticate the user, and set the user information in the request record (r->user and r->ap_auth_type). This hook is only run when Apache determines that authentication/authorization is required for this resource (as determined by the 'Require' directive). It runs after the access_checker hook, and before the auth_checker hook. This hook should be registered with ap_hook_check_authn().

Parameters
rThe current request
Returns
OK, DECLINED, or HTTP_...
See also
ap_hook_check_authn

Definition at line 416 of file http_request.h.

◆ ap_HOOK_child_init_t

typedef void ap_HOOK_child_init_t(apr_pool_t *pchild, server_rec *s)

Run the child_init functions for each module

Parameters
pchildThe child pool
sThe list of server_recs in this server

Definition at line 1380 of file http_config.h.

◆ ap_HOOK_child_status_t

typedef void ap_HOOK_child_status_t(server_rec *s, pid_t pid, ap_generation_t gen, int slot, mpm_child_status state)

Allow a module to remain aware of MPM child process state changes, along with the generation and scoreboard slot of the process changing state.

With some MPMs (event and worker), an active MPM child process may lose its scoreboard slot if the child process is exiting and the scoreboard slot is needed by other processes. When this occurs, the hook will be called with the MPM_CHILD_LOST_SLOT state.

Parameters
sThe main server_rec.
pidThe id of the MPM child process.
genThe server generation of that child process.
slotThe scoreboard slot number, or -1. It will be -1 when an MPM child process exits, and that child had previously lost its scoreboard slot.
stateOne of the mpm_child_status values. Modules should ignore unrecognized values.

Definition at line 232 of file ap_mpm.h.

◆ ap_HOOK_create_request_t

typedef int ap_HOOK_create_request_t(request_rec *r)

Gives modules a chance to create their request_config entry when the request is created.

Parameters
rThe current request

Definition at line 363 of file http_request.h.

◆ ap_HOOK_dirwalk_stat_t

typedef apr_status_t ap_HOOK_dirwalk_stat_t(apr_finfo_t *finfo, request_rec *r, apr_int32_t wanted)

This hook allows modules to handle/emulate the apr_stat() calls needed for directory walk.

Parameters
finfowhere to put the stat data
rThe current request
wantedAPR_FINFO_* flags to pass to apr_stat()
Returns
apr_status_t or AP_DECLINED (let later modules decide)

Definition at line 589 of file http_request.h.

◆ ap_HOOK_end_generation_t

typedef void ap_HOOK_end_generation_t(server_rec *s, ap_generation_t gen)

Allow a module to be notified when the last child process of a generation exits.

Parameters
sThe main server_rec.
genThe server generation which is now completely finished.

Definition at line 242 of file ap_mpm.h.

◆ ap_HOOK_error_log_t

typedef void ap_HOOK_error_log_t(const ap_errorlog_info *info, const char *errstr)

hook method to log error messages

Parameters
infopointer to ap_errorlog_info struct which contains all the details
errstrthe (unformatted) message to log
Warning
Allocating from the usual pools (pool, info->c->pool, info->p->pool) must be avoided because it can cause memory leaks. Use a subpool if necessary.

Definition at line 988 of file http_core.h.

◆ ap_HOOK_fixups_t

typedef int ap_HOOK_fixups_t(request_rec *r)

Allows modules to perform module-specific fixing of header fields. This is invoked just before any content-handler

Parameters
rThe current request
Returns
OK, DECLINED, or HTTP_...

Definition at line 425 of file http_request.h.

◆ ap_HOOK_force_authn_t

typedef int ap_HOOK_force_authn_t(request_rec *r)

This hook allows a module to force authn to be required when processing a request. This hook should be registered with ap_hook_force_authn().

Parameters
rThe current request
Returns
OK (force authn), DECLINED (let later modules decide)

Definition at line 578 of file http_request.h.

◆ ap_HOOK_generate_log_id_t

typedef int ap_HOOK_generate_log_id_t(const conn_rec *c, const request_rec *r, const char **id)

hook method to generate unique id for connection or request

Parameters
cthe conn_rec of the connections
rthe request_req (may be NULL)
idthe place where to store the unique id
Returns
OK or DECLINE

Definition at line 828 of file http_log.h.

◆ ap_HOOK_get_mgmt_items_t

typedef int ap_HOOK_get_mgmt_items_t(apr_pool_t *p, const char *val, apr_hash_t *ht)

This hook provdes a way for modules to provide metrics/statistics about their operational status.

Parameters
pA pool to use to create entries in the hash table
valThe name of the parameter(s) that is wanted. This is tree-structured would be in the form ('*' is all the tree, 'module.*' all of the module , 'module.foo.*', or 'module.foo.bar' )
htThe hash table to store the results. Keys are item names, and the values point to ap_mgmt_item_t structures.

Definition at line 863 of file http_core.h.

◆ ap_HOOK_handler_t

typedef int ap_HOOK_handler_t(request_rec *r)

Run the handler functions for each module

Parameters
rThe request_rec
Remarks
non-wildcard handlers should HOOK_MIDDLE, wildcard HOOK_LAST

Definition at line 1388 of file http_config.h.

◆ ap_HOOK_header_parser_t

typedef int ap_HOOK_header_parser_t(request_rec *r)

Run the header parser functions for each module

Parameters
rThe current request
Returns
OK or DECLINED

Definition at line 1303 of file http_config.h.

◆ ap_HOOK_insert_error_filter_t

typedef void ap_HOOK_insert_error_filter_t(request_rec *r)

This hook allows modules to insert filters for the current error response

Parameters
rthe current request

Definition at line 44 of file http_protocol.h.

◆ ap_HOOK_insert_filter_t

typedef void ap_HOOK_insert_filter_t(request_rec *r)

This hook allows modules to insert filters for the current request

Parameters
rthe current request

Definition at line 558 of file http_request.h.

◆ ap_HOOK_map_to_storage_t

typedef int ap_HOOK_map_to_storage_t(request_rec *r)

This hook allow modules to set the per_dir_config based on their own context (such as "<Proxy>" sections) and responds to contextless requests such as TRACE that need no security or filesystem mapping. based on the filesystem.

Parameters
rThe current request
Returns
DONE (or HTTP_) if this contextless request was just fulfilled (such as TRACE), OK if this is not a file, and DECLINED if this is a file. The core map_to_storage (HOOK_RUN_REALLY_LAST) will directory_walk and file_walk the r->filename.

Definition at line 400 of file http_request.h.

◆ ap_HOOK_mpm_t

Pass control to the MPM for steady-state processing. It is responsible for controlling the parent and child processes. It will run until a restart/shutdown is indicated.

Parameters
pconfthe configuration pool, reset before the config file is read
plogthe log pool, reset after the config file is read
server_confthe global server config.
Returns
DONE for shutdown OK otherwise.

Definition at line 93 of file ap_mpm.h.

◆ ap_HOOK_open_htaccess_t

Allow modules to open htaccess files or perform operations before doing so

Parameters
rThe current request
dir_nameThe directory for which the htaccess file should be opened
access_nameThe filename for which the htaccess file should be opened
conffileWhere the pointer to the opened ap_configfile_t must be stored
full_nameWhere the full file name of the htaccess file must be stored.
Returns
APR_SUCCESS on success, APR_ENOENT or APR_ENOTDIR if no htaccess file exists, AP_DECLINED to let later modules do the opening, any other error code on error.

Definition at line 1429 of file http_config.h.

◆ ap_HOOK_open_logs_t

typedef int ap_HOOK_open_logs_t(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)

Run the open_logs functions for each module

Parameters
pconfThe config pool
plogThe logging streams pool
ptempThe temporary pool
sThe list of server_recs
Returns
OK or DECLINED on success anything else is a error

Definition at line 1372 of file http_config.h.

◆ ap_HOOK_optional_fn_retrieve_t

typedef void ap_HOOK_optional_fn_retrieve_t(void)

Retrieve the optional functions for each module. This is run immediately before the server starts. Optional functions should be registered during the hook registration phase.

Definition at line 1410 of file http_config.h.

◆ ap_HOOK_post_config_t

typedef int ap_HOOK_post_config_t(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)

Run the post_config function for each module

The function might be called multiple times. pconf, plog, and ptemp may be cleared and/or destroyed between calls.

The function will be called zero or one times with the server's state being AP_SQ_MS_CREATE_PRE_CONFIG, and will be called one or more times with the server's state being AP_SQ_MS_CREATE_CONFIG.

See also
ap_state_query(), AP_SQ_MAIN_STATE
Parameters
pconfThe config pool
plogThe logging streams pool
ptempThe temporary pool
sThe list of server_recs
Returns
OK or DECLINED on success anything else is a error

Definition at line 1360 of file http_config.h.

◆ ap_HOOK_post_perdir_config_t

typedef int ap_HOOK_post_perdir_config_t(request_rec *r)

This hook allows modules to affect the request immediately after the per-directory configuration for the request has been generated.

Parameters
rThe current request
Returns
OK (allow access), DECLINED (let later modules decide), or HTTP_... (deny access)

Definition at line 568 of file http_request.h.

◆ ap_HOOK_pre_config_t

typedef int ap_HOOK_pre_config_t(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)

Run the pre_config function for each module

Parameters
pconfThe config pool
plogThe logging streams pool
ptempThe temporary pool
Returns
OK or DECLINED on success anything else is a error

Definition at line 1314 of file http_config.h.

◆ ap_HOOK_pre_mpm_t

Hook for post scoreboard creation, pre mpm.

Parameters
pApache pool to allocate from.
sb_type
Returns
OK or DECLINE on success; anything else is a error

Definition at line 246 of file scoreboard.h.

◆ ap_HOOK_pre_translate_name_t

typedef int ap_HOOK_pre_translate_name_t(request_rec *r)

This hook allow modules an opportunity to translate the URI into an actual filename, before URL decoding happens.

Parameters
rThe current request
Returns
DECLINED to let other modules handle the pre-translation, OK if it was handled and no other module should process it, DONE if no further transformation should happen on the URI, HTTP_... in case of error.

Definition at line 375 of file http_request.h.

◆ ap_HOOK_quick_handler_t

typedef int ap_HOOK_quick_handler_t(request_rec *r, int lookup_uri)

Run the quick handler functions for each module. The quick_handler is run before any other requests hooks are called (location_walk, directory_walk, access checking, et. al.). This hook was added to provide a quick way to serve content from a URI keyed cache.

Parameters
rThe request_rec
lookup_uriControls whether the caller actually wants content or not. lookup is set when the quick_handler is called out of ap_sub_req_lookup_uri()

Definition at line 1402 of file http_config.h.

◆ ap_HOOK_resume_connection_t

typedef void ap_HOOK_resume_connection_t(conn_rec *c, request_rec *r)

Notification that connection handling is resuming (associating with a thread)

Parameters
cThe current connection
rThe current request, or NULL if there is no active request
See also
ap_hook_suspend_connection
Note
This hook is not implemented by MPMs like Prefork and Worker which handle all processing of a particular connection on the same thread.
This hook will be called on the thread that will resume processing the connection.
This hook is not called at the beginning of connection processing. This hook only notifies a module when processing resumes for a previously-suspended connection.
Resumption and subsequent suspension of a connection solely to perform I/O by the MPM, with no execution of non-MPM code, may not necessarily result in a call to this hook.

Definition at line 453 of file mpm_common.h.

◆ ap_HOOK_ssl_conn_is_ssl_t

typedef int ap_HOOK_ssl_conn_is_ssl_t(conn_rec *c)

This hook allows modules that manage SSL connection to register their inquiry function for checking if a connection is using SSL from them.

Parameters
cThe current connection
Returns
OK if the connection is using SSL, DECLINED if not.

Definition at line 46 of file http_ssl.h.

◆ ap_HOOK_ssl_var_lookup_t

typedef const char * ap_HOOK_ssl_var_lookup_t(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, const char *name)

This hook allows modules to look up SSL related variables for a server/connection/request, depending on what they inquire. Some variables will only be available for a connection/request, for example.

Parameters
pThe pool to allocate a returned value in, MUST be provided
sThe server to inquire a value for, maybe NULL
cThe current connection, maybe NULL
rThe current request, maybe NULL
nameThe name of the variable to retrieve, MUST be provided
Returns
value or the variable or NULL if not provided/available

Definition at line 102 of file http_ssl.h.

◆ ap_HOOK_suspend_connection_t

typedef void ap_HOOK_suspend_connection_t(conn_rec *c, request_rec *r)

Notification that connection handling is suspending (disassociating from the current thread)

Parameters
cThe current connection
rThe current request, or NULL if there is no active request
See also
ap_hook_resume_connection
Note
This hook is not implemented by MPMs like Prefork and Worker which handle all processing of a particular connection on the same thread.
This hook will be called on the thread that was previously processing the connection.
This hook is not called at the end of connection processing. This hook only notifies a module when processing of an active connection is suspended.
Resumption and subsequent suspension of a connection solely to perform I/O by the MPM, with no execution of non-MPM code, may not necessarily result in a call to this hook.

Definition at line 433 of file mpm_common.h.

◆ ap_HOOK_test_config_t

typedef void ap_HOOK_test_config_t(apr_pool_t *pconf, server_rec *s)

Run the test_config function for each module; this hook is run only if the server was invoked to test the configuration syntax.

Parameters
pconfThe config pool
sThe list of server_recs
Note
To avoid reordering problems due to different buffering, hook functions should only apr_file_*() to print to stdout/stderr and not simple printf()/fprintf().

Definition at line 1338 of file http_config.h.

◆ ap_HOOK_translate_name_t

typedef int ap_HOOK_translate_name_t(request_rec *r)

This hook allow modules an opportunity to translate the URI into an actual filename. If no modules do anything special, the server's default rules will be followed.

Parameters
rThe current request
Returns
OK, DECLINED, or HTTP_...

Definition at line 385 of file http_request.h.

◆ ap_HOOK_type_checker_t

typedef int ap_HOOK_type_checker_t(request_rec *r)

This routine is called to determine and/or set the various document type information bits, like Content-type (via r->content_type), language, et cetera.

Parameters
rthe current request
Returns
OK, DECLINED, or HTTP_...

Definition at line 435 of file http_request.h.