libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / vsftpd / features.c
blob96d73e5aa3e69dc7656610e204cce46d4d92efa2
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 if (tunable_utf8)
47 vsf_cmdio_write_raw(p_sess, " UTF8\r\n");
49 vsf_cmdio_write(p_sess, FTP_FEAT, "End");