Commit Graph

11719 Commits

Author SHA1 Message Date
Natale Patriciello
1bc7bed8b3 Added slow start test
Two test added: one for the normal slow start behavior in presence of a
normal socket (receive a packet, and ACKs the sequence number
according to the RFC) and the other with a malicious socket which sends
many small ACKs (on bad implementation this should artificially inflate
the window).
2015-10-16 10:43:48 -07:00
Natale Patriciello
74beb15f40 Added an ErrorChannel aware of TCP
The class is responsible to take away the IP and TCP header from the packet,
and then to interrogate the pure virtual method ShouldDrop, dropping the packet
accordingly to the returned value. An implementation is a channel which
drops packet with specified flags.
2015-10-16 10:43:44 -07:00
Natale Patriciello
562c67c73a Making CompleteFork as virtual
The change is needed because subclass should be allowed to do things (e.g.fire a
callbacks) when the fork is completed.
2015-10-16 10:43:40 -07:00
Natale Patriciello
157fec86d9 Added a GeneralTest class for TCP
The class provides a general infrastructure for a TCP-related test,
setting up the environment (two sockets connected through
SimpleNetDevice over SimpleChannel) and provides the basic management of
parameters (like segment size).
2015-10-16 10:43:36 -07:00
Natale Patriciello
8350087b48 [BUG 1571] Actively send an update-window segment
The receiver actively sends an update-window segment (a segment with ACK
flag set and the window field updated) when SetRcvBufSize is explicitly
called and the buffer size increases.
2015-10-16 10:43:26 -07:00
Natale Patriciello
5f80b1421a [BUG 1571] Transmit data after rWnd has changed
Moved the entering of persistent state in DoForwardUp(), right before
the processing of the packet (if the rWnd is 0, schedule a persist
timeout).

Right after the processing, check if rWnd is different from 0 but
the persistent event is still active: in this case (triggered when an
update window packet is received) exit from the zerowindow persist state
and try to send data.
2015-10-16 10:43:22 -07:00
Natale Patriciello
98dc5acbdf [BUG 2041] Fix RTO calculation when the tx queue is empty 2015-10-16 10:43:17 -07:00
Natale Patriciello
519f422b72 [BUG 2150] Added a fixed number of retransmission attempts 2015-10-16 10:43:03 -07:00
Natale Patriciello
df353911fb [BUG 2159] Advertise right window in TcpSocketBase 2015-10-16 10:42:57 -07:00
Natale Patriciello
62fe16a69d Added Rx and Tx callbacks on TCP
Also moved AckState enum to TcpSocketState (to avoid conflict with state in
the TcpSocketBase).
2015-10-16 10:42:44 -07:00
Natale Patriciello
4b8027f849 Only first partial ACK should reset the RTO 2015-10-16 10:42:36 -07:00
Natale Patriciello
b87e04a77a Splitted congestion control from TcpSocketBase
Added TcpCongestionOps class, in where the congestion control is
managed. It is created/added to a socket through TcpL4Protocol.

TcpSocketBase and the congestion algorithm classes reworked to be
compatible with the new TcpCongestionOps class.
2015-10-16 10:42:30 -07:00
Natale Patriciello
958b641e2a Do not miss ACKs due to cumulative ACK strategy
Reworked slow start and congestion avoidance, in order to do not miss ACKs (due
to cumulative ACK strategy) in Tcp NewReno.
2015-10-16 10:42:18 -07:00
Natale Patriciello
2e5a2c1301 Created TCB: Transmission Control Block
The data structure contains information that should be exchanged between
congestion control and the socket.
2015-10-16 10:42:14 -07:00
Natale Patriciello
e8a3391575 Messages on TcpSocketBase updated 2015-10-16 10:39:34 -07:00
Natale Patriciello
e9bc4886c5 Messages on TcpL4Protocol updated 2015-10-16 10:39:29 -07:00
Natale Patriciello
c43ad360fd Retransmit conform to RFC 5681
Before, sshthresh was halved each time a loss is detected. Now, it halves only
on the first window loss.
2015-10-16 10:39:20 -07:00
Natale Patriciello
d7b98b2396 Integrated ACK state machine in ReceivedAck method 2015-10-16 10:39:02 -07:00
Natale Patriciello
2c0cfe1201 Removed Tahoe. 2015-10-16 10:38:57 -07:00
Natale Patriciello
70803e884d Merged Fast Recovery and Fast Retransmit in TcpSocketBase
Since RFC 5681 defines Fast Recovery and Fast Retransmit, it has no sense to
replicate these algorithms over all TCP variants.
The only thing that a variant is allowed to do is using a different slow start
threshold: for example, TcpWestwood uses an estimate of the bandwidth to
calculate it.
So, its calculus has been delegated to a virtual function GetSsThresh which
replaces the old DupAck().

Fixed a bug in Tcp Tahoe implementation (slow start threshold
diminuished only from an RTO).

