features.c
上传用户:ig0539
上传日期:2022-05-21
资源大小:181k
文件大小:1k
- /*
- * Part of Very Secure FTPd
- * Licence: GPL v2
- * Author: Chris Evans
- * features.c
- *
- * Routines to tell the client what features we support.
- */
- #include "features.h"
- #include "ftpcodes.h"
- #include "ftpcmdio.h"
- #include "tunables.h"
- void
- handle_feat(struct vsf_session* p_sess)
- {
- vsf_cmdio_write_hyphen(p_sess, FTP_FEAT, "Features:");
- if (tunable_ssl_enable)
- {
- vsf_cmdio_write_raw(p_sess, " AUTH SSLrn");
- vsf_cmdio_write_raw(p_sess, " AUTH TLSrn");
- }
- if (tunable_port_enable)
- {
- vsf_cmdio_write_raw(p_sess, " EPRTrn");
- }
- if (tunable_pasv_enable)
- {
- vsf_cmdio_write_raw(p_sess, " EPSVrn");
- }
- vsf_cmdio_write_raw(p_sess, " MDTMrn");
- if (tunable_pasv_enable)
- {
- vsf_cmdio_write_raw(p_sess, " PASVrn");
- }
- if (tunable_ssl_enable)
- {
- vsf_cmdio_write_raw(p_sess, " PBSZrn");
- vsf_cmdio_write_raw(p_sess, " PROTrn");
- }
- vsf_cmdio_write_raw(p_sess, " REST STREAMrn");
- vsf_cmdio_write_raw(p_sess, " SIZErn");
- vsf_cmdio_write_raw(p_sess, " TVFSrn");
- vsf_cmdio_write_raw(p_sess, " UTF8rn");
- vsf_cmdio_write(p_sess, FTP_FEAT, "End");
- }