Submit and pass all tests to enable saving to GitHub.
Implementation
Why This Matters
This SEQ/ACK bookkeeping is what the Linux kernel's tcp_sock struct maintains per connection, and it's exactly what Wireshark's 'Follow TCP Stream' feature reconstructs when reassembling a byte stream from captured segments. Real production bugs — like the interaction between Nagle's algorithm and delayed ACKs causing 40ms stalls — trace directly back to misunderstanding this sequence-number accounting.
Hints
0 / 3 revealed
Validation Suite
main.c
Workspace 1.0
Implement a simulation of TCP data transfer with sequence numbers and ACKs.
Requirements:
Simulate sender and receiver exchanging data segments
Show sequence numbers incrementing by bytes sent
Show ACK numbers acknowledging received data
Handle multiple segments with correct SEQ/ACK progression
Demonstrate in-order delivery concept
Show duplicate ACK concept for missing segments
Print each segment and ACK with sequence numbers
Calculate next expected sequence number after each exchange