Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / vsftpd / twoprocess.h
blobe5ba1f8f69e2fe44b69ae247d7e1a84e7d65118c
1 #ifndef VSF_TWOPROCESS_H
2 #define VSF_TWOPROCESS_H
4 struct mystr;
5 struct vsf_session;
7 /* vsf_two_process_start()
8 * PURPOSE
9 * Called to start FTP login processing using the two process model. This
10 * launches the unprivileged child to process the FTP login.
11 * PARAMETERS
12 * p_sess - the current session object
14 void vsf_two_process_start(struct vsf_session* p_sess);
16 /* vsf_two_process_login()
17 * PURPOSE
18 * Called to propose a login using the two process model.
19 * PARAMETERS
20 * p_sess - the current session object
21 * p_pass_str - the proposed password
23 void vsf_two_process_login(struct vsf_session* p_sess,
24 const struct mystr* p_pass_str);
26 /* vsf_two_process_get_priv_data_sock()
27 * PURPOSE
28 * Get a privileged port 20 bound data socket using the two process model.
29 * PARAMETERS
30 * p_sess - the current session object
31 * RETURNS
32 * The file descriptor of the privileged socket
34 int vsf_two_process_get_priv_data_sock(struct vsf_session* p_sess);
36 /* vsf_two_process_pasv_cleanup()
37 * PURPOSE
38 * Clean up any listening passive socket in the privileged side.
39 * PARAMETERS
40 * p_sess - the current session object
42 void vsf_two_process_pasv_cleanup(struct vsf_session* p_sess);
44 /* vsf_two_process_pasv_active()
45 * PURPOSE
46 * Determine if the passive socket is listening on the privileged side.
47 * PARAMETERS
48 * p_sess - the current session object
49 * RETURNS
50 * 1 if active, 0 if not.
52 int vsf_two_process_pasv_active(struct vsf_session* p_sess);
54 /* vsf_two_process_listen()
55 * PURPOSE
56 * Start listening for an incoming connection on the passive socket in the
57 * privileged side.
58 * PARAMETERS
59 * p_sess - the current session object
60 * RETURNS
61 * The port we listened on.
63 unsigned short vsf_two_process_listen(struct vsf_session* p_sess);
65 /* vsf_two_process_get_pasv_fd()
66 * PURPOSE
67 * Accept an incoming connection on the passive socket in the privileged
68 * side.
69 * PARAMETERS
70 * p_sess - the current session object
71 * RETURNS
72 * The file descriptor for the incoming connection.
74 int vsf_two_process_get_pasv_fd(struct vsf_session* p_sess);
76 /* vsf_two_process_chown_upload()
77 * PURPOSE
78 * Change ownership of an uploaded file using the two process model.
79 * PARAMETERS
80 * p_sess - the current session object
81 * fd - the file descriptor to change ownership on
83 void vsf_two_process_chown_upload(struct vsf_session* p_sess, int fd);
85 #endif /* VSF_TWOPROCESS_H */