CS 4873 Computer Networks

Spring 2008
Instructor Dr. Turgay Korkmaz

Homework 3 (programming)
Due by March 14, 2008 (5:30pm)

NO LATE HW

zip all your files and submit only zip file using WebCT.


In this assignment, you will design and implement a stop-and-wait  RDT protocol over UDP sockets in C (or Java). You need to implement two programs that will be executed on two different hosts as follows  

On receiver named by receiver_hostname:

    > receiver receiver_port   probability

On sender named by sender_hostname:

    > sender receiver_hostname receiver_port   probability

probability should be a double value in in the range [0.0, 1.0], indicating the probability of packet loss or corruption...

Sender has always data to send like aaaa, bbbb, cccc, dddd, eeee, ffff, ... until zzzz

 

Use the following header file in both sender and receiver, which basically defines a packet structure to exchange 

between sender and receiver, and a function to simulate network channel called  udt_sendto (which will be used instead of sendto in UDP)

common.h

You need to develop other functions like chksum computation etc. for an example program using UDP see  using UDP in C.

Both sender and receiver will printout sent/received packet/ack numbers....

GRADING (Total grade will be 100 points.)

Mainly there are two programs to implement and one report to write...

  1. (40 points) sender.c and its execution
  2. (40 points) receiver.c and its execution
  3. (20 points) Documentation (e.g., protocol design, implementation details, OUTPUTS on both sender and receiver sides, .)