Apache

De MySoLo Wiki.

Version du 3 avril 2009 à 22:04 par MySoLo (discuter | contributions)
(diff) ← Version précédente | Voir la version courante (diff) | Version suivante → (diff)

L'ÉCRITURE DE MODULE APACHE

Les hooks

Les hooks sont en faite des fonctions d'apache qui permettent l'enregistrement des fonctions des modules qui seront exécutées à certain moment précis dans le fonctionnement d'apache. Je vais tenter de les expliquer au fil du temps et de l'utilisation que j'en fait ou comprends.

La liste des hooks dans un apache 2.2 ci-dessous. Il s'agit des hooks interne à apache (ou inclus avec ). Il y a des hooks externes, qui sont déclarable par les modules externe à apache.

mysolo@portoo /usr/include/apache2 $ fgrep AP_DECLARE_HOOK *
ap_config.h:#define AP_DECLARE_HOOK(ret,name,args) \
ap_mpm.h:AP_DECLARE_HOOK(int,fatal_exception,(ap_exception_info_t *ei))
http_config.h:AP_DECLARE_HOOK(int,header_parser,(request_rec *r))
http_config.h:AP_DECLARE_HOOK(int,pre_config,(apr_pool_t *pconf,apr_pool_t *plog,
http_config.h:AP_DECLARE_HOOK(void,test_config,(apr_pool_t *pconf, server_rec *s))
http_config.h:AP_DECLARE_HOOK(int,post_config,(apr_pool_t *pconf,apr_pool_t *plog,
http_config.h:AP_DECLARE_HOOK(int,open_logs,(apr_pool_t *pconf,apr_pool_t *plog,
http_config.h:AP_DECLARE_HOOK(void,child_init,(apr_pool_t *pchild, server_rec *s))
http_config.h:AP_DECLARE_HOOK(int,handler,(request_rec *r))
http_config.h:AP_DECLARE_HOOK(int,quick_handler,(request_rec *r, int lookup_uri))
http_config.h:AP_DECLARE_HOOK(void,optional_fn_retrieve,(void))
http_connection.h:AP_DECLARE_HOOK(conn_rec *, create_connection,
http_connection.h:AP_DECLARE_HOOK(int,pre_connection,(conn_rec *c, void *csd))
http_connection.h:AP_DECLARE_HOOK(int,process_connection,(conn_rec *c))
http_core.h:AP_DECLARE_HOOK(int, get_mgmt_items,
http_log.h:AP_DECLARE_HOOK(void, error_log, (const char *file, int line, int level,
http_protocol.h:AP_DECLARE_HOOK(void,insert_error_filter,(request_rec *r))
http_protocol.h:AP_DECLARE_HOOK(int,post_read_request,(request_rec *r))
http_protocol.h:AP_DECLARE_HOOK(int,log_transaction,(request_rec *r))
http_protocol.h:AP_DECLARE_HOOK(const char *,http_scheme,(const request_rec *r))
http_protocol.h:AP_DECLARE_HOOK(apr_port_t,default_port,(const request_rec *r))
http_request.h:AP_DECLARE_HOOK(int,create_request,(request_rec *r))
http_request.h:AP_DECLARE_HOOK(int,translate_name,(request_rec *r))
http_request.h:AP_DECLARE_HOOK(int,map_to_storage,(request_rec *r))
http_request.h:AP_DECLARE_HOOK(int,check_user_id,(request_rec *r))
http_request.h:AP_DECLARE_HOOK(int,fixups,(request_rec *r))
http_request.h:AP_DECLARE_HOOK(int,type_checker,(request_rec *r))
http_request.h:AP_DECLARE_HOOK(int,access_checker,(request_rec *r))
http_request.h:AP_DECLARE_HOOK(int,auth_checker,(request_rec *r))
http_request.h:AP_DECLARE_HOOK(void,insert_filter,(request_rec *r))
mpm_common.h:AP_DECLARE_HOOK(int,monitor,(apr_pool_t *p))
scoreboard.h:AP_DECLARE_HOOK(int, pre_mpm, (apr_pool_t *p, ap_scoreboard_e sb_type))
unixd.h:AP_DECLARE_HOOK(ap_unix_identity_t *, get_suexec_identity,(const request_rec *r))

fatal_exception

header_parser

pre_config

test_config

post_config

open_logs

child_init

handler

quick_handler

optional_fn_retrieve

create_connection

pre_connection

process_connection

get_mgmt_items

error_log

insert_error_filter

post_read_request

log_transaction

http_scheme

default_port

create_request

translate_name

map_to_storage

check_user_id

fixups

type_checker

access_checker

auth_checker

insert_filter

monitor

pre_mpm

get_suexec_identity

développement
Google AdSense