|
TWiki . Simulation . INETFrameworkTCPTests
|
- PPP Interface of the sender has 45 packet capacity queue
- MSS = 1024 bytes
- initial Window Size = 64 MSSs
- Run for 4 simulation seconds
TCP Sender Pseudo Code
- Based on: Kurose-Ross Chapter 3, RFC 2001 and RFC 2581
- RTO timer calculation is not added yet.
nextSeqNum = initialSeqNumber
sendBase = initialSeqNumber
numDupACKs = 0
while (1) {
switch (event) {
case (event == data received from application above)
create TCP segment with seqNumber = nextSeqNum
if (timer is not running) {
start timer
}
deliver segment to IP layer
nextSeqNum = nextSeqNum + length(data)
break
case (event == timer expiry)
retransmit not-yet-acknowledged segment which has smallest sequence number
restart timer
break
case (event == ACK)
y = ACK field value
if (y > sendBase) { // receiver acknowledges delivery of fresh data
sendBase = y
numDupACKs = 0
if (nextSeqNum - 1 - sendBase > 0) { // there are currently not-yet-acknowledged segments
restart timer
} else {
cancel timer
}
} else { // a dupACK for an already ACKed segment
numDupAcks++
restart timer // There is at least one currently not-yet-acknowledged segment
if (numDupACKs == 3) { // TCP fast retransmit
resend segment with seqNum = y
} else if (numDupACKs > 3) {
// It seems that TAHOE doesn't send any fresh segments. Our RENO behaves like TAHOE -- see below graph.
// Every dupACK is a sign of correct delivery of a segment.
// RENO DOES send -- See Figure 2 of K. Fall and S. Floyd "Simulation based comparisons of Tahoe, Reno, and SACK TCP"
}
}
break
} // switch
} // while
I think whenever a dupACK arrives, the sender should keep sending packets. Every ACK is a sign of correct delivery of a packet. I am going to add some more info.
Copyright © 1999-2003 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.