update TestFtp

This commit is contained in:
Ambrumf 2023-10-09 18:57:29 +08:00
parent ab96e2fd2b
commit a3bba42d65
2 changed files with 16 additions and 0 deletions

View File

@ -16,11 +16,13 @@ http://license.coscl.org.cn/MulanPSL2
#include <socket.h>
#include <stdio.h>
#include <stdlib.h>
#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;

View File

@ -0,0 +1,14 @@
#include <transform.h>
#include <socket.h>
#include <stdio.h>
#include <stdlib.h>
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();