Fixed a bug on the inflation of the cWnd; it should be inflated of
m_dupAckCount segments (and not only 3, which is OK for the default
value of m_reTxThresh, but not for the others).
2015-10-16 10:38:51 -07:00
Natale Patriciello
194cca3ad9 Removed RFC 793 TCP, without congestion control
Using the TCP without congestion control is not recommented anymore by
IETF. This patch removes the class derived from RFC793. Its behavior
could be reintroduced later with using some conditional Attributes
inside TcpSocketBase.
2015-10-16 10:38:44 -07:00
Natale Patriciello
51e94e52f0 Removed TcpReno from ns-3 mainline
TcpNewReno is introduced in RFC 2582. The most recent RFC on this is
the RFC 6582. Since its introduction, Tcp NewReno is the RECOMMENDED
algorithm by the Internet Engineering Task Force. The main difference
between Reno and New Reno is in the Fast retransmit algorithm, in order
to recover more quickly when multiple packet losses occur in a single
window. NewReno introduces the concept of Partial acknowledgments. Since
the intention is to merge fast retransmit and fast recovery into
TcpSocketBase, there isn't the possibility to maintain TcpReno as
separate class. However, its behavior could be introduced again with one
conditional attribute in TcpSocketBase itself.
2015-10-16 10:38:39 -07:00
Natale Patriciello
c86045ee2d Management of ignored ACK moved away from ReceivedAck
The function ReceivedAck contained some if/else switches to manage ACK
which, by definition, should have been ignored, like old ACKs
(SEG.ACK < SND.UNA). The code still misses the management of the
mitigation of Blind Data Injection Attack.

This patch moves these switches inside ProcessEstablished, to simplify
the ReceivedAck function, which now manages only valid ACKS.

To complete the overview, one more condition has been added, which is
the case of an out-of-order ACK (SEG.ACK > SND.NXT).
2015-10-16 10:38:35 -07:00
Natale Patriciello
3fd6f45051 Introduction of the ACK state machine
This commits contains only the definition (in other words, the interface)
of the ACK state machine, where the design is taken from Linux v4.0.
The state machine allows to define congestion situations avoiding the
use of boolean state variables.
2015-10-16 10:38:30 -07:00
Natale Patriciello
fbbd607e3c Added queue support in tcp-variants-comparison 2015-10-16 10:38:24 -07:00
Tommaso Pecorella
b46c6eef97 Bug 2195 - Udp[*]Client can't send packets to broadcast address 2015-10-19 22:04:11 +02:00
Tom Henderson
9c5e9b5cf5 rescan bindings 2015-10-11 11:15:57 -07:00
Sébastien Deronne
2cdeb033c1 small typos 2015-10-11 16:00:39 +02:00
Sébastien Deronne
8f29278f46 RELEASE_NOTES 2015-10-11 08:38:04 +02:00
Sébastien Deronne
d1a8ff9505 fix issues with Block Ack Requests in A-MPDUs 2015-10-11 08:30:07 +02:00
Sébastien Deronne
8f1bc1b48a style 2015-10-10 17:04:27 +02:00
Sébastien Deronne
3842513b39 Refactor previous commit 2015-10-10 16:49:26 +02:00
Sébastien Deronne
3527b5e411 Bug 1954 [wifi] - Serialized size of wifi-net-device differ for TX and RX trace 2015-10-10 11:43:00 +02:00
Sébastien Deronne
7ca24da09b rescan bindings 2015-10-10 11:05:11 +02:00
Sébastien Deronne
46a217a308 Move uint8_t packetType to enum mpduType 2015-10-10 11:01:47 +02:00
Sébastien Deronne
bf3ee0bdbf Bug 2184 [wifi] - integer overflow in MacLow; remove dependcy between tx and rx reference number field in MPDU status 2015-10-10 11:01:44 +02:00
Tom Henderson
1611d6c483 bug 2181: Xcode 7.0 (clang-602.0.53) errors 2015-09-28 20:23:11 -07:00
Tom Henderson
395432f376 add release 3.24.1 to RELEASE_NOTES 2015-10-06 22:06:28 -07:00
miilic
79106b45f2 Bug 2170 - AnimationInterface outputs improperly formed XML 2015-10-01 07:59:09 -07:00
Sébastien Deronne
5aa0f567df Bug 2003 [wifi] - Missing DSSS short PLCP preamble 2015-09-30 22:24:08 +02:00
Tom Henderson
cfccf23b06 fix sphinx warnings 2015-09-27 12:49:29 -07:00
Tommaso Pecorella
0f7f58c31e [doxygen] Small fix in WifiRadioEnergyModel docs 2015-09-27 10:49:52 +02:00
Tom Henderson
8aa4c425e1 pybindgen required version is now a string literal, not a tuple 2015-09-21 10:21:07 -07:00
Matthieu Coudron
8171d94e7c Add Node::GetLocalTime() placeholder, alias to Simulator::Now() 2015-09-22 23:52:56 +02:00
Tommaso Pecorella
88f7a8df92 Bug 2183 - [energy] LiIonEnergySourceHelper is not in the wscript 2015-09-21 23:12:24 +02:00
Tommaso Pecorella
7870451290 Bug 2177 - Ipv6ExtensionHeader length - code cleanup and remove hardcoded values 2015-09-19 16:14:49 +02:00
Sébastien Deronne
928d66f741 Update RELEASE_NOTES 2015-09-18 11:18:45 +02:00
Mirko Banchi
03bf49fe74 Bug 1132 - Avoid misleading for loops with no body. 2015-09-16 23:34:51 +02:00
Tom Henderson
10fa6f4e2e update RELEASE_NOTES and CHANGES.html for next release cycle 2015-09-15 16:13:22 -07:00
Tom Henderson
6bcce32d02 update version numbers in tutorial 2015-09-15 12:13:38 -07:00