34 #include "ns3/boolean.h"
36 #include "ns3/ipv4-route.h"
37 #include "ns3/mesh-helper.h"
38 #include "ns3/simulator.h"
39 #include "ns3/double.h"
40 #include "ns3/uinteger.h"
41 #include "ns3/string.h"
42 #include "ns3/ipv4-address-helper.h"
44 #include "ns3/dsr-fs-header.h"
45 #include "ns3/dsr-option-header.h"
46 #include "ns3/dsr-rreq-table.h"
47 #include "ns3/dsr-rcache.h"
48 #include "ns3/dsr-rsendbuff.h"
49 #include "ns3/dsr-main-helper.h"
50 #include "ns3/dsr-helper.h"
84 const uint8_t*
data = buf.PeekData ();
108 std::vector<Ipv4Address> nodeList;
125 p->AddHeader (header);
126 p->RemoveAtStart (8);
129 uint32_t bytes = p->RemoveHeader (h2);
154 std::vector<Ipv4Address> nodeList;
166 p->AddHeader (header);
167 p->RemoveAtStart (8);
170 uint32_t bytes = p->RemoveHeader (h2);
194 std::vector<Ipv4Address> nodeList;
211 p->AddHeader (header);
212 p->RemoveAtStart (8);
215 uint32_t bytes = p->RemoveHeader (h2);
251 p->AddHeader (header);
252 p->RemoveAtStart (8);
254 uint32_t bytes = p->RemoveHeader (h2);
285 p->AddHeader (header);
286 p->RemoveAtStart (8);
287 p->AddHeader (header);
289 p->RemoveAtStart (8);
290 uint32_t bytes = p->RemoveHeader (h2);
325 p->AddHeader (header);
326 p->RemoveAtStart (8);
327 p->AddHeader (header);
329 p->RemoveAtStart (8);
330 uint32_t bytes = p->RemoveHeader (h2);
354 std::vector<Ipv4Address> ip;
373 std::vector<Ipv4Address> ip2;
454 Simulator::Destroy ();
bool Find(Ipv4Address dst)
Check if a packet with destination dst exists in the queue.
bool DeleteRoute(Ipv4Address dst)
Delete the route with certain destination address.
uint32_t m_reqNo
Route request number.
uint32_t GetSize()
Number of entries.
void SetVector(IP_VECTOR v)
Ipv4Address GetDestination() const
automatically resized byte buffer
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
bool AddRoute(RouteCacheEntry &rt)
Add route cache entry if it doesn't yet exist in route cache.
uint32_t GetMaxQueueLen() const
Return the maximum queue length.
bool Dequeue(Ipv4Address dst, SendBuffEntry &entry)
Return first found (the earliest) entry for the given destination.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Time GetExpireTime() const
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
IP_VECTOR GetVector() const
void SetExpireTime(Time exp)
bool LookupRoute(Ipv4Address id, RouteCacheEntry &rt)
Lookup route cache entry with destination address dst.
Ipv4 addresses are stored in host order in this class.
DsrTestSuite g_dsrTestSuite
virtual void DoRun(void)
Implementation to actually run this TestCase.
void AddDsrOption(DsrOptionHeader const &option)
Serialize the option, prepending pad1 or padn option as necessary.
void DropPacketWithDst(Ipv4Address dst)
Remove all packets with destination IP address dst.
bool AddAtStart(uint32_t start)
void SetSendBufferTimeout(Time t)
Set the entry lifetime in the queue.
The route request table entries.
virtual void DoRun(void)
Implementation to actually run this TestCase.
This test suite implements a Unit Test.
void SetMaxQueueLen(uint32_t len)
Set the maximum queue length.
Time GetSendBufferTimeout() const
Return the entry lifetime in the queue.
bool Enqueue(SendBuffEntry &entry)
Push entry in queue, if there is no entry with the same packet and destination address in queue...
void SetDestination(Ipv4Address d)