Mercurial > hg > nginx
comparison src/http/ngx_http_config.h @ 69:e43f406e4525
nginx-0.0.1-2003-03-20-19:09:44 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 20 Mar 2003 16:09:44 +0000 |
parents | e8cdc2989cee |
children | 59229033ae93 |
comparison
equal
deleted
inserted
replaced
68:d549fdc17d7e | 69:e43f406e4525 |
---|---|
10 void **srv_conf; | 10 void **srv_conf; |
11 void **loc_conf; | 11 void **loc_conf; |
12 } ngx_http_conf_ctx_t; | 12 } ngx_http_conf_ctx_t; |
13 | 13 |
14 | 14 |
15 typedef struct { | |
16 int (*output_header_filter) (ngx_http_request_t *r); | |
17 int (*output_body_filter) (ngx_http_request_t *r, ngx_chain_t *ch); | |
18 } ngx_http_conf_filter_t; | |
19 | |
20 | |
21 typedef struct { | |
22 void *(*create_srv_conf)(ngx_pool_t *p); | |
23 char *(*init_srv_conf)(ngx_pool_t *p, void *conf); | |
24 | |
25 void *(*create_loc_conf)(ngx_pool_t *p); | |
26 char *(*merge_loc_conf)(ngx_pool_t *p, void *prev, void *conf); | |
27 | |
28 void (*init_filters) (ngx_pool_t *p, ngx_http_conf_filter_t *cf); | |
29 } ngx_http_module_t; | |
30 | |
31 | |
32 #define NGX_HTTP_MODULE_TYPE 0x50545448 /* "HTTP" */ | |
33 | |
34 | |
15 #define NGX_HTTP_MAIN_CONF 0x1000000 | 35 #define NGX_HTTP_MAIN_CONF 0x1000000 |
16 #define NGX_HTTP_SRV_CONF 0x2000000 | 36 #define NGX_HTTP_SRV_CONF 0x2000000 |
17 #define NGX_HTTP_LOC_CONF 0x6000000 | 37 #define NGX_HTTP_LOC_CONF 0x6000000 |
18 | 38 |
39 | |
19 #define NGX_HTTP_SRV_CONF_OFFSET offsetof(ngx_http_conf_ctx_t, srv_conf) | 40 #define NGX_HTTP_SRV_CONF_OFFSET offsetof(ngx_http_conf_ctx_t, srv_conf) |
20 #define NGX_HTTP_LOC_CONF_OFFSET offsetof(ngx_http_conf_ctx_t, loc_conf) | 41 #define NGX_HTTP_LOC_CONF_OFFSET offsetof(ngx_http_conf_ctx_t, loc_conf) |
42 | |
43 | |
44 #define ngx_http_get_module_srv_conf(r, module) r->srv_conf[module.index] | |
45 #define ngx_http_get_module_loc_conf(r, module) r->loc_conf[module.index] | |
21 | 46 |
22 | 47 |
23 int ngx_http_config_modules(ngx_pool_t *pool, ngx_module_t **modules); | 48 int ngx_http_config_modules(ngx_pool_t *pool, ngx_module_t **modules); |
24 | 49 |
25 | 50 |
26 extern ngx_module_t ngx_http_module; | 51 extern ngx_module_t ngx_http_module; |
27 | 52 |
28 | 53 |
29 extern int (*ngx_http_top_header_filter) (ngx_http_request_t *r); | 54 extern int (*ngx_http_top_header_filter) (ngx_http_request_t *r); |
30 | 55 |
31 extern void **ngx_srv_conf; | |
32 extern void **ngx_loc_conf; | |
33 | |
34 | 56 |
35 #endif /* _NGX_HTTP_CONFIG_H_INCLUDED_ */ | 57 #endif /* _NGX_HTTP_CONFIG_H_INCLUDED_ */ |