Mercurial > hg > nginx-quic
annotate src/core/ngx_resolver.h @ 7247:b329c0ab1a48
Configure: restored "no-threads" in OpenSSL builds.
This was previously used, but was incorrectly removed in 83d54192e97b
while removing old threads remnants. Instead of using it conditionally
when threads are not used, we now set in unconditionally, as even with
thread pools enabled we never call OpenSSL functions in threads.
This fixes resulting binary when using --with-openssl with OpenSSL 1.1.0+
and without -lpthread linked (notably on FreeBSD without PCRE).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 22 Mar 2018 15:56:07 +0300 |
parents | 70e65bf8dfd7 |
children | 2a77754cd9fe |
rev | line source |
---|---|
1649 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4412 | 4 * Copyright (C) Nginx, Inc. |
1649 | 5 */ |
6 | |
7 | |
8 #include <ngx_config.h> | |
9 #include <ngx_core.h> | |
10 | |
11 | |
12 #ifndef _NGX_RESOLVER_H_INCLUDED_ | |
13 #define _NGX_RESOLVER_H_INCLUDED_ | |
14 | |
15 | |
16 #define NGX_RESOLVE_A 1 | |
17 #define NGX_RESOLVE_CNAME 5 | |
18 #define NGX_RESOLVE_PTR 12 | |
19 #define NGX_RESOLVE_MX 15 | |
20 #define NGX_RESOLVE_TXT 16 | |
5477
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
21 #if (NGX_HAVE_INET6) |
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
22 #define NGX_RESOLVE_AAAA 28 |
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
23 #endif |
6458
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
24 #define NGX_RESOLVE_SRV 33 |
1965 | 25 #define NGX_RESOLVE_DNAME 39 |
1649 | 26 |
27 #define NGX_RESOLVE_FORMERR 1 | |
28 #define NGX_RESOLVE_SERVFAIL 2 | |
29 #define NGX_RESOLVE_NXDOMAIN 3 | |
30 #define NGX_RESOLVE_NOTIMP 4 | |
31 #define NGX_RESOLVE_REFUSED 5 | |
32 #define NGX_RESOLVE_TIMEDOUT NGX_ETIMEDOUT | |
33 | |
34 | |
1683
1e0b028055ec
allow to use IP addresses without defined resolver
Igor Sysoev <igor@sysoev.ru>
parents:
1649
diff
changeset
|
35 #define NGX_NO_RESOLVER (void *) -1 |
1e0b028055ec
allow to use IP addresses without defined resolver
Igor Sysoev <igor@sysoev.ru>
parents:
1649
diff
changeset
|
36 |
1969 | 37 #define NGX_RESOLVER_MAX_RECURSION 50 |
38 | |
1683
1e0b028055ec
allow to use IP addresses without defined resolver
Igor Sysoev <igor@sysoev.ru>
parents:
1649
diff
changeset
|
39 |
6367 | 40 typedef struct ngx_resolver_s ngx_resolver_t; |
41 | |
42 | |
1649 | 43 typedef struct { |
6365
d35b4d590b2d
Resolver: renamed UDP-specific structures, fields and variables.
Roman Arutyunyan <arut@nginx.com>
parents:
6364
diff
changeset
|
44 ngx_connection_t *udp; |
6367 | 45 ngx_connection_t *tcp; |
1649 | 46 struct sockaddr *sockaddr; |
47 socklen_t socklen; | |
48 ngx_str_t server; | |
3408
71193a456616
add context to a resolver log
Igor Sysoev <igor@sysoev.ru>
parents:
3269
diff
changeset
|
49 ngx_log_t log; |
6367 | 50 ngx_buf_t *read_buf; |
51 ngx_buf_t *write_buf; | |
52 ngx_resolver_t *resolver; | |
6365
d35b4d590b2d
Resolver: renamed UDP-specific structures, fields and variables.
Roman Arutyunyan <arut@nginx.com>
parents:
6364
diff
changeset
|
53 } ngx_resolver_connection_t; |
1649 | 54 |
55 | |
56 typedef struct ngx_resolver_ctx_s ngx_resolver_ctx_t; | |
57 | |
58 typedef void (*ngx_resolver_handler_pt)(ngx_resolver_ctx_t *ctx); | |
59 | |
60 | |
61 typedef struct { | |
6458
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
62 struct sockaddr *sockaddr; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
63 socklen_t socklen; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
64 ngx_str_t name; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
65 u_short priority; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
66 u_short weight; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
67 } ngx_resolver_addr_t; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
68 |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
69 |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
70 typedef struct { |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
71 ngx_str_t name; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
72 u_short priority; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
73 u_short weight; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
74 u_short port; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
75 } ngx_resolver_srv_t; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
76 |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
77 |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
78 typedef struct { |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
79 ngx_str_t name; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
80 u_short priority; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
81 u_short weight; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
82 u_short port; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
83 |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
84 ngx_resolver_ctx_t *ctx; |
6714
c3e3de6d2672
Resolver: introduced state field in ngx_resolver_srv_name_t.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6458
diff
changeset
|
85 ngx_int_t state; |
6458
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
86 |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
87 ngx_uint_t naddrs; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
88 ngx_addr_t *addrs; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
89 } ngx_resolver_srv_name_t; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
90 |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
91 |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
92 typedef struct { |
6348
7316c57e4fe7
Resolver: fixed crashes in timeout handler.
Ruslan Ermilov <ru@nginx.com>
parents:
5921
diff
changeset
|
93 ngx_rbtree_node_t node; |
1649 | 94 ngx_queue_t queue; |
95 | |
6348
7316c57e4fe7
Resolver: fixed crashes in timeout handler.
Ruslan Ermilov <ru@nginx.com>
parents:
5921
diff
changeset
|
96 /* PTR: resolved name, A: name to resolve */ |
7316c57e4fe7
Resolver: fixed crashes in timeout handler.
Ruslan Ermilov <ru@nginx.com>
parents:
5921
diff
changeset
|
97 u_char *name; |
1649 | 98 |
5476
950c9ed3e66f
Resolver: implemented IPv6 address to name resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5475
diff
changeset
|
99 #if (NGX_HAVE_INET6) |
950c9ed3e66f
Resolver: implemented IPv6 address to name resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5475
diff
changeset
|
100 /* PTR: IPv6 address to resolve (IPv4 address is in rbtree node key) */ |
950c9ed3e66f
Resolver: implemented IPv6 address to name resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5475
diff
changeset
|
101 struct in6_addr addr6; |
950c9ed3e66f
Resolver: implemented IPv6 address to name resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5475
diff
changeset
|
102 #endif |
950c9ed3e66f
Resolver: implemented IPv6 address to name resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5475
diff
changeset
|
103 |
1649 | 104 u_short nlen; |
105 u_short qlen; | |
106 | |
107 u_char *query; | |
5477
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
108 #if (NGX_HAVE_INET6) |
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
109 u_char *query6; |
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
110 #endif |
1649 | 111 |
112 union { | |
113 in_addr_t addr; | |
114 in_addr_t *addrs; | |
115 u_char *cname; | |
6458
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
116 ngx_resolver_srv_t *srvs; |
1649 | 117 } u; |
118 | |
5477
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
119 u_char code; |
1649 | 120 u_short naddrs; |
6458
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
121 u_short nsrvs; |
1649 | 122 u_short cnlen; |
123 | |
5477
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
124 #if (NGX_HAVE_INET6) |
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
125 union { |
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
126 struct in6_addr addr6; |
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
127 struct in6_addr *addrs6; |
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
128 } u6; |
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
129 |
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
130 u_short naddrs6; |
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
131 #endif |
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
132 |
1649 | 133 time_t expire; |
134 time_t valid; | |
5477
98876ce2a7fd
Resolver: implemented IPv6 name to address resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5476
diff
changeset
|
135 uint32_t ttl; |
1649 | 136 |
6367 | 137 unsigned tcp:1; |
138 #if (NGX_HAVE_INET6) | |
139 unsigned tcp6:1; | |
140 #endif | |
141 | |
6366
2e5c027f2a98
Resolver: per-request DNS server balancer.
Roman Arutyunyan <arut@nginx.com>
parents:
6365
diff
changeset
|
142 ngx_uint_t last_connection; |
2e5c027f2a98
Resolver: per-request DNS server balancer.
Roman Arutyunyan <arut@nginx.com>
parents:
6365
diff
changeset
|
143 |
1649 | 144 ngx_resolver_ctx_t *waiting; |
145 } ngx_resolver_node_t; | |
146 | |
147 | |
6367 | 148 struct ngx_resolver_s { |
1649 | 149 /* has to be pointer because of "incomplete type" */ |
150 ngx_event_t *event; | |
4225
016352c19049
Support of several servers in the "resolver" directive.
Igor Sysoev <igor@sysoev.ru>
parents:
3408
diff
changeset
|
151 void *dummy; |
1649 | 152 ngx_log_t *log; |
153 | |
5921
5004210e8c78
Resolver: fixed debug event logging.
Ruslan Ermilov <ru@nginx.com>
parents:
5478
diff
changeset
|
154 /* event ident must be after 3 pointers as in ngx_connection_t */ |
1649 | 155 ngx_int_t ident; |
156 | |
4225
016352c19049
Support of several servers in the "resolver" directive.
Igor Sysoev <igor@sysoev.ru>
parents:
3408
diff
changeset
|
157 /* simple round robin DNS peers balancer */ |
6365
d35b4d590b2d
Resolver: renamed UDP-specific structures, fields and variables.
Roman Arutyunyan <arut@nginx.com>
parents:
6364
diff
changeset
|
158 ngx_array_t connections; |
4225
016352c19049
Support of several servers in the "resolver" directive.
Igor Sysoev <igor@sysoev.ru>
parents:
3408
diff
changeset
|
159 ngx_uint_t last_connection; |
016352c19049
Support of several servers in the "resolver" directive.
Igor Sysoev <igor@sysoev.ru>
parents:
3408
diff
changeset
|
160 |
1649 | 161 ngx_rbtree_t name_rbtree; |
162 ngx_rbtree_node_t name_sentinel; | |
163 | |
6458
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
164 ngx_rbtree_t srv_rbtree; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
165 ngx_rbtree_node_t srv_sentinel; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
166 |
1649 | 167 ngx_rbtree_t addr_rbtree; |
168 ngx_rbtree_node_t addr_sentinel; | |
169 | |
170 ngx_queue_t name_resend_queue; | |
6458
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
171 ngx_queue_t srv_resend_queue; |
1649 | 172 ngx_queue_t addr_resend_queue; |
173 | |
174 ngx_queue_t name_expire_queue; | |
6458
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
175 ngx_queue_t srv_expire_queue; |
1649 | 176 ngx_queue_t addr_expire_queue; |
177 | |
5476
950c9ed3e66f
Resolver: implemented IPv6 address to name resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5475
diff
changeset
|
178 #if (NGX_HAVE_INET6) |
5478
3cb3175a6fef
The "ipv6=" boolean parameter of the "resolver" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
5477
diff
changeset
|
179 ngx_uint_t ipv6; /* unsigned ipv6:1; */ |
5476
950c9ed3e66f
Resolver: implemented IPv6 address to name resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5475
diff
changeset
|
180 ngx_rbtree_t addr6_rbtree; |
950c9ed3e66f
Resolver: implemented IPv6 address to name resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5475
diff
changeset
|
181 ngx_rbtree_node_t addr6_sentinel; |
950c9ed3e66f
Resolver: implemented IPv6 address to name resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5475
diff
changeset
|
182 ngx_queue_t addr6_resend_queue; |
950c9ed3e66f
Resolver: implemented IPv6 address to name resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5475
diff
changeset
|
183 ngx_queue_t addr6_expire_queue; |
950c9ed3e66f
Resolver: implemented IPv6 address to name resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5475
diff
changeset
|
184 #endif |
950c9ed3e66f
Resolver: implemented IPv6 address to name resolving.
Ruslan Ermilov <ru@nginx.com>
parents:
5475
diff
changeset
|
185 |
1649 | 186 time_t resend_timeout; |
6367 | 187 time_t tcp_timeout; |
1649 | 188 time_t expire; |
189 time_t valid; | |
190 | |
191 ngx_uint_t log_level; | |
6367 | 192 }; |
1649 | 193 |
194 | |
195 struct ngx_resolver_ctx_s { | |
196 ngx_resolver_ctx_t *next; | |
197 ngx_resolver_t *resolver; | |
6364
69977457e1a6
Resolver: removed unused field from ngx_resolver_ctx_t.
Roman Arutyunyan <arut@nginx.com>
parents:
6351
diff
changeset
|
198 ngx_resolver_node_t *node; |
1649 | 199 |
6348
7316c57e4fe7
Resolver: fixed crashes in timeout handler.
Ruslan Ermilov <ru@nginx.com>
parents:
5921
diff
changeset
|
200 /* event ident must be after 3 pointers as in ngx_connection_t */ |
7316c57e4fe7
Resolver: fixed crashes in timeout handler.
Ruslan Ermilov <ru@nginx.com>
parents:
5921
diff
changeset
|
201 ngx_int_t ident; |
7316c57e4fe7
Resolver: fixed crashes in timeout handler.
Ruslan Ermilov <ru@nginx.com>
parents:
5921
diff
changeset
|
202 |
1649 | 203 ngx_int_t state; |
204 ngx_str_t name; | |
6458
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
205 ngx_str_t service; |
1649 | 206 |
6456
c94aba230a5a
Resolver: introduced valid field in resolver responses.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6367
diff
changeset
|
207 time_t valid; |
1649 | 208 ngx_uint_t naddrs; |
6458
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
209 ngx_resolver_addr_t *addrs; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
210 ngx_resolver_addr_t addr; |
5475
07dd5bd222ac
Changed resolver API to use ngx_addr_t.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
211 struct sockaddr_in sin; |
1649 | 212 |
6458
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
213 ngx_uint_t count; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
214 ngx_uint_t nsrvs; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
215 ngx_resolver_srv_name_t *srvs; |
384154fc634f
Resolver: added support for SRV records.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
6456
diff
changeset
|
216 |
1649 | 217 ngx_resolver_handler_pt handler; |
218 void *data; | |
219 ngx_msec_t timeout; | |
220 | |
7040
d49b74a683b1
Resolver: added the "async" flag to resolver context.
Roman Arutyunyan <arut@nginx.com>
parents:
6714
diff
changeset
|
221 unsigned quick:1; |
d49b74a683b1
Resolver: added the "async" flag to resolver context.
Roman Arutyunyan <arut@nginx.com>
parents:
6714
diff
changeset
|
222 unsigned async:1; |
7052
70e65bf8dfd7
Resolver: cancelable resend timer event.
Ruslan Ermilov <ru@nginx.com>
parents:
7040
diff
changeset
|
223 unsigned cancelable:1; |
1969 | 224 ngx_uint_t recursion; |
1649 | 225 ngx_event_t *event; |
226 }; | |
227 | |
228 | |
4225
016352c19049
Support of several servers in the "resolver" directive.
Igor Sysoev <igor@sysoev.ru>
parents:
3408
diff
changeset
|
229 ngx_resolver_t *ngx_resolver_create(ngx_conf_t *cf, ngx_str_t *names, |
016352c19049
Support of several servers in the "resolver" directive.
Igor Sysoev <igor@sysoev.ru>
parents:
3408
diff
changeset
|
230 ngx_uint_t n); |
1649 | 231 ngx_resolver_ctx_t *ngx_resolve_start(ngx_resolver_t *r, |
232 ngx_resolver_ctx_t *temp); | |
233 ngx_int_t ngx_resolve_name(ngx_resolver_ctx_t *ctx); | |
234 void ngx_resolve_name_done(ngx_resolver_ctx_t *ctx); | |
235 ngx_int_t ngx_resolve_addr(ngx_resolver_ctx_t *ctx); | |
236 void ngx_resolve_addr_done(ngx_resolver_ctx_t *ctx); | |
237 char *ngx_resolver_strerror(ngx_int_t err); | |
238 | |
239 | |
240 #endif /* _NGX_RESOLVER_H_INCLUDED_ */ |