A Discrete-Event Network Simulator
ns3::olsr::Bug780Test Class Reference

See Bug 780 More...

#include "bug780-test.h"

+ Inheritance diagram for ns3::olsr::Bug780Test:
+ Collaboration diagram for ns3::olsr::Bug780Test:

Public Member Functions

 Bug780Test ()
 ~Bug780Test ()
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()
 Destructor. More...
std::string GetName (void) const

Private Member Functions

void CreateNodes ()
 Create & configure test network. More...
void DoRun ()
 Go. More...
void Receive (Ptr< Socket > socket)
 Receive echo reply. More...
void SendPing ()
 Send one ping. More...

Private Attributes

uint16_t m_recvCount
 Received ECHO Reply counter. More...
uint16_t m_seq
 Sequence number. More...
Ptr< Socketm_socket
 Socket. More...
const Time m_time
 Total simulation time. More...

Additional Inherited Members

- Public Types inherited from ns3::TestCase
enum  TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 }
 How long the test takes to execute. More...
- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
 Constructor. More...
void AddTestCase (TestCase *testCase, enum TestDuration duration)
 Add an individual child TestCase to this test suite. More...
TestCaseGetParent () 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...

Detailed Description

See Bug 780

Definition at line 29 of file bug780-test.h.

Constructor & Destructor Documentation

ns3::olsr::Bug780Test::Bug780Test ( )

Definition at line 46 of file bug780-test.cc.

ns3::olsr::Bug780Test::~Bug780Test ( )

Definition at line 52 of file bug780-test.cc.

Member Function Documentation

void ns3::olsr::Bug780Test::DoRun ( void  )
void ns3::olsr::Bug780Test::Receive ( Ptr< Socket socket)

Receive echo reply.

socketthe socket

Definition at line 146 of file bug780-test.cc.

References ns3::InetSocketAddress::ConvertFrom(), ns3::Icmpv4Header::ECHO_REPLY, ns3::InetSocketAddress::GetPort(), ns3::Socket::GetRxAvailable(), ns3::InetSocketAddress::IsMatchingType(), m_recvCount, m_socket, NS_ASSERT, ns3::Socket::RecvFrom(), and ns3::Packet::RemoveHeader().

Referenced by CreateNodes().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::olsr::Bug780Test::SendPing ( )

Member Data Documentation

uint16_t ns3::olsr::Bug780Test::m_recvCount

Received ECHO Reply counter.

Definition at line 51 of file bug780-test.h.

Referenced by DoRun(), and Receive().

uint16_t ns3::olsr::Bug780Test::m_seq

Sequence number.

Definition at line 49 of file bug780-test.h.

Referenced by SendPing().

Ptr<Socket> ns3::olsr::Bug780Test::m_socket


Definition at line 47 of file bug780-test.h.

Referenced by CreateNodes(), Receive(), and SendPing().

const Time ns3::olsr::Bug780Test::m_time

Total simulation time.

Definition at line 36 of file bug780-test.h.

Referenced by DoRun(), and SendPing().

The documentation for this class was generated from the following files: