Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project Part 4: A Basic File Transfer Application (6%) Goal Implement a reliable file transfer application (FTA) using the Stop-and-Wait ARQ protocol and software modules

Project Part 4: A Basic File Transfer Application (6%)

Goal

Implement a reliable file transfer application (FTA) using the Stop-and-Wait ARQ protocol and software modules developed in Part 3 of the project.

Overview

This is Part 4 of a project consisting of four parts. Part 4 of the project is worth 6% of your final course grade. Refer to your Suggested Schedule to confirm the suggested due dates. Consult your Open Learning Faculty Member if you have any questions about the project. In Part 4 of the project, you will implement a reliable file transfer application (FTA) using the Stop-and-Wait protocol and software modules developed in Part 3 of the project.

References - The C Programming Language

Kerninghan, B., & Ritchie, D. (1988).The C programming language(2nd ed.) [Digital book]. New Jersey: Prentice Hall Software Series. Retrieved from http://mef-lab.com/osnove-2016/C-Programming-Ebook.pdf

Tutorials Point. (2018).C tutorial[Educational tutorial]. Retrieved from https://www.tutorialspoint.com/cprogramming/index.htm

Suggested Reading

It is suggested that you read the following section found in Chapter 26:Standard Client-Server Protocolsof your textbook:

  • Section 26.2: FTP (optional)

Although we will not be implementing the FTP protocol in this project, this section of the textbook will provide some useful background information relating to the operation of the FTA application that you will implement.

Background Information

In Part 4 of the project, you will design and implement a file transfer application (FTA) that uses SWAP. You will reuse modules developed in Part 3 of the project, specifically:swap_client.c, swap_server.c, sdp.c, and checksum.c.

Client-Server Programming

In Part 4 of the project, you will gain a better understanding of network programming through development of a file transfer application that will help you understand how to use the Stop-and-Wait protocol in applications.

FTA

SWAP

SDP

Figure 1: Protocol layering of the file transfer application

In this part of the project, you write a file transfer application (FTA) that uses SWAP. The FTA application will follow a client-server paradigm. The FTA application will have a server program and a client program,fta_server.candfta_client.c.

Go to the attached zip file below and locate thefta_client.candfta_server.cfiles. These files are incomplete. Starting with these files, complete the FTA application incorporating the requirements listed below. You may need to design a packet format for your file transfer application.

You will also require the source code forswap_client.c, swap_server.c,sdp.c, andchecksum.c. These modules were coded and tested during Part 3 of the assignment. Reuse these files for Part 4.

Note

The file to be transferred betweenfta_clientandfta_servercan contain many lines of content, which means you will need to use a loop for the file transfer.

Project Requirements

In Part 4 of the project, you must complete thefta_client.candfta_server.cprograms.You can find the source code in the Project zip file attached below. The source modules will compile and run, but the program functionality is incomplete. To complete these programs, you should implement the following requirements:

  1. The source file name and the destination file name must be given to the client program as arguments.
  2. The client program must transfer the destination file name to the server program before the data transfer.
  3. The FTA client and server programs should only use the SWAP and SDP APIs.
  4. The FTA client and server programs should print your name and student number.

Note

In this assignment you will implement file functions to read and write the input file and the output file respectively. You may wish to review the document entitled "COMP 3271Project Work: Getting Started" and the practice program you were asked to complete at the beginning of the project work:file_copy.c. These activities will help refresh your knowledge of file I/O in the C programming language.

Compile and Test the FTA Client and Server Programs

You will need to test your programs on two terminals, one terminal for the server and another terminal for the client. The port number and IP address for the client should be specified as command line arguments, as well as the names of the input and output file. If the output file does not exist, your program should create the output file.

  1. # Compile the FTA server program
  2. $gcc fta_server.c swap_server.c sdp.c checksum.c -o fta_server
  3. # Run the SWAP server program from the command line; specify the port number on the command line
  4. ./fta_server 8899
  5. # Compile the SWAP client program
  6. $gcc fta_client.c swap_client.c sdp.c checksum.c -o fta_client
  7. # Run the client program from the command line; specify the IP address, port number and input-filename.
  8. ./fta_client 127.0.0.1 8899 input-filename
  9. Note: input-filename is a text file that you create to send to the server ; a simple text file with 5 lines is sufficient.
  10. If there are no errors in your implementation of FTA, then fta_client will transfer the input file to fta_server. The fta_server will write the contents of the file sent by fta_client to the output file. For the sake of simplicity, you may hardcode the name of the output file in fta_server.c
  11. After you copy a file using your FTA application, compare the input file to the output file o see if the destination file was copied correctly. Use thediffcommand to compare the two files.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles of Incident Response and Disaster Recovery

Authors: Michael E. Whitman, Herbert J. Mattord, Andrew Green

2nd edition

1111138052, 9781285712628 , 978-1111138059

More Books

Students also viewed these Computer Network questions

Question

Summarize the ABCDE method for overcoming irrational beliefs.

Answered: 1 week ago

Question

Describe what influences ethical decision making. AppendixLO1

Answered: 1 week ago