22 #include "ns3/simulator.h" 
   23 #include "ns3/uinteger.h" 
   24 #include "ns3/traced-callback.h" 
   25 #include "ns3/packet.h" 
   26 #include "ns3/packet-socket-helper.h" 
   27 #include "ns3/packet-socket-client.h" 
   28 #include "ns3/packet-socket-server.h" 
   29 #include "ns3/simple-net-device.h" 
   30 #include "ns3/simple-channel.h" 
   47   virtual void DoRun (
void);
 
   59   : 
TestCase (
"Packet Socket Apps test")
 
   89   txDev = CreateObject<SimpleNetDevice> ();
 
   93   rxDev = CreateObject<SimpleNetDevice> ();
 
  121   Simulator::Destroy ();
 
virtual Address GetAddress(void) const 
 
uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node. 
 
void SetLocal(PacketSocketAddress addr)
set the local address and protocol to be used 
 
PacketSocketAppsTestSuite()
 
static PacketSocketAppsTestSuite g_packetSocketAppsTestSuite
Static variable for test initialization. 
 
an address for a packet socket 
 
virtual void DoRun(void)
Implementation to actually run this TestCase. 
 
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not. 
 
uint32_t GetSize(void) const 
Returns the the size in bytes of the packet (including the zero-filled initial payload). 
 
This test suite implements a Unit Test. 
 
PacketSocket apps TestSuite. 
 
uint32_t m_receivedPacketNumber
Number of received packets. 
 
Give ns3::PacketSocket powers to ns3::Node. 
 
void SetSingleDevice(uint32_t device)
Set the address to match only a specified NetDevice. 
 
a polymophic address class 
 
virtual void SetNode(Ptr< Node > node)
 
PacketSocket apps Unit Test. 
 
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite. 
 
Hold an unsigned integer type. 
 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
 
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
void SetPhysicalAddress(const Address address)
Set the destination address. 
 
keep track of a set of node pointers. 
 
void Install(Ptr< Node > node) const 
Aggregate an instance of a ns3::PacketSocketFactory onto the provided node. 
 
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node. 
 
void SetRemote(PacketSocketAddress addr)
set the remote address and protocol to be used 
 
Ptr< Node > Get(uint32_t i) const 
Get the Ptr stored in this container at a given index. 
 
uint32_t m_receivedPacketSize
Received packet size. 
 
void SetProtocol(uint16_t protocol)
Set the protocol. 
 
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer. 
 
void ReceivePkt(Ptr< const Packet > packet, const Address &from)
Receive a packet. 
 
void SetChannel(Ptr< SimpleChannel > channel)
Attach a channel to this net device. 
 
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful. 
 
virtual uint32_t GetIfIndex(void) const