summaryrefslogtreecommitdiffhomepage
path: root/src/mail/ngx_mail.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-05-18 12:20:22 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-05-18 12:20:22 +0000
commit610cbd4223262a473e3513b1c6a6ff4f8c83a0d5 (patch)
treebb2a240b9180127cc1612c685b6bcc2df4d3b3fa /src/mail/ngx_mail.h
parentc985ee7a61ce0beb12890da46971a71babdbb215 (diff)
downloadnginx-610cbd4223262a473e3513b1c6a6ff4f8c83a0d5.tar.gz
nginx-610cbd4223262a473e3513b1c6a6ff4f8c83a0d5.tar.bz2
mail proxy listen IPv6 support
Diffstat (limited to 'src/mail/ngx_mail.h')
-rw-r--r--src/mail/ngx_mail.h46
1 files changed, 36 insertions, 10 deletions
diff --git a/src/mail/ngx_mail.h b/src/mail/ngx_mail.h
index 81969c9e0..32f2edd01 100644
--- a/src/mail/ngx_mail.h
+++ b/src/mail/ngx_mail.h
@@ -26,50 +26,76 @@ typedef struct {
typedef struct {
- in_addr_t addr;
- in_port_t port;
- int family;
+ u_char sockaddr[NGX_SOCKADDRLEN];
+ socklen_t socklen;
/* server ctx */
ngx_mail_conf_ctx_t *ctx;
unsigned bind:1;
+ unsigned wildcard:1;
#if (NGX_MAIL_SSL)
unsigned ssl:1;
#endif
+#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+ unsigned ipv6only:2;
+#endif
} ngx_mail_listen_t;
typedef struct {
- in_addr_t addr;
ngx_mail_conf_ctx_t *ctx;
ngx_str_t addr_text;
#if (NGX_MAIL_SSL)
ngx_uint_t ssl; /* unsigned ssl:1; */
#endif
+} ngx_mail_addr_conf_t;
+
+typedef struct {
+ in_addr_t addr;
+ ngx_mail_addr_conf_t conf;
} ngx_mail_in_addr_t;
+#if (NGX_HAVE_INET6)
+
typedef struct {
- ngx_mail_in_addr_t *addrs; /* array of ngx_mail_in_addr_t */
+ struct in6_addr addr6;
+ ngx_mail_addr_conf_t conf;
+} ngx_mail_in6_addr_t;
+
+#endif
+
+
+typedef struct {
+ /* ngx_mail_in_addr_t or ngx_mail_in6_addr_t */
+ void *addrs;
ngx_uint_t naddrs;
-} ngx_mail_in_port_t;
+} ngx_mail_port_t;
typedef struct {
+ int family;
in_port_t port;
- ngx_array_t addrs; /* array of ngx_mail_conf_in_addr_t */
-} ngx_mail_conf_in_port_t;
+ ngx_array_t addrs; /* array of ngx_mail_conf_addr_t */
+} ngx_mail_conf_port_t;
typedef struct {
- in_addr_t addr;
+ struct sockaddr *sockaddr;
+ socklen_t socklen;
+
ngx_mail_conf_ctx_t *ctx;
+
unsigned bind:1;
+ unsigned wildcard:1;
#if (NGX_MAIL_SSL)
unsigned ssl:1;
#endif
-} ngx_mail_conf_in_addr_t;
+#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+ unsigned ipv6only:2;
+#endif
+} ngx_mail_conf_addr_t;
typedef struct {