Igor Sysoev | 4e9393a | 2003-01-09 05:36:00 +0000 | [diff] [blame] | 1 | #ifndef _NGX_HTTP_CORE_H_INCLUDED_ |
| 2 | #define _NGX_HTTP_CORE_H_INCLUDED_ |
| 3 | |
| 4 | |
| 5 | #include <ngx_string.h> |
| 6 | #include <ngx_array.h> |
| 7 | #include <ngx_http.h> |
| 8 | |
| 9 | |
| 10 | typedef struct { |
| 11 | int addr; |
| 12 | int port; |
| 13 | int family; |
| 14 | int flags; /* 'default' */ |
| 15 | ngx_conf_file_t *conf_file; |
| 16 | int line; |
| 17 | } ngx_http_listen_t; |
| 18 | |
| 19 | |
| 20 | typedef struct { |
| 21 | ngx_array_t locations; /* array of ngx_http_core_loc_conf_t */ |
| 22 | |
| 23 | ngx_array_t listen; /* 'listen', array of ngx_http_listen_t */ |
| 24 | ngx_array_t server_names; /* 'server_name', |
| 25 | array of ngx_http_server_name_t */ |
| 26 | ngx_http_conf_ctx_t *ctx; |
| 27 | } ngx_http_core_srv_conf_t; |
| 28 | |
| 29 | |
| 30 | typedef struct { |
Igor Sysoev | ad22e01 | 2003-01-15 07:02:27 +0000 | [diff] [blame] | 31 | ngx_str_t name; |
Igor Sysoev | 4e9393a | 2003-01-09 05:36:00 +0000 | [diff] [blame] | 32 | ngx_http_core_srv_conf_t *core_srv_conf; |
| 33 | } ngx_http_server_name_t; |
| 34 | |
| 35 | |
| 36 | typedef struct { |
| 37 | int port; |
| 38 | ngx_array_t addr; |
| 39 | } ngx_http_in_port_t; |
| 40 | |
| 41 | typedef struct { |
| 42 | u_int32_t addr; |
| 43 | ngx_array_t names; |
| 44 | int flags; |
| 45 | ngx_http_core_srv_conf_t *core_srv_conf; |
| 46 | } ngx_http_in_addr_t; |
| 47 | |
| 48 | #define NGX_HTTP_DEFAULT_SERVER 1 |
| 49 | |
| 50 | |
| 51 | |
| 52 | typedef struct { |
| 53 | ngx_str_t name; /* location name */ |
Igor Sysoev | a19a85e | 2003-01-28 15:56:37 +0000 | [diff] [blame^] | 54 | void **loc_conf; /* pointer to modules loc_conf, |
| 55 | used in translation handler */ |
Igor Sysoev | 4e9393a | 2003-01-09 05:36:00 +0000 | [diff] [blame] | 56 | |
| 57 | ngx_str_t doc_root; /* 'root' */ |
| 58 | |
| 59 | time_t send_timeout; /* 'send_timeout' */ |
| 60 | size_t discarded_buffer_size; /* 'discarded_buffer_size */ |
| 61 | time_t lingering_time; /* 'lingering_time */ |
| 62 | ngx_msec_t lingering_timeout; /* 'lingering_timeout */ |
| 63 | } ngx_http_core_loc_conf_t; |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | #if 0 |
| 69 | typedef struct { |
| 70 | int dummy; |
| 71 | } ngx_http_core_conf_t; |
| 72 | #endif |
| 73 | |
| 74 | |
| 75 | extern ngx_http_module_t ngx_http_core_module_ctx; |
| 76 | extern ngx_module_t ngx_http_core_module; |
| 77 | |
| 78 | extern int (*ngx_http_top_header_filter) (ngx_http_request_t *r); |
| 79 | extern int ngx_http_max_module; |
| 80 | |
| 81 | |
| 82 | |
| 83 | int ngx_http_core_translate_handler(ngx_http_request_t *r); |
| 84 | |
| 85 | |
| 86 | |
| 87 | #endif /* _NGX_HTTP_CORE_H_INCLUDED_ */ |