comparison src/imap/ngx_imap.h @ 88:e916a291e9aa NGINX_0_1_44

nginx 0.1.44 *) Feature: the IMAP/POP3 proxy supports SSL. *) Feature: the "proxy_timeout" directive of the ngx_imap_proxy_module. *) Feature: the "userid_mark" directive. *) Feature: the $remote_user variable value is determined independently of authorization use.
author Igor Sysoev <http://sysoev.ru>
date Tue, 06 Sep 2005 00:00:00 +0400
parents da9a3b14312d
children 71c46860eb55
comparison
equal deleted inserted replaced
87:5b7ec80c3c40 88:e916a291e9aa
10 10
11 #include <ngx_config.h> 11 #include <ngx_config.h>
12 #include <ngx_core.h> 12 #include <ngx_core.h>
13 #include <ngx_event.h> 13 #include <ngx_event.h>
14 #include <ngx_event_connect.h> 14 #include <ngx_event_connect.h>
15
16 #if (NGX_IMAP_SSL)
17 #include <ngx_imap_ssl_module.h>
18 #endif
19
15 20
16 21
17 typedef struct { 22 typedef struct {
18 void **main_conf; 23 void **main_conf;
19 void **srv_conf; 24 void **srv_conf;
30 35
31 typedef struct { 36 typedef struct {
32 ngx_msec_t timeout; 37 ngx_msec_t timeout;
33 38
34 size_t imap_client_buffer_size; 39 size_t imap_client_buffer_size;
35 size_t proxy_buffer_size;
36 40
37 ngx_uint_t protocol; 41 ngx_uint_t protocol;
38 42
39 ngx_buf_t *pop3_capability; 43 ngx_buf_t *pop3_capability;
40 ngx_buf_t *imap_capability; 44 ngx_buf_t *imap_capability;
80 typedef struct { 84 typedef struct {
81 uint32_t signature; /* "IMAP" */ 85 uint32_t signature; /* "IMAP" */
82 86
83 ngx_connection_t *connection; 87 ngx_connection_t *connection;
84 88
89 ngx_str_t out;
85 ngx_buf_t *buffer; 90 ngx_buf_t *buffer;
86 ngx_str_t out;
87 91
88 void **ctx; 92 void **ctx;
89 void **main_conf; 93 void **main_conf;
90 void **srv_conf; 94 void **srv_conf;
91 95
92 ngx_imap_proxy_ctx_t *proxy; 96 ngx_imap_proxy_ctx_t *proxy;
93 97
94 ngx_uint_t imap_state; 98 ngx_uint_t imap_state;
95 99
100 unsigned blocked:1;
101 unsigned quit:1;
96 unsigned protocol:1; 102 unsigned protocol:1;
97 unsigned quoted:1; 103 unsigned quoted:1;
98 104
99 ngx_str_t login; 105 ngx_str_t login;
100 ngx_str_t passwd; 106 ngx_str_t passwd;
101 107
102 ngx_str_t tag; 108 ngx_str_t tag;
109 ngx_str_t tagged_line;
103 110
104 ngx_uint_t command; 111 ngx_uint_t command;
105 ngx_array_t args; 112 ngx_array_t args;
106 113
107 ngx_uint_t login_attempt; 114 ngx_uint_t login_attempt;
165 (s)->main_conf[module.ctx_index] 172 (s)->main_conf[module.ctx_index]
166 #define ngx_imap_get_module_srv_conf(s, module) (s)->srv_conf[module.ctx_index] 173 #define ngx_imap_get_module_srv_conf(s, module) (s)->srv_conf[module.ctx_index]
167 174
168 175
169 void ngx_imap_init_connection(ngx_connection_t *c); 176 void ngx_imap_init_connection(ngx_connection_t *c);
177 void ngx_imap_send(ngx_event_t *wev);
170 void ngx_imap_auth_state(ngx_event_t *rev); 178 void ngx_imap_auth_state(ngx_event_t *rev);
171 void ngx_pop3_auth_state(ngx_event_t *rev); 179 void ngx_pop3_auth_state(ngx_event_t *rev);
172 void ngx_imap_close_connection(ngx_connection_t *c); 180 void ngx_imap_close_connection(ngx_connection_t *c);
173 void ngx_imap_session_internal_server_error(ngx_imap_session_t *s); 181 void ngx_imap_session_internal_server_error(ngx_imap_session_t *s);
174 182