blob: 37fe17e79a69c5db5bd95f4c0dcc6593848ea6c4 [file] [log] [blame]
Igor Sysoev4e9393a2003-01-09 05:36:00 +00001#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
10typedef 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
20typedef 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
30typedef struct {
Igor Sysoevad22e012003-01-15 07:02:27 +000031 ngx_str_t name;
Igor Sysoev4e9393a2003-01-09 05:36:00 +000032 ngx_http_core_srv_conf_t *core_srv_conf;
33} ngx_http_server_name_t;
34
35
36typedef struct {
37 int port;
38 ngx_array_t addr;
39} ngx_http_in_port_t;
40
41typedef 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
52typedef struct {
53 ngx_str_t name; /* location name */
Igor Sysoeva19a85e2003-01-28 15:56:37 +000054 void **loc_conf; /* pointer to modules loc_conf,
55 used in translation handler */
Igor Sysoev4e9393a2003-01-09 05:36:00 +000056
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
69typedef struct {
70 int dummy;
71} ngx_http_core_conf_t;
72#endif
73
74
75extern ngx_http_module_t ngx_http_core_module_ctx;
76extern ngx_module_t ngx_http_core_module;
77
78extern int (*ngx_http_top_header_filter) (ngx_http_request_t *r);
79extern int ngx_http_max_module;
80
81
82
83int ngx_http_core_translate_handler(ngx_http_request_t *r);
84
85
86
87#endif /* _NGX_HTTP_CORE_H_INCLUDED_ */