Mercurial > hg > nginx-quic
annotate src/core/ngx_inet.h @ 1909:cbd321d1e1b3
C++ compatibility
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 03 Mar 2008 16:32:16 +0000 |
parents | 8075179cae21 |
children | 74477ea8074f |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
340
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
340
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
340
diff
changeset
|
4 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
340
diff
changeset
|
5 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
340
diff
changeset
|
6 |
26
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 #ifndef _NGX_INET_H_INCLUDED_ |
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #define _NGX_INET_H_INCLUDED_ |
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 |
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
479 | 11 #include <ngx_config.h> |
12 #include <ngx_core.h> | |
13 | |
14 | |
340
0bf903191ceb
nginx-0.0.3-2004-05-25-19:28:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
291
diff
changeset
|
15 typedef struct { |
884 | 16 in_addr_t addr; |
17 in_addr_t mask; | |
340
0bf903191ceb
nginx-0.0.3-2004-05-25-19:28:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
291
diff
changeset
|
18 } ngx_inet_cidr_t; |
0bf903191ceb
nginx-0.0.3-2004-05-25-19:28:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
291
diff
changeset
|
19 |
0bf903191ceb
nginx-0.0.3-2004-05-25-19:28:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
291
diff
changeset
|
20 |
804
472cd9768ac2
now the "listen" directives use ngx_parse_url()
Igor Sysoev <igor@sysoev.ru>
parents:
663
diff
changeset
|
21 typedef union { |
884 | 22 in_addr_t in_addr; |
804
472cd9768ac2
now the "listen" directives use ngx_parse_url()
Igor Sysoev <igor@sysoev.ru>
parents:
663
diff
changeset
|
23 } ngx_url_addr_t; |
651 | 24 |
25 | |
804
472cd9768ac2
now the "listen" directives use ngx_parse_url()
Igor Sysoev <igor@sysoev.ru>
parents:
663
diff
changeset
|
26 typedef struct { |
884 | 27 struct sockaddr *sockaddr; |
28 socklen_t socklen; | |
29 ngx_str_t name; | |
30 } ngx_peer_addr_t; | |
804
472cd9768ac2
now the "listen" directives use ngx_parse_url()
Igor Sysoev <igor@sysoev.ru>
parents:
663
diff
changeset
|
31 |
651 | 32 |
884 | 33 typedef struct { |
34 ngx_int_t type; | |
35 | |
36 ngx_str_t url; | |
37 ngx_str_t host; | |
1671
8075179cae21
ngx_parse_url() saves port text, this allows to use it in proxy host header
Igor Sysoev <igor@sysoev.ru>
parents:
1647
diff
changeset
|
38 ngx_str_t port_text; |
884 | 39 ngx_str_t uri; |
804
472cd9768ac2
now the "listen" directives use ngx_parse_url()
Igor Sysoev <igor@sysoev.ru>
parents:
663
diff
changeset
|
40 |
906 | 41 in_port_t port; |
42 in_port_t default_port; | |
651 | 43 |
884 | 44 unsigned listen:1; |
45 unsigned uri_part:1; | |
46 unsigned no_resolve:1; | |
47 unsigned one_addr:1; | |
651 | 48 |
884 | 49 unsigned wildcard:1; |
50 unsigned no_port:1; | |
906 | 51 unsigned unix_socket:1; |
884 | 52 |
53 ngx_url_addr_t addr; | |
651 | 54 |
884 | 55 ngx_peer_addr_t *addrs; |
56 ngx_uint_t naddrs; | |
804
472cd9768ac2
now the "listen" directives use ngx_parse_url()
Igor Sysoev <igor@sysoev.ru>
parents:
663
diff
changeset
|
57 |
884 | 58 char *err; |
651 | 59 } ngx_url_t; |
60 | |
61 | |
1647 | 62 in_addr_t ngx_inet_addr(u_char *text, size_t len); |
808
eef6d9cc45da
axe ngx_inet_upstream_parse() and ngx_inet_parse_host_port()
Igor Sysoev <igor@sysoev.ru>
parents:
804
diff
changeset
|
63 size_t ngx_sock_ntop(int family, struct sockaddr *sa, u_char *text, size_t len); |
291
117ccc7c4055
nginx-0.0.3-2004-03-16-16:35:20 import
Igor Sysoev <igor@sysoev.ru>
parents:
290
diff
changeset
|
64 size_t ngx_inet_ntop(int family, void *addr, u_char *text, size_t len); |
340
0bf903191ceb
nginx-0.0.3-2004-05-25-19:28:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
291
diff
changeset
|
65 ngx_int_t ngx_ptocidr(ngx_str_t *text, void *cidr); |
1559
fe11e2a3946d
use pool instead of ngx_conf_t
Igor Sysoev <igor@sysoev.ru>
parents:
906
diff
changeset
|
66 ngx_int_t ngx_parse_url(ngx_pool_t *pool, ngx_url_t *u); |
fe11e2a3946d
use pool instead of ngx_conf_t
Igor Sysoev <igor@sysoev.ru>
parents:
906
diff
changeset
|
67 ngx_int_t ngx_inet_resolve_host(ngx_pool_t *pool, ngx_url_t *u); |
884 | 68 |
479 | 69 |
26
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
70 |
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
71 #endif /* _NGX_INET_H_INCLUDED_ */ |