[SOLVED] CS3093D - Networks Laboratory - Experiment No - 6

30.00 $

Category:

Description

5/5 - (1 vote)

FTAP is a File Transfer Application Program that is used for moving files between local and remote file systems. The FTAPClient logins to a FTAPServer using username and password. The username and password is stored for the users in a text file logincred.txt separated with commas. The username is sent to the server using the USERN command, and the password is sent using the PASSWD command. If the credentials provided by the FTAPClient is accepted by the FTAPServer, the FTAPServer will send a “Welcome, <User>!” message to the FTAPClient and the session will commence.

 

FTAPServer should listen on port 4035 for incoming connections from FTAPClient. FTAPServer and FTAPClient       programs         should reside in         different          folders,            for       e.g., /home/user/FirstName_Roll/FTAPServer/FTAPServer.c and /home/user/ FirstName_Roll /FTAPClient/FTAPClient.c

 

FTAP should implement the following commands

  • START: FTAPClient starts the connection
  • USERN: Sends user identification to FTAPServer
  • PASSWD: Sends password to FTAPServer in plaintext
  • CreateFile: Request to create an empty text file in the FTAPServer directory
  • ListDir: Sends a request to display the list of all files present in the FTAPServer Directory
  • StoreFile: Sends the file (can be text, image, audio, or video file) to FTAPServer (Display the time required for sending the file)
  • GetFile: Retrieves the specified file (can be text, image, audio, or video file) from FTAPServer (Display the time required for sending the file) 8) QUIT: Terminates a user if no file transfer in place.

 

FTAPServer should display the following server return codes to FTAPClient at respective places:

200      OK Connection is set up

  • Correct Username; Need password
  • Incorrect Username

305      User Authenticated with password

310      Incorrect password

505       Command not supported

 

Command format:

  • USERN <username>
  • PASSWD <password>
  • CreateFile <filename.txt
  • ListDir <no-parameters>
  • StoreFile <filename>
  • GetFile <filename