Mercurial > hg > nginx
annotate src/core/ngx_inet.h @ 1388:92bc89c5ff0f
regex in valid_referers
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 12 Aug 2007 20:06:43 +0000 |
parents | a0310ac2814f |
children | fe11e2a3946d |
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 uri; | |
804
472cd9768ac2
now the "listen" directives use ngx_parse_url()
Igor Sysoev <igor@sysoev.ru>
parents:
663
diff
changeset
|
39 |
906 | 40 in_port_t port; |
41 in_port_t default_port; | |
651 | 42 |
884 | 43 unsigned listen:1; |
44 unsigned uri_part:1; | |
45 unsigned no_resolve:1; | |
46 unsigned one_addr:1; | |
651 | 47 |
884 | 48 unsigned wildcard:1; |
49 unsigned no_port:1; | |
906 | 50 unsigned unix_socket:1; |
884 | 51 |
52 ngx_url_addr_t addr; | |
651 | 53 |
884 | 54 ngx_peer_addr_t *addrs; |
55 ngx_uint_t naddrs; | |
804
472cd9768ac2
now the "listen" directives use ngx_parse_url()
Igor Sysoev <igor@sysoev.ru>
parents:
663
diff
changeset
|
56 |
884 | 57 char *err; |
651 | 58 } ngx_url_t; |
59 | |
60 | |
808
eef6d9cc45da
axe ngx_inet_upstream_parse() and ngx_inet_parse_host_port()
Igor Sysoev <igor@sysoev.ru>
parents:
804
diff
changeset
|
61 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
|
62 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
|
63 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
|
64 ngx_int_t ngx_parse_url(ngx_conf_t *cf, ngx_url_t *u); |
884 | 65 ngx_int_t ngx_inet_resolve_host(ngx_conf_t *cf, ngx_url_t *u); |
66 | |
479 | 67 |
26
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
68 |
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
69 #endif /* _NGX_INET_H_INCLUDED_ */ |