tcp-socket-base/bulk-send-application: Implement and consume TCP packet retransmission trace
Related discussion: https://groups.google.com/g/ns-3-users/c/q6WGVRJ-8Cc
This MR adds a trace source + accessor for TCP-retransmitted packets in tcp-socket-base
. It is triggered in TcpSocketBase::SendDataPacket()
, right after the standard m_txTrace
, if the packet is a retransmission.
Furthermore, in bulk-send-application
, we connect this TcpSocketBase
trace to BulkSendApplication::PacketRetransmitted()
which itself launches a continuation m_retransmissionTrace
of the same type. Together with the corresponding trace source accessor, this enables users to directly consume TCP retransmissions from any BulkSendApplication
that uses TcpSocketBase
or derived types.
A quick style check via utils/check-style-clang-format.py-format.py
(clang-format v15, ubuntu 20.04) shows no remaining style issues.
NOTE: as discussed in aforementioned google group thread, the retransmission trace is of different origin than the traces used in FlowMonitor
/FlowProbe
, and thus obtained values for retransmitted data packets/bytes are rather rough estimates.
NOTE2: I will squash the commits once this is otherwise ready to be merged.