vsftpd 2.0.7 - initial checkin.
[tomato.git] / release / src / router / vsftpd / features.c
blobda1462313c0c35b478d3a289b7d2773d6aa46438
1 /*
2 * Part of Very Secure FTPd
3 * Licence: GPL v2
4 * Author: Chris Evans
5 * features.c
7 * Routines to tell the client what features we support.
8 */
10 #include "features.h"
11 #include "ftpcodes.h"
12 #include "ftpcmdio.h"
13 #include "tunables.h"
15 void
16 handle_feat(struct vsf_session* p_sess)
18 vsf_cmdio_write_hyphen(p_sess, FTP_FEAT, "Features:");
19 if (tunable_ssl_enable)
21 vsf_cmdio_write_raw(p_sess, " AUTH SSL\r\n");
22 vsf_cmdio_write_raw(p_sess, " AUTH TLS\r\n");
24 if (tunable_port_enable)
26 vsf_cmdio_write_raw(p_sess, " EPRT\r\n");
28 if (tunable_pasv_enable)
30 vsf_cmdio_write_raw(p_sess, " EPSV\r\n");
32 vsf_cmdio_write_raw(p_sess, " MDTM\r\n");
33 if (tunable_pasv_enable)
35 vsf_cmdio_write_raw(p_sess, " PASV\r\n");
37 if (tunable_ssl_enable)
39 vsf_cmdio_write_raw(p_sess, " PBSZ\r\n");
40 vsf_cmdio_write_raw(p_sess, " PROT\r\n");
42 vsf_cmdio_write_raw(p_sess, " REST STREAM\r\n");
43 vsf_cmdio_write_raw(p_sess, " SIZE\r\n");
44 vsf_cmdio_write_raw(p_sess, " TVFS\r\n");
45 vsf_cmdio_write_raw(p_sess, " UTF8\r\n");
46 vsf_cmdio_write(p_sess, FTP_FEAT, "End");