cs436-A2-w14

When the link emulator receives a packet from the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 
per
line.
You
must
follow
this
format
to
avoid
losing
marks.
 4 Receiver
Program
(receiver)
 You
should
implement
the
receiver
program,
named
as
receiver,
on
a
UNIX
system.
Its
command
line
 input
includes
the
following:
<hostname for the network emulator>,
<UDP port number used by the link emulator to receive ACKs from the receiver>,
 <UDP port number used by the receiver to receive data from the emulator>,
 and
 <name of the file into which the received data is written>
in
the
given
order.
 
 When
receiving
packets
sent
by
the
sender
via
the
network
emulator,
it
should
execute
the
following:
 •
check
the
sequence
number
of
the
packet;
 •
 if
 the
 sequence
 number
 is
 the
 one
 that
 it
 is
 expecting,
 it
 should
 send
 an
 ACK
 packet
 back
 to
 the
 
 2
 sender
with
the
sequence
number
equal
to
the
sequence
number
of
the
received
packet;
 •
 in
 all
 other
 cases,
 it
 should
 discard
 the
 received
 packet
 and
 resends
 an
 ACK
 packet
 for
 the
 most
 recently
received
in‐order...
View Full Document

This homework help was uploaded on 04/06/2014 for the course CS 436 taught by Professor Dr.reidholmes during the Winter '11 term at Waterloo.

Ask a homework question - tutors are online