Mercurial > hg > nginx-quic
annotate src/core/ngx_inet.h @ 903:89428c0b5a1c
release-0.5.2 tag
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 11 Dec 2006 15:23:28 +0000 |
parents | 4d68c486fcb0 |
children | a0310ac2814f |
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; | |
38 ngx_str_t host_header; | |
39 ngx_str_t port; | |
40 ngx_str_t uri; | |
804
472cd9768ac2
now the "listen" directives use ngx_parse_url()
Igor Sysoev <igor@sysoev.ru>
parents:
663
diff
changeset
|
41 |
884 | 42 in_port_t portn; |
43 in_port_t default_portn; | |
651 | 44 |
884 | 45 unsigned listen:1; |
46 unsigned uri_part:1; | |
47 unsigned upstream:1; | |
48 unsigned no_resolve:1; | |
49 unsigned one_addr:1; | |
651 | 50 |
884 | 51 unsigned wildcard:1; |
52 unsigned no_port:1; | |
53 | |
54 ngx_url_addr_t addr; | |
651 | 55 |
884 | 56 ngx_peer_addr_t *addrs; |
57 ngx_uint_t naddrs; | |
804
472cd9768ac2
now the "listen" directives use ngx_parse_url()
Igor Sysoev <igor@sysoev.ru>
parents:
663
diff
changeset
|
58 |
884 | 59 char *err; |
651 | 60 } ngx_url_t; |
61 | |
62 | |
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); |
808
eef6d9cc45da
axe ngx_inet_upstream_parse() and ngx_inet_parse_host_port()
Igor Sysoev <igor@sysoev.ru>
parents:
804
diff
changeset
|
66 ngx_int_t ngx_parse_url(ngx_conf_t *cf, ngx_url_t *u); |
884 | 67 ngx_int_t ngx_inet_resolve_host(ngx_conf_t *cf, ngx_url_t *u); |
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_ */ |