|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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"
126 std::vector<Ipv4Address> nodeList;
178 std::vector<Ipv4Address> nodeList;
224 std::vector<Ipv4Address> nodeList;
408 std::vector<Ipv4Address> ip;
427 std::vector<Ipv4Address> ip2;
516 Simulator::Destroy ();
void SetDestination(Ipv4Address d)
Set destination address.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Ipv4Address GetDestination() const
Get destination address.
void AddDsrOption(DsrOptionHeader const &option)
Serialize the option, prepending pad1 or padn option as necessary.
bool AddRoute(DsrRouteCacheEntry &rt)
Add route cache entry if it doesn't yet exist in route cache.
void AddHeader(const Header &header)
Add header to this packet.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
DsrRouteCacheEntry class for entries in the route cache.
bool DeleteRoute(Ipv4Address dst)
Delete the route with certain destination address.
bool Enqueue(DsrSendBuffEntry &entry)
Push entry in queue, if there is no entry with the same packet and destination address in queue.
void SetVector(IP_VECTOR v)
Sets the IP vector.
Ipv4 addresses are stored in host order in this class.
IP_VECTOR GetVector() const
Get the IP vector.
Unit test for Send Buffer.
void AddAtStart(uint32_t start)
bool Find(Ipv4Address dst)
Check if a packet with destination dst exists in the queue.
void CheckTimeout()
Check timeout function.
virtual void DoRun(void)
Implementation to actually run this TestCase.
void RemoveAtStart(uint32_t size)
Remove size bytes from the start of the current packet.
uint32_t m_reqNo
Route request number.
void SetExpireTime(Time exp)
Set expire time.
Time GetExpireTime() const
Get expire time.
Unit test for DSR route cache entry.
uint32_t GetMaxQueueLen() const
Return the maximum queue length.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
dsr::DsrSendBuffer q
send buffer
automatically resized byte buffer
The route request table entries.
uint8_t const * PeekData(void) const
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Buffer::Iterator Begin(void) const
bool Dequeue(Ipv4Address dst, DsrSendBuffEntry &entry)
Return first found (the earliest) entry for the given destination.
uint32_t GetSize()
Number of entries.
virtual void DoRun(void)
Implementation to actually run this TestCase.
void SetSendBufferTimeout(Time t)
Set the entry lifetime in the queue.
Unit test for DSR routing table entry.
@ UNIT
This test suite implements a Unit Test.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Time Seconds(double value)
Construct a Time in the indicated unit.
void CheckSizeLimit()
Check size limit function.
Time GetSendBufferTimeout() const
Return the entry lifetime in the queue.
void DropPacketWithDst(Ipv4Address dst)
Remove all packets with destination IP address dst.
void SetMaxQueueLen(uint32_t len)
Set the maximum queue length.
bool LookupRoute(Ipv4Address id, DsrRouteCacheEntry &rt)
Lookup route cache entry with destination address dst.
DsrTestSuite g_dsrTestSuite