Question: Using Internet TCP sockets, write a C program, ftpclient.c , which mimics the standard ftp command as shown below: $ . / ftpclient server Here,

Using Internet TCP sockets, write a C program, ftpclient.c, which mimics the standard ftp command as shown below:
$ ./ftpclient server
Here, a client is making connection to an FTP server.
Once the connection is established between the client and the server, the client program should then display a user prompt:
ftp> command
so that the user may issue various commands. The following FTP commands must be implemented for the client and sent over the control connection between the client and the server:
get filename
mget filenames
put filename
mput filenames
ls
cd
lcd
bye
Write another C program, ftpserver.c, which runs on the server, carrying out the clients requests. The server may use any ports between 6000 and 6999 for its control and data connections. Run your server with:
$ ./ftpserver
Caution: The data conection between the clent andhe server must be done passively (passive data connection).
When the server receives a command for a file transfer over the control connection (either to, or from, the remote host), the server initiates a TCP data connection to the client side. The server sends exactly one file over the data connection and then closes the data connection. If, during the same session, the user wants to transfer another file, the server opens another data connection. Thus, with FTP, the control connection remains open throughout the duration of the user session, but a new data connection is created for each file transferred within a session.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!