Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / vsftpd / session.h
blob0b23425fa12db7e143f212a054bb1921205c15f4
1 #ifndef VSF_SESSION_H
2 #define VSF_SESSION_H
4 #ifndef VSFTP_STR_H
5 #include "str.h"
6 #endif
8 #ifndef VSF_FILESIZE_H
9 #include "filesize.h"
10 #endif
12 struct vsf_sysutil_sockaddr;
13 struct mystr_list;
15 /* This struct contains variables specific to the state of the current FTP
16 * session
18 struct vsf_session
20 /* Details of the control connection */
21 struct vsf_sysutil_sockaddr* p_local_addr;
22 struct vsf_sysutil_sockaddr* p_remote_addr;
23 char* p_control_line_buf;
25 /* Details of the data connection */
26 int pasv_listen_fd;
27 struct vsf_sysutil_sockaddr* p_port_sockaddr;
28 int data_fd;
29 int data_progress;
30 unsigned int bw_rate_max;
31 long bw_send_start_sec;
32 long bw_send_start_usec;
34 /* Details of the login */
35 int is_anonymous;
36 int is_guest;
37 struct mystr user_str;
38 struct mystr anon_pass_str;
40 /* Details of the FTP protocol state */
41 filesize_t restart_pos;
42 int is_ascii;
43 struct mystr rnfr_filename_str;
44 int abor_received;
45 int epsv_all;
47 /* HTTP hacks */
48 int is_http;
49 struct mystr http_get_arg;
51 /* Details of FTP session state */
52 struct mystr_list* p_visited_dir_list;
54 /* Details of userids which are interesting to us */
55 int anon_ftp_uid;
56 int guest_user_uid;
57 int anon_upload_chown_uid;
59 /* Things we need to cache before we chroot() */
60 struct mystr banned_email_str;
61 struct mystr email_passwords_str;
62 struct mystr userlist_str;
63 struct mystr banner_str;
64 int tcp_wrapper_ok;
66 /* Logging related details */
67 int xferlog_fd;
68 int vsftpd_log_fd;
69 struct mystr remote_ip_str;
70 unsigned long log_type;
71 long log_start_sec;
72 long log_start_usec;
73 struct mystr log_str;
74 filesize_t transfer_size;
76 /* Buffers */
77 struct mystr ftp_cmd_str;
78 struct mystr ftp_arg_str;
80 /* Parent<->child comms channel */
81 int parent_fd;
82 int child_fd;
84 /* Other details */
85 unsigned int num_clients;
86 unsigned int num_this_ip;
87 struct mystr home_str;
89 /* Secure connections state */
90 int control_use_ssl;
91 int data_use_ssl;
92 void* p_ssl_ctx;
93 void* p_control_ssl;
94 void* p_data_ssl;
95 struct mystr control_cert_digest;
96 int ssl_slave_active;
97 int ssl_slave_fd;
98 int ssl_consumer_fd;
99 unsigned int login_fails;
102 #endif /* VSF_SESSION_H */