From a3bba42d656be8891150ecce15fd23b6d459117b Mon Sep 17 00:00:00 2001 From: Ambrumf <421653227@qq.com> Date: Mon, 9 Oct 2023 18:57:29 +0800 Subject: [PATCH] update TestFtp --- .../Applications/app_test/test_ftp/test_ftp.c | 2 ++ .../Applications/app_test/test_ftp/test_ftp.h | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 APP_Framework/Applications/app_test/test_ftp/test_ftp.h diff --git a/APP_Framework/Applications/app_test/test_ftp/test_ftp.c b/APP_Framework/Applications/app_test/test_ftp/test_ftp.c index a1e0aa572..801e0509b 100644 --- a/APP_Framework/Applications/app_test/test_ftp/test_ftp.c +++ b/APP_Framework/Applications/app_test/test_ftp/test_ftp.c @@ -16,11 +16,13 @@ http://license.coscl.org.cn/MulanPSL2 #include #include #include +#include "test_ftp.h" #define SOCKET_DATA 2 #define SOCKET_CMD 3 char sendBuffer[1024]; char recvBuffer[1024]; +//quoted from int SendCommand(char *cmd) { int ret; diff --git a/APP_Framework/Applications/app_test/test_ftp/test_ftp.h b/APP_Framework/Applications/app_test/test_ftp/test_ftp.h new file mode 100644 index 000000000..a92585c45 --- /dev/null +++ b/APP_Framework/Applications/app_test/test_ftp/test_ftp.h @@ -0,0 +1,14 @@ +#include +#include +#include +#include + +int SendCommand(char *cmd); +int RecvRespond(char * respond,int len); +int EnterPasv(uint8_t *ipaddr,int *port); +int Login(uint8_t addr[4],int port,char *username,char *password); +int GetFileSize(char * name); +int Download(char *name); +void Init(); +void Quit(); +int TestFtp(); \ No newline at end of file