X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=nginx%2Fsrc%2Fhttp%2Fngx_http_core_module.h;h=afceff9419609c60424677fab229f9791bf09105;hb=refs%2Ftags%2F0.7.39;hp=46acb2b4fe1dbc86385e3c6a90c5f76dd7dd3e3d;hpb=11a1dc0e6739e733330819d1b7b42f386f13017d;p=nginx.git diff --git a/nginx/src/http/ngx_http_core_module.h b/nginx/src/http/ngx_http_core_module.h index 46acb2b..afceff9 100644 --- a/nginx/src/http/ngx_http_core_module.h +++ b/nginx/src/http/ngx_http_core_module.h @@ -28,6 +28,11 @@ #define NGX_HTTP_SATISFY_ANY 1 +#define NGX_HTTP_IMS_OFF 0 +#define NGX_HTTP_IMS_EXACT 1 +#define NGX_HTTP_IMS_BEFORE 2 + + typedef struct ngx_http_location_tree_node_s ngx_http_location_tree_node_t; typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t; @@ -35,6 +40,7 @@ typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t; typedef struct { unsigned default_server:1; unsigned bind:1; + unsigned wildcard:1; #if (NGX_HTTP_SSL) unsigned ssl:1; #endif @@ -50,15 +56,13 @@ typedef struct { ngx_uint_t deferred_accept; #endif - u_char addr[NGX_INET_ADDRSTRLEN + sizeof(":65535")]; - + u_char addr[NGX_SOCKADDR_STRLEN + 1]; } ngx_http_listen_conf_t; typedef struct { - in_addr_t addr; - in_port_t port; - int family; + u_char sockaddr[NGX_SOCKADDRLEN]; + socklen_t socklen; u_char *file_name; ngx_uint_t line; @@ -146,6 +150,8 @@ typedef struct { /* server ctx */ ngx_http_conf_ctx_t *ctx; + ngx_http_virtual_names_t *virtual_names; + ngx_str_t server_name; size_t connection_pool_size; @@ -168,35 +174,48 @@ typedef struct { typedef struct { - in_addr_t addr; - /* the default server configuration for this address:port */ ngx_http_core_srv_conf_t *core_srv_conf; - ngx_http_virtual_names_t *virtual_names; - #if (NGX_HTTP_SSL) ngx_uint_t ssl; /* unsigned ssl:1; */ #endif +} ngx_http_addr_conf_t; + + +typedef struct { + in_addr_t addr; + ngx_http_addr_conf_t conf; } ngx_http_in_addr_t; +#if (NGX_HAVE_INET6) + typedef struct { - in_port_t port; - ngx_str_t port_text; - ngx_http_in_addr_t *addrs; + struct in6_addr addr6; + ngx_http_addr_conf_t conf; +} ngx_http_in6_addr_t; + +#endif + + +typedef struct { + /* ngx_http_in_addr_t or ngx_http_in6_addr_t */ + void *addrs; ngx_uint_t naddrs; -} ngx_http_in_port_t; +} ngx_http_port_t; typedef struct { + ngx_int_t family; in_port_t port; - ngx_array_t addrs; /* array of ngx_http_conf_in_addr_t */ -} ngx_http_conf_in_port_t; + ngx_array_t addrs; /* array of ngx_http_conf_addr_t */ +} ngx_http_conf_port_t; typedef struct { - in_addr_t addr; + struct sockaddr *sockaddr; + socklen_t socklen; ngx_hash_t hash; ngx_hash_wildcard_t *wc_head; @@ -214,12 +233,13 @@ typedef struct { unsigned default_server:1; unsigned bind:1; + unsigned wildcard:1; #if (NGX_HTTP_SSL) unsigned ssl:1; #endif ngx_http_listen_conf_t *listen_conf; -} ngx_http_conf_in_addr_t; +} ngx_http_conf_addr_t; struct ngx_http_server_name_s {