void h2_h2_register_hooks(void) { /* This hook runs on new connections before mod_ssl has a say. * Its purpose is to prevent mod_ssl from touching our pseudo-connections * for streams. */ ap_hook_pre_connection(h2_h2_stream_pre_conn, NULL, mod_ssl, APR_HOOK_FIRST); /* This hook runs on new connection after mod_ssl, but before the core * httpd. Its purpose is to register, if TLS is used, the ALPN callbacks * that enable us to chose "h2" as next procotol if the client supports it. */ ap_hook_pre_connection(h2_h2_pre_conn, mod_ssl, mod_core, APR_HOOK_LAST); /* When the connection processing actually starts, we might to * take over, if h2* was selected by ALPN on a TLS connection. */ ap_hook_process_connection(h2_h2_process_conn, NULL, NULL, APR_HOOK_FIRST); /* Perform connection cleanup before the actual processing happens. */ ap_hook_process_connection(h2_h2_cleanup_conn, mod_reqtimeout, NULL, APR_HOOK_LAST); ap_hook_post_read_request(h2_h2_post_read_req, NULL, NULL, APR_HOOK_MIDDLE); }
static void mag_register_hooks(apr_pool_t *p) { ap_hook_check_user_id(mag_auth, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_post_config(mag_post_config, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_pre_connection(mag_pre_connection, NULL, NULL, APR_HOOK_MIDDLE); }
void h2_task_register_hooks(void) { /* This hook runs on new connections before mod_ssl has a say. * Its purpose is to prevent mod_ssl from touching our pseudo-connections * for streams. */ ap_hook_pre_connection(h2_task_pre_conn, NULL, mod_ssl, APR_HOOK_FIRST); /* When the connection processing actually starts, we might to * take over, if the connection is for a task. */ ap_hook_process_connection(h2_task_process_conn, NULL, NULL, APR_HOOK_FIRST); ap_register_output_filter("H2_RESPONSE", h2_response_output_filter, NULL, AP_FTYPE_PROTOCOL); ap_register_input_filter("H2_TO_H1", h2_filter_stream_input, NULL, AP_FTYPE_NETWORK); ap_register_output_filter("H1_TO_H2", h2_filter_stream_output, NULL, AP_FTYPE_NETWORK); ap_register_output_filter("H1_TO_H2_RESP", h2_filter_read_response, NULL, AP_FTYPE_PROTOCOL); ap_register_output_filter("H2_TRAILERS", h2_response_trailers_filter, NULL, AP_FTYPE_PROTOCOL); }
static void ssl_register_hooks(apr_pool_t *p) { /* ssl_hook_ReadReq needs to use the BrowserMatch settings so must * run after mod_setenvif's post_read_request hook. */ static const char *pre_prr[] = { "mod_setenvif.c", NULL }; ssl_io_filter_register(p); ap_hook_pre_connection(ssl_hook_pre_connection,NULL,NULL, APR_HOOK_MIDDLE); ap_hook_test_config (ssl_hook_ConfigTest, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_post_config (ssl_init_Module, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_http_scheme (ssl_hook_http_scheme, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_default_port (ssl_hook_default_port, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_pre_config (ssl_hook_pre_config, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_child_init (ssl_init_Child, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_check_user_id (ssl_hook_UserCheck, NULL,NULL, APR_HOOK_FIRST); ap_hook_fixups (ssl_hook_Fixup, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_access_checker(ssl_hook_Access, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_auth_checker (ssl_hook_Auth, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_post_read_request(ssl_hook_ReadReq, pre_prr,NULL, APR_HOOK_MIDDLE); ap_hook_insert_filter (ssl_hook_Insert_Filter, NULL,NULL, APR_HOOK_MIDDLE); /* ap_hook_handler (ssl_hook_Upgrade, NULL,NULL, APR_HOOK_MIDDLE); */ ssl_var_register(p); APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable); APR_REGISTER_OPTIONAL_FN(ssl_engine_disable); APR_REGISTER_OPTIONAL_FN(ssl_extlist_by_oid); }
void h2_task_register_hooks(void) { /* This hook runs on new connections before mod_ssl has a say. * Its purpose is to prevent mod_ssl from touching our pseudo-connections * for streams. */ ap_hook_pre_connection(h2_task_pre_conn, NULL, mod_ssl, APR_HOOK_FIRST); /* When the connection processing actually starts, we might * take over, if the connection is for a task. */ ap_hook_process_connection(h2_task_process_conn, NULL, NULL, APR_HOOK_FIRST); ap_register_input_filter("H2_SLAVE_IN", h2_filter_slave_in, NULL, AP_FTYPE_NETWORK); ap_register_output_filter("H2_SLAVE_OUT", h2_filter_slave_output, NULL, AP_FTYPE_NETWORK); ap_register_output_filter("H2_PARSE_H1", h2_filter_parse_h1, NULL, AP_FTYPE_NETWORK); ap_register_input_filter("H2_REQUEST", h2_filter_request_in, NULL, AP_FTYPE_PROTOCOL); ap_register_output_filter("H2_RESPONSE", h2_filter_headers_out, NULL, AP_FTYPE_PROTOCOL); ap_register_output_filter("H2_TRAILERS_OUT", h2_filter_trailers_out, NULL, AP_FTYPE_PROTOCOL); }
/* * Define the hooks and the functions registered to those hooks */ void dtrace_register_hooks(apr_pool_t *p) { ap_hook_post_read_request(apache_receive_request,NULL,NULL,APR_HOOK_MIDDLE); ap_hook_child_init(apache_create_child,NULL, NULL, APR_HOOK_MIDDLE); ap_hook_pre_connection(apache_accept_connection,NULL, NULL, APR_HOOK_MIDDLE); ap_hook_check_user_id(apache_check_user,NULL,NULL,APR_HOOK_MIDDLE); ap_hook_access_checker(apache_check_access,NULL,NULL,APR_HOOK_MIDDLE); ap_hook_auth_checker(apache_check_authorization,NULL,NULL,APR_HOOK_MIDDLE); ap_hook_log_transaction(apache_log_request,NULL,NULL,APR_HOOK_MIDDLE); }
/** * Main entry point. */ static void mod_sslhaf_register_hooks(apr_pool_t *p) { static const char * const afterme[] = { "mod_security2.c", NULL }; ap_hook_pre_connection(mod_sslhaf_pre_conn, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_post_read_request(mod_sslhaf_post_request, NULL, afterme, APR_HOOK_REALLY_FIRST); ap_register_input_filter(mod_sslhaf_in_filter_name, mod_sslhaf_in_filter, NULL, AP_FTYPE_NETWORK - 1); ap_register_output_filter(mod_sslhaf_out_filter_name, mod_sslhaf_out_filter, NULL, AP_FTYPE_NETWORK - 1); }
static void register_hooks(apr_pool_t *p) { static const char *pre[] = { "mod_log_config.c", NULL }; ap_hook_pre_connection(firstbyte_pre_conn, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_pre_config(firstbyte_pre_config, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_post_read_request(firstbyte_post_req, NULL, NULL, APR_HOOK_LAST); ap_register_output_filter(firstbyte_filter_name, firstbyte_out_filter, NULL, AP_FTYPE_NETWORK - 1); }
static void dumpio_register_hooks(apr_pool_t *p) { /* * We know that SSL is CONNECTION + 5 */ ap_register_output_filter("DUMPIO_OUT", dumpio_output_filter, NULL, AP_FTYPE_CONNECTION + 3) ; ap_register_input_filter("DUMPIO_IN", dumpio_input_filter, NULL, AP_FTYPE_CONNECTION + 3) ; ap_hook_pre_connection(dumpio_pre_conn, NULL, NULL, APR_HOOK_MIDDLE); }
static void register_hooks(apr_pool_t *p) { static const char *pre[] = { "mod_log_config.c", NULL }; ap_hook_pre_connection(logio_pre_conn, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_pre_config(logio_pre_config, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_log_transaction(logio_transaction, pre, NULL, APR_HOOK_MIDDLE); ap_register_input_filter(logio_filter_name, logio_in_filter, NULL, AP_FTYPE_NETWORK - 1); APR_REGISTER_OPTIONAL_FN(ap_logio_add_bytes_out); APR_REGISTER_OPTIONAL_FN(ap_logio_add_bytes_in); APR_REGISTER_OPTIONAL_FN(ap_logio_get_last_bytes); }
/** * Registers the hooks for this module. * * @param p the pool to allocate from, if necessary. */ static void fsp_register_hooks(apr_pool_t* p) { // registers the pre-connection hook to handle adding filters ap_hook_pre_connection( fsp_pre_connection, NULL, NULL, APR_HOOK_MIDDLE); // will parse a policy file request, to be added in pre_connection ap_register_input_filter( "fsp_request", fsp_input_filter, NULL, AP_FTYPE_CONNECTION); // will emit a cross-domain policy response to be added in pre_connection ap_register_output_filter( "fsp_response", fsp_output_filter, NULL, AP_FTYPE_CONNECTION); }
static void register_hooks(apr_pool_t *p) { static const char *const postread_afterme_list[] = { "mod_security2.c", NULL }; /* * mod_ssl is AP_FTYPE_CONNECTION + 5 and mod_myfixip needs to * be called before mod_ssl. */ ap_register_input_filter(myfixip_filter_name, helocon_filter_in, NULL, AP_FTYPE_CONNECTION + 9); ap_hook_post_config(post_config, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_child_init(child_init, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_pre_connection(pre_connection, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_post_read_request(post_read_handler, NULL, postread_afterme_list, APR_HOOK_REALLY_FIRST); }
/** * @internal * * Register functions to handle filters and hooks. */ static void ironbee_register_hooks(apr_pool_t *p) { /* Other modules: * mod_ssl = AP_FTYPE_CONNECTION + 5 * mod_expires = AP_FTYPE_CONTENT_SET - 2 * mod_cache = AP_FTYPE_CONTENT_SET - 1 * mod_deflate = AP_FTYPE_CONTENT_SET - 1 * mod_headers = AP_FTYPE_CONTENT_SET */ ap_register_input_filter( "IRONBEE_IN", ironbee_input_filter, NULL, AP_FTYPE_CONNECTION + 1 ); #ifdef IB_DEBUG ap_register_input_filter( "IRONBEE_DBG_IN", ironbee_dbg_input_filter, NULL, AP_FTYPE_CONNECTION ); #endif ap_register_output_filter( "IRONBEE_OUT", ironbee_output_filter, NULL, AP_FTYPE_CONNECTION ); ap_hook_child_init(ironbee_child_init, NULL, NULL, APR_HOOK_FIRST); ap_hook_post_config(ironbee_post_config, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_pre_connection(ironbee_pre_connection, NULL, NULL, APR_HOOK_LAST); }
static void ssl_register_hooks(apr_pool_t *p) { /* ssl_hook_ReadReq needs to use the BrowserMatch settings so must * run after mod_setenvif's post_read_request hook. */ static const char *pre_prr[] = { "mod_setenvif.c", NULL }; ssl_io_filter_register(p); ap_hook_pre_connection(ssl_hook_pre_connection,NULL,NULL, APR_HOOK_MIDDLE); ap_hook_process_connection(ssl_hook_process_connection, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_test_config (ssl_hook_ConfigTest, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_post_config (ssl_init_Module, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_http_scheme (ssl_hook_http_scheme, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_default_port (ssl_hook_default_port, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_pre_config (ssl_hook_pre_config, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_child_init (ssl_init_Child, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_check_authn (ssl_hook_UserCheck, NULL,NULL, APR_HOOK_FIRST, AP_AUTH_INTERNAL_PER_CONF); ap_hook_fixups (ssl_hook_Fixup, NULL,NULL, APR_HOOK_MIDDLE); ap_hook_check_access (ssl_hook_Access, NULL,NULL, APR_HOOK_MIDDLE, AP_AUTH_INTERNAL_PER_CONF); ap_hook_check_authz (ssl_hook_Auth, NULL,NULL, APR_HOOK_MIDDLE, AP_AUTH_INTERNAL_PER_CONF); ap_hook_post_read_request(ssl_hook_ReadReq, pre_prr,NULL, APR_HOOK_MIDDLE); ssl_var_register(p); APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable); APR_REGISTER_OPTIONAL_FN(ssl_engine_disable); ap_register_auth_provider(p, AUTHZ_PROVIDER_GROUP, "ssl", AUTHZ_PROVIDER_VERSION, &ssl_authz_provider_require_ssl, AP_AUTH_INTERNAL_PER_CONF); ap_register_auth_provider(p, AUTHZ_PROVIDER_GROUP, "ssl-verify-client", AUTHZ_PROVIDER_VERSION, &ssl_authz_provider_verify_client, AP_AUTH_INTERNAL_PER_CONF); }
static void register_hooks(apr_pool_t *p) { /* pre_connection hook needs to run after mod_ssl connection hook. */ static const char *pre_ssl[] = { "mod_ssl.c", NULL }; ap_hook_child_init(child_init, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_optional_fn_retrieve(optional_fn_retrieve, NULL,NULL,APR_HOOK_MIDDLE); ap_hook_post_config(post_config, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_pre_connection(pre_connection, pre_ssl, NULL, APR_HOOK_MIDDLE); ap_hook_create_request(create_request, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_post_read_request(post_read_request,NULL,NULL, APR_HOOK_LAST); ap_hook_check_authn(check_authn, NULL,NULL, APR_HOOK_FIRST, AP_AUTH_INTERNAL_PER_CONF); ap_hook_access_checker(access_checker, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_check_access(check_access, NULL, NULL, APR_HOOK_MIDDLE, AP_AUTH_INTERNAL_PER_CONF); ap_hook_auth_checker(auth_checker, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_fixups(fixups, NULL, NULL, APR_HOOK_LAST); ap_register_provider(p, AP_SOCACHE_PROVIDER_GROUP, "tls-aaa", AP_SOCACHE_PROVIDER_VERSION, &socache_tls_aaa); };
/* Apace Register Hooks */ static void mod_track_register_hooks (apr_pool_t *p){ //Worth trying this - //ap_hook_quick_handler - called before any request processing, used by cache modules. //After accepting connection ap_hook_pre_connection(log_pre_conn,NULL,NULL,APR_HOOK_FIRST); //Post request read ap_hook_post_read_request(log_post_conn,NULL,NULL,APR_HOOK_LAST); //header parser ap_hook_header_parser(log_header_parser, NULL, NULL, APR_HOOK_MIDDLE); //Hook before output is sent log_output_start_handle = ap_register_output_filter("MOD_TRACK", log_output_start, NULL, AP_FTYPE_CONTENT_SET+1); //cleanup handler ap_hook_access_checker(cleanup_handler, NULL, NULL, APR_HOOK_LAST); }
static void register_hooks(apr_pool_t *pool) { ap_hook_pre_connection(pre_connection, NULL, NULL, APR_HOOK_FIRST); ap_hook_post_read_request(post_read_request, NULL, NULL, APR_HOOK_FIRST); }