72#ifdef HAVE_UNIX_SUEXEC
111#define CONFIG_MODE_SERVER 1
112#define CONFIG_MODE_DIRECTORY 2
113#define CONFIG_MODE_COMBO 3
132module AP_MODULE_DECLARE_DATA example_hooks_module;
323#ifndef EXAMPLE_LOG_EACH
324#define EXAMPLE_LOG_EACH 0
332 "mod_example_hooks: %s",
note);
338 "context: %s\n",
note);
372 " <dt><samp>",
note,
"</samp></dt>\n"
373 " <dd><samp>[",
where,
"]</samp></dd>\n"
392#define TRACE_NOTE "example-hooks-trace"
416 " <dt><samp>",
note,
"</samp></dt>\n"
417 " <dd><samp>[",
where,
"]</samp></dd>\n"
438#define CONN_NOTE "example-hooks-connection"
459 " <dt><samp>",
note,
"</samp></dt>\n"
460 " <dd><samp>[",
where,
"]</samp></dd>\n"
494#ifdef EXAMPLE_LOG_EACH
623 "%pp, newloc_conf == %pp)", (
void*)
p,
640 char *sname =
s->server_hostname;
653 sname = (sname !=
NULL) ? sname :
"";
840 sname = (sname !=
NULL) ? sname :
"";
854 char *sname =
s->server_hostname;
860 sname = (sname !=
NULL) ? sname :
"";
1012 ap_rputs(
" <TITLE>mod_example_hooks Module Content-Handler Output\n",
r);
1016 ap_rputs(
" <H1><SAMP>mod_example_hooks</SAMP> Module Content-Handler Output\n",
r);
1019 ap_rprintf(
r,
" Apache HTTP Server version: \"%s\"\n",
1025 ap_rputs(
" The format for the callback trace is:\n",
r);
1028 ap_rputs(
" <DT><EM>n</EM>.<SAMP><routine-name>",
r);
1029 ap_rputs(
"(<routine-data>)</SAMP>\n",
r);
1031 ap_rputs(
" <DD><SAMP>[<applies-to>]</SAMP>\n",
r);
1035 ap_rputs(
" The <SAMP><routine-data></SAMP> is supplied by\n",
r);
1036 ap_rputs(
" the routine when it requests the trace,\n",
r);
1037 ap_rputs(
" and the <SAMP><applies-to></SAMP> is extracted\n",
r);
1038 ap_rputs(
" from the configuration record at the time of the trace.\n",
r);
1039 ap_rputs(
" <STRONG>SVR()</STRONG> indicates a server environment\n",
r);
1040 ap_rputs(
" (blank means the main or default server, otherwise it's\n",
r);
1041 ap_rputs(
" the name of the VirtualHost); <STRONG>DIR()</STRONG>\n",
r);
1042 ap_rputs(
" indicates a location in the URL or filesystem\n",
r);
1045 ap_rprintf(
r,
" <H2>Startup callbacks so far:</H2>\n <OL>\n%s </OL>\n",
1047 ap_rputs(
" <H2>Connection-specific callbacks so far:</H2>\n",
r);
1055 ap_rputs(
" <P>No connection-specific callback information was "
1056 "retrieved.</P>\n",
r);
1059 ap_rputs(
" <H2>Request-specific callbacks so far:</H2>\n",
r);
1061 ap_rputs(
" <H2>Environment for <EM>this</EM> call:</H2>\n",
r);
1063 ap_rprintf(
r,
" <LI>Applies-to: <SAMP>%s</SAMP>\n </LI>\n",
dcfg->loc);
1064 ap_rprintf(
r,
" <LI>\"Example\" directive declared here: %s\n </LI>\n",
1065 (
dcfg->local ?
"YES" :
"NO"));
1066 ap_rprintf(
r,
" <LI>\"Example\" inherited: %s\n </LI>\n",
1067 (
dcfg->congenital ?
"YES" :
"NO"));
1123 (
void*)
c, (
void*)
c->pool);
1343#ifdef HAVE_UNIX_SUEXEC
1500#ifdef HAVE_UNIX_SUEXEC
1529 "Example directive - no arguments"
void ap_hook_process_connection(ap_HOOK_process_connection_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_create_connection(ap_HOOK_create_connection_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_pre_connection(ap_HOOK_pre_connection_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
static apr_pool_t * pconf
#define ap_get_module_config(v, m)
void ap_hook_header_parser(ap_HOOK_header_parser_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_post_config(ap_HOOK_post_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_test_config(ap_HOOK_test_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define AP_DECLARE_MODULE(foo)
void ap_hook_quick_handler(ap_HOOK_quick_handler_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_open_logs(ap_HOOK_open_logs_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_check_config(ap_HOOK_check_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_handler(ap_HOOK_handler_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_pre_config(ap_HOOK_pre_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define AP_INIT_NO_ARGS(directive, func, mconfig, where, help)
void ap_hook_child_init(ap_HOOK_child_init_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
const char * ap_get_server_built(void)
const char * ap_get_server_banner(void)
void ap_hook_get_mgmt_items(ap_HOOK_get_mgmt_items_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define APLOG_MODULE_INDEX
void ap_hook_http_scheme(ap_HOOK_http_scheme_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_log_transaction(ap_HOOK_log_transaction_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
int ap_rprintf(request_rec *r, const char *fmt,...) __attribute__((format(printf
void ap_hook_pre_read_request(ap_HOOK_pre_read_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
static APR_INLINE int ap_rputs(const char *str, request_rec *r)
void ap_hook_insert_error_filter(ap_HOOK_insert_error_filter_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_set_content_type_ex(request_rec *r, const char *ct, int trusted)
void ap_hook_post_read_request(ap_HOOK_post_read_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_default_port(ap_HOOK_default_port_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define AP_AUTH_INTERNAL_PER_CONF
void ap_hook_pre_translate_name(ap_HOOK_pre_translate_name_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_check_access(ap_HOOK_access_checker_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder, int type)
void ap_hook_translate_name(ap_HOOK_translate_name_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_map_to_storage(ap_HOOK_map_to_storage_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_fixups(ap_HOOK_fixups_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_create_request(ap_HOOK_create_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_type_checker(ap_HOOK_type_checker_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_check_authn(ap_HOOK_check_user_id_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder, int type)
void ap_hook_insert_filter(ap_HOOK_insert_filter_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_check_authz(ap_HOOK_auth_checker_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder, int type)
void ap_hook_monitor(ap_HOOK_monitor_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
apr_memcache_server_t * server
#define STANDARD20_MODULE_STUFF
const char apr_file_t * file
apr_vformatter_buff_t * c
#define apr_pcalloc(p, size)
Apache connection library.
static int x_create_request(request_rec *r)
static int x_header_parser(request_rec *r)
static int x_pre_translate_name(request_rec *r)
static void * x_merge_server_config(apr_pool_t *p, void *server1_conf, void *server2_conf)
#define CONFIG_MODE_COMBO
static void x_register_hooks(apr_pool_t *p)
static int x_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
static int x_check_authn(request_rec *r)
#define CONFIG_MODE_DIRECTORY
static const char * cmd_example(cmd_parms *cmd, void *mconfig)
static void trace_nocontext(apr_pool_t *p, const char *file, int line, const char *note)
static int x_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
static void * x_create_dir_config(apr_pool_t *p, char *dirspec)
static int x_check_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
static void * x_create_server_config(apr_pool_t *p, server_rec *s)
static int x_process_connection(conn_rec *c)
static int x_get_mgmt_items(apr_pool_t *p, const char *val, apr_hash_t *ht)
static int x_fixups(request_rec *r)
static int x_type_checker(request_rec *r)
static void x_insert_filter(request_rec *r)
static x_cfg * our_dconfig(const request_rec *r)
static void x_insert_error_filter(request_rec *r)
static const char * trace
static void trace_request(const request_rec *r, const char *note)
static int x_monitor(apr_pool_t *p, server_rec *s)
static int x_post_read_request(request_rec *r)
static int x_pre_connection(conn_rec *c, void *csd)
static void trace_connection(conn_rec *c, const char *note)
static int x_log_transaction(request_rec *r)
#define CONFIG_MODE_SERVER
static apr_port_t x_default_port(const request_rec *r)
static int x_map_to_storage(request_rec *r)
static int x_check_access(request_rec *r)
static apr_status_t x_child_exit(void *data)
static conn_rec * x_create_connection(apr_pool_t *p, server_rec *server, apr_socket_t *csd, long conn_id, void *sbh, apr_bucket_alloc_t *alloc)
static const command_rec x_cmds[]
static int x_quick_handler(request_rec *r, int lookup_uri)
static x_cfg * our_cconfig(const conn_rec *c)
static int x_handler(request_rec *r)
static void * x_merge_dir_config(apr_pool_t *p, void *parent_conf, void *newloc_conf)
static void x_child_init(apr_pool_t *p, server_rec *s)
static int x_pre_mpm(apr_pool_t *p, ap_scoreboard_e sb_type)
static void x_pre_read_request(request_rec *r, conn_rec *c)
static void trace_startup(apr_pool_t *p, server_rec *s, x_cfg *mconfig, const char *note)
static void x_test_config(apr_pool_t *pconf, server_rec *s)
static int x_check_authz(request_rec *r)
static int x_open_logs(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
static const char * x_http_scheme(const request_rec *r)
static int x_translate_name(request_rec *r)
Multi-Processing Modules functions.
Apache scoreboard library.
void ap_hook_pre_mpm(ap_HOOK_pre_mpm_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
Structure to store things which are per connection.
A structure that represents the current request.
struct ap_conf_vector_t * request_config
struct ap_conf_vector_t * per_dir_config
A structure to store information for each virtual server.