12#include "ns3/tcp-header.h"
13#include "ns3/tcp-option-ts.h"
115 "timestamp disabled but option enabled");
121 "timestamp enabled but option disabled");
133 "timestamp disabled but option enabled");
139 "timestamp enabled but option disabled");
148 "timestamp disabled but option enabled");
161 "sender has not ts, but receiver sent anyway");
167 "receiver has not ts enabled but sent anyway");
176 "timestamp disabled but option enabled");
210 void DoRun()
override;
265 "Different TS values");
270 "Estimating Wrong RTT");
286 TestCase::Duration::QUICK);
288 TestCase::Duration::QUICK);
291 TestCase::Duration::QUICK);
TCP TimeStamp enabling Test.
Configuration m_configuration
Test configuration.
void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who) override
Packet transmitted down to IP layer.
TimestampTestCase(TimestampTestCase::Configuration conf)
Constructor.
void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who) override
Packet received from IP layer.
Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node) override
Create and install the socket to install on the sender.
Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node) override
Create and install the socket to install on the receiver.
Configuration
TimeStamp configuration.
TCP TimeStamp values Test.
void DoRun() override
Implementation to actually run this TestCase.
TimestampValueTestCase(double startTime, double timeToWait, std::string name)
Constructor.
double m_timeToWait
Time to wait (Seconds).
double m_startTime
Start time (Seconds).
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
void Check()
Perform the test checks.
void Init()
Test initialization.
double m_initValue
Initialization value (Seconds).
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
General infrastructure for TCP testing.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
static Time ElapsedTimeFromTsValue(uint32_t echoTime)
Estimate the Time elapsed from a TS echo value.
static uint32_t NowToTsValue()
Return an uint32_t value which represent "now".
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static constexpr auto UNIT
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TcpTimestampTestSuite g_tcpTimestampTestSuite
Static variable for test initialization.