Mercurial > hg > nginx-mail
comparison src/core/ngx_inet.h @ 260:0effe91f6083 NGINX_0_5_0
nginx 0.5.0
*) Change: the parameters in the "%name" form in the "log_format"
directive are not supported anymore.
*) Change: the "proxy_upstream_max_fails",
"proxy_upstream_fail_timeout", "fastcgi_upstream_max_fails",
"fastcgi_upstream_fail_timeout", "memcached_upstream_max_fails", and
"memcached_upstream_fail_timeout" directives are not supported
anymore.
*) Feature: the "server" directive in the "upstream" context supports
the "max_fails", "fail_timeout", and "down" parameters.
*) Feature: the "ip_hash" directive inside the "upstream" block.
*) Feature: the WAIT status in the "Auth-Status" header line of the
IMAP/POP3 proxy authentication server response.
*) Bugfix: nginx could not be built on 64-bit platforms; bug appeared
in 0.4.14.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 04 Dec 2006 00:00:00 +0300 |
parents | 644510700914 |
children | 251bcd11a5b8 |
comparison
equal
deleted
inserted
replaced
259:c68f18041059 | 260:0effe91f6083 |
---|---|
10 | 10 |
11 #include <ngx_config.h> | 11 #include <ngx_config.h> |
12 #include <ngx_core.h> | 12 #include <ngx_core.h> |
13 | 13 |
14 | 14 |
15 #define NGX_PARSE_URL_INET 1 | |
16 #define NGX_PARSE_URL_UNIX 2 | |
17 | |
18 | |
19 typedef struct { | 15 typedef struct { |
20 in_addr_t addr; | 16 in_addr_t addr; |
21 in_addr_t mask; | 17 in_addr_t mask; |
22 } ngx_inet_cidr_t; | 18 } ngx_inet_cidr_t; |
23 | 19 |
24 | 20 |
25 typedef struct { | |
26 struct sockaddr *sockaddr; | |
27 socklen_t socklen; | |
28 | |
29 ngx_str_t name; | |
30 char *uri_separator; | |
31 | |
32 ngx_uint_t current_weight; | |
33 ngx_uint_t weight; | |
34 | |
35 ngx_uint_t fails; | |
36 time_t accessed; | |
37 | |
38 ngx_uint_t max_fails; | |
39 time_t fail_timeout; | |
40 | |
41 #if (NGX_SSL) | |
42 ngx_ssl_session_t *ssl_session; | |
43 #endif | |
44 } ngx_peer_t; | |
45 | |
46 | |
47 struct ngx_peers_s { | |
48 ngx_uint_t current; | |
49 | |
50 ngx_uint_t number; | |
51 ngx_uint_t last_cached; | |
52 | |
53 /* ngx_mutex_t *mutex; */ | |
54 ngx_connection_t **cached; | |
55 | |
56 ngx_peer_t peer[1]; | |
57 }; | |
58 | |
59 | |
60 typedef union { | 21 typedef union { |
61 in_addr_t in_addr; | 22 in_addr_t in_addr; |
62 } ngx_url_addr_t; | 23 } ngx_url_addr_t; |
63 | 24 |
64 | 25 |
65 typedef struct { | 26 typedef struct { |
66 ngx_int_t type; | 27 struct sockaddr *sockaddr; |
28 socklen_t socklen; | |
29 ngx_str_t name; | |
30 } ngx_peer_addr_t; | |
67 | 31 |
68 ngx_peers_t *peers; | |
69 | 32 |
70 ngx_str_t url; | 33 typedef struct { |
71 ngx_str_t host; | 34 ngx_int_t type; |
72 ngx_str_t host_header; | |
73 ngx_str_t port; | |
74 ngx_str_t uri; | |
75 | 35 |
76 in_port_t portn; | 36 ngx_str_t url; |
77 in_port_t default_portn; | 37 ngx_str_t host; |
38 ngx_str_t host_header; | |
39 ngx_str_t port; | |
40 ngx_str_t uri; | |
78 | 41 |
79 unsigned listen:1; | 42 in_port_t portn; |
80 unsigned uri_part:1; | 43 in_port_t default_portn; |
81 unsigned upstream:1; | |
82 | 44 |
83 unsigned default_port:1; | 45 unsigned listen:1; |
84 unsigned wildcard:1; | 46 unsigned uri_part:1; |
47 unsigned upstream:1; | |
48 unsigned no_resolve:1; | |
49 unsigned one_addr:1; | |
85 | 50 |
86 ngx_url_addr_t addr; | 51 unsigned wildcard:1; |
52 unsigned no_port:1; | |
87 | 53 |
88 char *err; | 54 ngx_url_addr_t addr; |
55 | |
56 ngx_peer_addr_t *addrs; | |
57 ngx_uint_t naddrs; | |
58 | |
59 char *err; | |
89 } ngx_url_t; | 60 } ngx_url_t; |
90 | 61 |
91 | 62 |
92 size_t ngx_sock_ntop(int family, struct sockaddr *sa, u_char *text, size_t len); | 63 size_t ngx_sock_ntop(int family, struct sockaddr *sa, u_char *text, size_t len); |
93 size_t ngx_inet_ntop(int family, void *addr, u_char *text, size_t len); | 64 size_t ngx_inet_ntop(int family, void *addr, u_char *text, size_t len); |
94 ngx_int_t ngx_ptocidr(ngx_str_t *text, void *cidr); | 65 ngx_int_t ngx_ptocidr(ngx_str_t *text, void *cidr); |
95 ngx_int_t ngx_parse_url(ngx_conf_t *cf, ngx_url_t *u); | 66 ngx_int_t ngx_parse_url(ngx_conf_t *cf, ngx_url_t *u); |
96 ngx_peers_t *ngx_inet_resolve_peer(ngx_conf_t *cf, ngx_str_t *name, | 67 ngx_int_t ngx_inet_resolve_host(ngx_conf_t *cf, ngx_url_t *u); |
97 in_port_t port); | 68 |
98 | 69 |
99 | 70 |
100 #endif /* _NGX_INET_H_INCLUDED_ */ | 71 #endif /* _NGX_INET_H_INCLUDED_ */ |