AODV route request queue. More...
#include "aodv-rqueue.h"
 Collaboration diagram for ns3::aodv::RequestQueue:
 Collaboration diagram for ns3::aodv::RequestQueue:| Public Member Functions | |
| RequestQueue (uint32_t maxLen, Time routeToQueueTimeout) | |
| constructor | |
| bool | Dequeue (Ipv4Address dst, QueueEntry &entry) | 
| Return first found (the earliest) entry for given destination. | |
| 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. | |
| bool | Find (Ipv4Address dst) | 
| Finds whether a packet with destination dst exists in the queue. | |
| uint32_t | GetMaxQueueLen () const | 
| Get maximum queue length. | |
| Time | GetQueueTimeout () const | 
| Get queue timeout. | |
| uint32_t | GetSize () | 
| void | SetMaxQueueLen (uint32_t len) | 
| Set maximum queue length. | |
| void | SetQueueTimeout (Time t) | 
| Set queue timeout. | |
| Private Member Functions | |
| void | Drop (QueueEntry en, std::string reason) | 
| Notify that packet is dropped from queue by timeout. | |
| void | Purge () | 
| Remove all expired entries. | |
| Private Attributes | |
| uint32_t | m_maxLen | 
| The maximum number of packets that we allow a routing protocol to buffer. | |
| std::vector< QueueEntry > | m_queue | 
| The queue. | |
| Time | m_queueTimeout | 
| The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds. | |
AODV route request queue.
Since AODV is an on demand routing we queue requests while looking for route.
Definition at line 185 of file aodv-rqueue.h.
constructor
| maxLen | the maximum length | 
| routeToQueueTimeout | the route to queue timeout | 
Definition at line 194 of file aodv-rqueue.h.
References m_maxLen, and m_queueTimeout.
| bool ns3::aodv::RequestQueue::Dequeue | ( | Ipv4Address | dst, | 
| QueueEntry & | entry ) | 
Return first found (the earliest) entry for given destination.
| dst | the destination IP address | 
| entry | the queue entry | 
Definition at line 80 of file aodv-rqueue.cc.
References m_queue, and Purge().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | private | 
Notify that packet is dropped from queue by timeout.
| en | the queue entry to drop | 
| reason | the reason to drop the entry | 
Definition at line 140 of file aodv-rqueue.cc.
References ns3::Socket::ERROR_NOROUTETOHOST, ns3::Ipv4Header::GetDestination(), ns3::aodv::QueueEntry::GetErrorCallback(), ns3::aodv::QueueEntry::GetIpv4Header(), ns3::aodv::QueueEntry::GetPacket(), and NS_LOG_LOGIC.
Referenced by DropPacketWithDst(), Enqueue(), and Purge().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| void ns3::aodv::RequestQueue::DropPacketWithDst | ( | Ipv4Address | dst | ) | 
Remove all packets with destination IP address dst.
| dst | the destination IP address | 
Definition at line 62 of file aodv-rqueue.cc.
References Drop(), m_queue, NS_LOG_FUNCTION, and Purge().
 Here is the call graph for this function:
 Here is the call graph for this function:| bool ns3::aodv::RequestQueue::Enqueue | ( | QueueEntry & | entry | ) | 
Push entry in queue, if there is no entry with the same packet and destination address in queue.
| entry | the queue entry | 
Definition at line 40 of file aodv-rqueue.cc.
References Drop(), ns3::Ipv4Header::GetDestination(), ns3::aodv::QueueEntry::GetIpv4Header(), ns3::aodv::QueueEntry::GetPacket(), m_maxLen, m_queue, m_queueTimeout, Purge(), and ns3::aodv::QueueEntry::SetExpireTime().
 Here is the call graph for this function:
 Here is the call graph for this function:| bool ns3::aodv::RequestQueue::Find | ( | Ipv4Address | dst | ) | 
Finds whether a packet with destination dst exists in the queue.
| dst | the destination IP address | 
Definition at line 96 of file aodv-rqueue.cc.
References m_queue.
| 
 | inline | 
Get maximum queue length.
Definition at line 237 of file aodv-rqueue.h.
References m_maxLen.
| 
 | inline | 
Get queue timeout.
Definition at line 255 of file aodv-rqueue.h.
References m_queueTimeout.
| uint32_t ns3::aodv::RequestQueue::GetSize | ( | ) | 
Definition at line 33 of file aodv-rqueue.cc.
References m_queue, and Purge().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | private | 
Remove all expired entries.
Definition at line 126 of file aodv-rqueue.cc.
References Drop(), and m_queue.
Referenced by Dequeue(), DropPacketWithDst(), Enqueue(), and GetSize().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inline | 
Set maximum queue length.
| len | The maximum queue length | 
Definition at line 246 of file aodv-rqueue.h.
References m_maxLen.
| 
 | inline | 
Set queue timeout.
| t | The queue timeout | 
Definition at line 264 of file aodv-rqueue.h.
References m_queueTimeout.
| 
 | private | 
The maximum number of packets that we allow a routing protocol to buffer.
Definition at line 281 of file aodv-rqueue.h.
Referenced by RequestQueue(), Enqueue(), GetMaxQueueLen(), and SetMaxQueueLen().
| 
 | private | 
The queue.
Definition at line 271 of file aodv-rqueue.h.
Referenced by Dequeue(), DropPacketWithDst(), Enqueue(), Find(), GetSize(), and Purge().
| 
 | private | 
The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds.
Definition at line 284 of file aodv-rqueue.h.
Referenced by RequestQueue(), Enqueue(), GetQueueTimeout(), and SetQueueTimeout().