23 #include "ns3/private/tcp-option-ts.h"
65 socket->SetAttribute (
"Timestamp",
BooleanValue (
false));
73 socket->SetAttribute (
"Timestamp",
BooleanValue (
false));
92 socket->SetAttribute (
"Timestamp",
BooleanValue (
false));
96 socket->SetAttribute (
"Timestamp",
BooleanValue (
false));
100 socket->SetAttribute (
"Timestamp",
BooleanValue (
true));
104 socket->SetAttribute (
"Timestamp",
BooleanValue (
true));
117 "timestamp disabled but option enabled");
122 "timestamp enabled but option disabled");
133 "timestamp disabled but option enabled");
138 "timestamp enabled but option disabled");
146 "timestamp disabled but option enabled");
158 "sender has not ts, but receiver sent anyway");
163 "receiver has not ts enabled but sent anyway");
171 "timestamp disabled but option enabled");
198 virtual void DoRun (
void);
Smart pointer class similar to boost::intrusive_ptr.
AttributeValue implementation for Boolean.
static Time ElapsedTimeFromTsValue(uint32_t echoTime)
Estimate the Time elapsed from a TS echo value.
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
static void Run(void)
Run the simulation.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
This test suite implements a Unit Test.
ns3::TcpTimestampTestSuite g_tcpTimestampTestSuite
TimestampTestCase(TimestampTestCase::Configuration conf)
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
virtual void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet received from IP layer.
TimestampValueTestCase(double startTime, double timeToWait, std::string name)
#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.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
Configuration m_configuration
#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...
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
static uint32_t NowToTsValue()
Return an uint32_t value which represent "now".
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
General infrastructure for TCP testing.
Time Seconds(double value)
Construct a Time in the indicated unit.
virtual void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
virtual void DoTeardown(void)
Implementation to do any local setup required for this TestCase.
virtual void DoRun(void)
Implementation to actually run this TestCase.