src/others some test driven development milestones
src/pcs packet construction set from ports with some merges from current
src/scripts any tcptest script
src/scripts/fastners any script to call others in order to make it fast
src/scripts/tests any unittest script (conformance or regression test)
Script by script
tcpconnect.py This script make three way handshake(3wh), it's a raw one-method script. It was the first functional file, made to understand the tcp/ip 3wh and connection finalization. Serveral prints on screen for a better following of packet exchanged.
fasteners/tcpconnect.sh Calls tcpconnect with args.
tests/cthreewayhandshake_nooptions.py tcpconnect.py adapted to unittest. Code was refactured, removed duplicated code, several methods acting as utils created.
tests/c3waywithoutoptions.py first script using tcptest.py. Now code calls tcptest module, more readable and mature code.
tests/tcptest.py tcptest module. (detailed in the next section)
tests/csynbroadcast.py Sends a syn to ip broadcast addr, but to a specific MAC.
tests/cresetfromclosedstate.py Establish a conn, set DUT to make active close, wait 2MSL, and inject syn with the same finalized sequence number. rst and fin are also tested.
tests/cresetFromNonSyncState.py resetTcp created. tcptest.threewayhandshakenoopt created. (a)Make 3wh and then sends an out of window ack. (b)with connection established start active close and then sends an out of window ack
tests/cresetFromSyncState.py (a)Send an out of order acknowledgment, without any previous messages. (b)send an out of order acknowledgment at SYN_RECEIVE DUT's status.
tcptest module (main)
assertAcknowledgmentPresent assert that ack_number is different from None and greater then 0.
assertSequencePresent assert that sequence is different from None and greater then 0.
assertExpectedSequence assert receive segments carries the expected sequence number.
assertExpectedAcknowledgment assert receive segments carries the expected ack_number.