A semaphore is used to indicate that all of the segments are currently in use.
* - If you are familiar with signals and their use within
a kernel, then this code will make sense. If you have had
the Hardware class (CS324) or the OS class (CS345) you
should be familiar with interrupts. Signals are used in a
similar manner.
For example: if a segment was sent with sequence number 100 and length 8, the acknowledgement for that segment would contain the number 108. The next segment starts with sequence number 108 and length 8. The acknowledgement for this segment would be 116.
The TCP layer object will be similar to the other objects you have
written in prior labs. The TCP layer object must support the
following methods:
The arguments to the binary are:
tcp <host> <port> <srcIP> <srcETH> <dstIP> <dstETH> <-c | -s> [-v 0xXX]
where 0xXX is the hex value of the debug BIT pattern (see example below for BIT pattern).We are reserving 2 and 3 as bottom IP octet numbers for the switches. Use the ones you've used for previous labs.Example:
On the machine cs460-7 run
./tcp cs460-7 1234 192.168.102.7 00:a0:cc:66:99:33 192.168.102.2 00:a0:cc:66:99:35 -c -v 0xff
On the machine cs460-5 run with exactly the same arguments, except for the hostname and client flag
./tcp cs460-5 1234 192.168.102.7 00:a0:cc:66:99:33 192.168.102.2 00:a0:cc:66:99:35 -s -v 0xff
While you are getting your code working, you will probably want to turn on some serious debug statements. If you run the lab code with the -v option like "-v 0xff" it will turn on a lot of debug in the lower layers. Logically OR these values together to turn on multiple debugs at once.
0x01 - debug physical layer.
0x02 - debug ethernet layer.
0x04 - turns on a printf when something is not destined for your ethernet address.
0x08 - debug arp layer (basic).
0x10 - debug arp layer (table related output).
0x40 - debug IP layer.The passoff procedure will test the following specific items:
The following passoff levels will apply to this lab:
| Passoff Level |
Behavior |
Points |
| Minimal Passoff |
At least one set of segments can
be reliably sent and received without waiting for an ack to send the next segment |
5 |
| Both Connect and Accept work |
Code can function as a client
and a server |
2 |
| Perfect Behavior |
All tests pass correcttly |
3 |