Public Member Functions | |
Ipv4FragmentationTest () | |
~Ipv4FragmentationTest () | |
virtual void | DoRun (void) |
Implementation to actually run this TestCase. More... | |
void | HandleReadClient (Ptr< Socket > socket) |
void | HandleReadIcmpClient (Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo) |
void | HandleReadServer (Ptr< Socket > socket) |
Ptr< Packet > | SendClient (void) |
void | SetFill (uint8_t *fill, uint32_t fillSize, uint32_t dataSize) |
void | StartClient (Ptr< Node > ClientNode) |
void | StartServer (Ptr< Node > ServerNode) |
![]() | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
Private Attributes | |
uint8_t * | m_data |
uint32_t | m_dataSize |
uint8_t | m_icmpType |
Ptr< Packet > | m_receivedPacketClient |
Ptr< Packet > | m_receivedPacketServer |
Ptr< Packet > | m_sentPacketClient |
uint32_t | m_size |
Ptr< Socket > | m_socketClient |
Ptr< Socket > | m_socketServer |
Additional Inherited Members | |
![]() | |
enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
TestCase (std::string name) | |
Constructor. More... | |
void | AddTestCase (TestCase *testCase, enum TestDuration duration) |
Add an individual child TestCase to this test suite. More... | |
TestCase * | GetParent () const |
Get the parent of this TestCsse. More... | |
bool | IsStatusFailure (void) const |
Check if any tests failed. More... | |
bool | IsStatusSuccess (void) const |
Check if all tests passed. More... | |
void | SetDataDir (std::string directory) |
Set the data directory where reference trace files can be found. More... | |
void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
Log the failure of this TestCase. More... | |
bool | MustAssertOnFailure (void) const |
Check if this run should assert on failure. More... | |
bool | MustContinueOnFailure (void) const |
Check if this run should continue on failure. More... | |
std::string | CreateDataDirFilename (std::string filename) |
Construct the full path to a file in the data directory. More... | |
std::string | CreateTempDirFilename (std::string filename) |
Construct the full path to a file in a temporary directory. More... | |
Definition at line 79 of file ipv4-fragmentation-test.cc.
Ipv4FragmentationTest::Ipv4FragmentationTest | ( | ) |
Definition at line 114 of file ipv4-fragmentation-test.cc.
References m_data, m_dataSize, and m_socketServer.
Ipv4FragmentationTest::~Ipv4FragmentationTest | ( | ) |
Definition at line 122 of file ipv4-fragmentation-test.cc.
References m_data, and m_dataSize.
|
virtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 257 of file ipv4-fragmentation-test.cc.
References ns3::Ipv4::AddAddress(), ns3::Ipv4::AddInterface(), third::channel, ns3::Packet::CopyData(), ns3::ErrorModel::Disable(), ns3::ErrorModel::Enable(), ns3::NetDeviceContainer::Get(), ns3::Packet::GetByteTagIterator(), ns3::TypeId::GetConstructor(), ns3::ByteTagIterator::Item::GetEnd(), ns3::Node::GetId(), ns3::TypeId::GetName(), ns3::Socket::GetNode(), ns3::Object::GetObject(), ns3::Packet::GetSize(), ns3::ByteTagIterator::Item::GetStart(), ns3::ByteTagIterator::Item::GetTag(), IPv4TestTag::getToken(), ns3::ByteTagIterator::Item::GetTypeId(), ns3::SimpleNetDeviceHelper::Install(), ns3::InternetStackHelper::Install(), m_data, m_icmpType, m_receivedPacketServer, m_socketClient, first::nodes, NS_TEST_EXPECT_MSG_EQ, NS_TEST_EXPECT_MSG_NE, packetSize, ns3::Packet::PeekPacketTag(), ns3::BinaryErrorModel::Reset(), ns3::Seconds(), SendClient(), ns3::Config::SetDefault(), SetFill(), ns3::ErrorChannel::SetJumpingMode(), ns3::ErrorChannel::SetJumpingTime(), ns3::SimpleNetDeviceHelper::SetNetDevicePointToPointMode(), ns3::Ipv4::SetUp(), StartClient(), and StartServer().
Definition at line 186 of file ipv4-fragmentation-test.cc.
References ns3::Packet::Copy(), m_receivedPacketClient, and ns3::Socket::RecvFrom().
Referenced by StartClient().
void Ipv4FragmentationTest::HandleReadIcmpClient | ( | Ipv4Address | icmpSource, |
uint8_t | icmpTtl, | ||
uint8_t | icmpType, | ||
uint8_t | icmpCode, | ||
uint32_t | icmpInfo | ||
) |
Definition at line 200 of file ipv4-fragmentation-test.cc.
References m_icmpType.
Referenced by StartClient().
Definition at line 155 of file ipv4-fragmentation-test.cc.
References ns3::Packet::Copy(), m_receivedPacketServer, and ns3::Socket::RecvFrom().
Referenced by StartServer().
Definition at line 235 of file ipv4-fragmentation-test.cc.
References ns3::Packet::AddByteTag(), ns3::Packet::AddPacketTag(), m_data, m_dataSize, m_size, m_socketClient, ns3::Socket::Send(), and IPv4TestTag::setToken().
Referenced by DoRun().
void Ipv4FragmentationTest::SetFill | ( | uint8_t * | fill, |
uint32_t | fillSize, | ||
uint32_t | dataSize | ||
) |
Definition at line 208 of file ipv4-fragmentation-test.cc.
References m_data, m_dataSize, and m_size.
Referenced by DoRun().
Definition at line 169 of file ipv4-fragmentation-test.cc.
References ns3::Socket::Bind(), ns3::Socket::Connect(), HandleReadClient(), HandleReadIcmpClient(), m_socketClient, ns3::MakeCallback(), ns3::ObjectBase::SetAttribute(), and ns3::Socket::SetRecvCallback().
Referenced by DoRun().
Definition at line 134 of file ipv4-fragmentation-test.cc.
References ns3::Socket::Bind(), HandleReadServer(), m_socketServer, ns3::MakeCallback(), ns3::UdpSocket::MulticastJoinGroup(), and ns3::Socket::SetRecvCallback().
Referenced by DoRun().
|
private |
Definition at line 89 of file ipv4-fragmentation-test.cc.
Referenced by DoRun(), Ipv4FragmentationTest(), SendClient(), SetFill(), and ~Ipv4FragmentationTest().
|
private |
Definition at line 88 of file ipv4-fragmentation-test.cc.
Referenced by Ipv4FragmentationTest(), SendClient(), SetFill(), and ~Ipv4FragmentationTest().
|
private |
Definition at line 91 of file ipv4-fragmentation-test.cc.
Referenced by DoRun(), and HandleReadIcmpClient().
Definition at line 82 of file ipv4-fragmentation-test.cc.
Referenced by HandleReadClient().
Definition at line 83 of file ipv4-fragmentation-test.cc.
Referenced by DoRun(), and HandleReadServer().
Definition at line 81 of file ipv4-fragmentation-test.cc.
|
private |
Definition at line 90 of file ipv4-fragmentation-test.cc.
Referenced by SendClient(), and SetFill().
Definition at line 87 of file ipv4-fragmentation-test.cc.
Referenced by DoRun(), SendClient(), and StartClient().
Definition at line 86 of file ipv4-fragmentation-test.cc.
Referenced by Ipv4FragmentationTest(), and StartServer().