150 likes | 326 Views
CSC458 Programming Assignment 2. Hossein Kaffash Bokharaei. Simplified TCP (STCP). You will implement a reliable transport layer, a simplified version of TCP. Code Structure. Network Layer: Is given to you! Transport Layer: You should implement it in “ transport.c ”. Application Layer:
E N D
CSC458Programming Assignment 2 Hossein Kaffash Bokharaei
Simplified TCP (STCP) • You will implement a reliable transport layer, a simplified version of TCP.
Code Structure • Network Layer: • Is given to you! • Transport Layer: • You should implement it in “transport.c”. • Application Layer: • A sample is given • Different application will be used to test your transport layer.
First Milestone • Assume that the network layer is reliable: • No packet drops • No reordering • No retransmission • … • The supplied client and server programs should work in reliable mode.
Second Milestone • Your implementation should handle unreliable network layer: • Packet loss and reordering • The supplied client/server programs as well as more sophisticated client/server programs should work in unreliable mode.
Deliverables • Your modified transport.c • README file.
Things to consider • Read the code carefully! • Most of the parts are given to you, and it’s better to understand what they are doing.
Sequence Numbers • Every packet requires a sequence number. • Each connection has two streams of sequence numbers for incoming and outgoing data.
Data Packets • Data packets are sent as soon as data is available – no need for optimization.
ACK Packets • An ACK should be sent as soon as data arrives – no need for optimization.
Sliding Windows • Receiver window size and congestion window size are fixed!
TCP Options • Ignore them!
Retransmission • You need to have a timer for each packet sent. • In case of time out, at most 5 retransmission can occur.
Network Initiation • You should implement 3-way SYN handshake.
Network Termination • Each peer transmits a FIN segment when it finishes sending data.