8#include "ns3/core-module.h"
9#include "ns3/tcp-option-ts.h"
10#include "ns3/tcp-option-winscale.h"
11#include "ns3/tcp-option.h"
43 void DoRun()
override;
82 uint8_t kind = start.
PeekU8();
120 void DoRun()
override;
171 uint8_t kind = start.
PeekU8();
197 for (uint8_t i = 0; i < 15; ++i)
200 TestCase::Duration::QUICK);
203 TestCase::Duration::QUICK);
TCP TimeStamp option Test.
void TestSerialize()
Serialization test.
uint32_t m_timestamp
TimeStamp.
uint32_t m_echo
Echoed TimeStamp.
void TestDeserialize()
Deserialization test.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
void DoRun() override
Implementation to actually run this TestCase.
TcpOptionTSTestCase(std::string name)
Constructor.
TCP Window Scaling option Test.
void TestSerialize()
Serialization test.
void TestDeserialize()
Deserialization test.
uint8_t m_scale
Window scaling.
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
void DoRun() override
Implementation to actually run this TestCase.
TcpOptionWSTestCase(std::string name, uint8_t scale)
Constructor.
iterator in a Buffer instance
automatically resized byte buffer
void AddAtStart(uint32_t start)
Buffer::Iterator Begin() const
Smart pointer class similar to boost::intrusive_ptr.
Defines the TCP option of kind 8 (timestamp option) as in RFC 1323
void SetTimestamp(uint32_t ts)
Set the timestamp stored in the Option.
uint32_t GetSerializedSize() const override
Returns number of bytes required for Option serialization.
uint32_t GetTimestamp() const
Get the timestamp stored in the Option.
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the Option from a buffer iterator.
uint32_t GetEcho() const
Get the timestamp echo stored in the Option.
void Serialize(Buffer::Iterator start) const override
Serialize the Option to a buffer iterator.
void SetEcho(uint32_t ts)
Set the timestamp echo stored in the Option.
Defines the TCP option of kind 3 (window scale option) as in RFC 1323
uint8_t GetScale() const
Get the scale value (uint8_t)
uint32_t GetSerializedSize() const override
Returns number of bytes required for Option serialization.
void Serialize(Buffer::Iterator start) const override
Serialize the Option to a buffer iterator.
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the Option from a buffer iterator.
void SetScale(uint8_t scale)
Set the scale option.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static constexpr auto UNIT
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::StringValue attribute value declarations.
static TcpOptionTestSuite g_TcpOptionTestSuite
Static variable for test initialization.