8#include "ns3/aodv-neighbor.h"
9#include "ns3/aodv-packet.h"
10#include "ns3/aodv-rqueue.h"
11#include "ns3/aodv-rtable.h"
12#include "ns3/ipv4-route.h"
33 void DoRun()
override;
68 "Neighbor doesn't exist");
71 "Neighbor doesn't exist");
74 "Neighbor doesn't exist");
83 "Neighbor doesn't exist");
86 "Neighbor doesn't exist");
89 "Neighbor doesn't exist");
92 "Neighbor doesn't exist");
105 "Neighbor doesn't exist");
110 "Known expire time");
113 "Known expire time");
183 h.SetGratuitousRrep(
true);
185 h.SetDestinationOnly(
true);
187 h.SetUnknownSeqno(
true);
199 h.SetOriginSeqno(23);
245 h.SetAckRequired(
true);
247 h.SetAckRequired(
false);
389 entry.GetIpv4Header().GetDestination(),
424 void DoRun()
override;
584 rt.SetValidSeqNo(
false);
596 rt.SetUnidirectional(
true);
602 rt.IncrementRreqCnt();
620 std::vector<Ipv4Address>
prec;
627 rt.DeleteAllPrecursors();
Ipv4 addresses are stored in host order in this class.
a class to store IPv4 address information on an interface
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
SocketErrno
Enumeration of the possible errors returned by a socket.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static constexpr auto UNIT
maintain list of active neighbors
Time GetExpireTime(Ipv4Address addr)
Return expire time for neighbor node with address addr, if exists, else return 0.
void Update(Ipv4Address addr, Time expire)
Update expire time for entry with address addr, if it exists, else add new entry.
void SetCallback(Callback< void, Ipv4Address > cb)
Set link failure callback.
bool IsNeighbor(Ipv4Address addr)
Check that node with address addr is neighbor.
AODV route request queue.
bool Dequeue(Ipv4Address dst, QueueEntry &entry)
Return first found (the earliest) entry for given destination.
void SetMaxQueueLen(uint32_t len)
Set maximum queue length.
bool Find(Ipv4Address dst)
Finds whether a packet with destination dst exists in the queue.
Time GetQueueTimeout() const
Get queue timeout.
void SetQueueTimeout(Time t)
Set queue timeout.
void DropPacketWithDst(Ipv4Address dst)
Remove all packets with destination IP address dst.
bool Enqueue(QueueEntry &entry)
Push entry in queue, if there is no entry with the same packet and destination address in queue.
uint32_t GetMaxQueueLen() const
Get maximum queue length.
The Routing table used by AODV protocol.
ns3::aodv::AodvTestSuite g_aodvTestSuite
the test suite
@ AODVTYPE_RREP
AODVTYPE_RREP.
@ AODVTYPE_RREQ
AODVTYPE_RREQ.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Unit test for RequestQueue.
void Unicast(Ptr< Ipv4Route > route, Ptr< const Packet > packet, const Ipv4Header &header)
Unicast test function.
RequestQueue q
Request queue.
void CheckTimeout()
Check timeout function.
void DoRun() override
Implementation to actually run this TestCase.
void Error(Ptr< const Packet > p, const Ipv4Header &h, Socket::SocketErrno e)
Error test function.
void CheckSizeLimit()
Check size limit function.
Unit test for AODV routing table entry.
void DoRun() override
Implementation to actually run this TestCase.
Unit test for AODV routing table.
void DoRun() override
Implementation to actually run this TestCase.
void CheckTimeout2()
Check timeout function 2.
Neighbors * neighbor
The Neighbors.
void DoRun() override
Implementation to actually run this TestCase.
void Handler(Ipv4Address addr)
Handler test function.
void CheckTimeout1()
Check timeout function 1.
void CheckTimeout3()
Check timeout function 3.
Unit test for AODV routing table entry.
void Error(Ptr< const Packet > p, const Ipv4Header &h, Socket::SocketErrno e)
Error test function.
void Unicast2(Ptr< Ipv4Route > route, Ptr< const Packet > packet, const Ipv4Header &header)
Unicast 2 testfunction.
void DoRun() override
Implementation to actually run this TestCase.
void Unicast(Ptr< Ipv4Route > route, Ptr< const Packet > packet, const Ipv4Header &header)
Unicast test function.
void Error2(Ptr< const Packet > p, const Ipv4Header &h, Socket::SocketErrno e)
Error2 test function.