DSR send buffer. More...
#include "dsr-rsendbuff.h"
 Collaboration diagram for ns3::dsr::DsrSendBuffer:
 Collaboration diagram for ns3::dsr::DsrSendBuffer:| Public Member Functions | |
| DsrSendBuffer () | |
| Default constructor. | |
| bool | Dequeue (Ipv4Address dst, DsrSendBuffEntry &entry) | 
| Return first found (the earliest) entry for the given destination. | |
| void | DropPacketWithDst (Ipv4Address dst) | 
| Remove all packets with destination IP address dst. | |
| bool | Enqueue (DsrSendBuffEntry &entry) | 
| Push entry in queue, if there is no entry with the same packet and destination address in queue. | |
| bool | Find (Ipv4Address dst) | 
| Check if a packet with destination dst exists in the queue. | |
| std::vector< DsrSendBuffEntry > & | GetBuffer () | 
| Return a pointer to the internal queue. | |
| uint32_t | GetMaxQueueLen () const | 
| Return the maximum queue length. | |
| Time | GetSendBufferTimeout () const | 
| Return the entry lifetime in the queue. | |
| uint32_t | GetSize () | 
| Number of entries. | |
| void | SetMaxQueueLen (uint32_t len) | 
| Set the maximum queue length. | |
| void | SetSendBufferTimeout (Time t) | 
| Set the entry lifetime in the queue. | |
| Private Member Functions | |
| void | Drop (DsrSendBuffEntry 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< DsrSendBuffEntry > | m_sendBuffer | 
| The send buffer to cache unsent packet. | |
| Time | m_sendBufferTimeout | 
| The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds. | |
DSR send buffer.
Definition at line 157 of file dsr-rsendbuff.h.
| 
 | inline | 
Default constructor.
Definition at line 163 of file dsr-rsendbuff.h.
| bool ns3::dsr::DsrSendBuffer::Dequeue | ( | Ipv4Address | dst, | 
| DsrSendBuffEntry & | entry ) | 
Return first found (the earliest) entry for the given destination.
| dst | IPv4 address of the destination | 
| entry | pointer to entry to return | 
Definition at line 99 of file dsr-rsendbuff.cc.
References ns3::dsr::DsrSendBuffEntry::GetPacket(), m_sendBuffer, NS_LOG_DEBUG, 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 | BuffEntry Buffer entry | 
| reason | Drop reason | 
Definition at line 170 of file dsr-rsendbuff.cc.
References ns3::dsr::DsrSendBuffEntry::GetDestination(), ns3::dsr::DsrSendBuffEntry::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::dsr::DsrSendBuffer::DropPacketWithDst | ( | Ipv4Address | dst | ) | 
Remove all packets with destination IP address dst.
| dst | IPv4 address of the destination | 
Definition at line 77 of file dsr-rsendbuff.cc.
References Drop(), m_sendBuffer, NS_LOG_FUNCTION, and Purge().
 Here is the call graph for this function:
 Here is the call graph for this function:| bool ns3::dsr::DsrSendBuffer::Enqueue | ( | DsrSendBuffEntry & | entry | ) | 
Push entry in queue, if there is no entry with the same packet and destination address in queue.
| entry | DsrSendBuffEntry to put in the queue | 
Definition at line 45 of file dsr-rsendbuff.cc.
References Drop(), ns3::dsr::DsrSendBuffEntry::GetDestination(), ns3::dsr::DsrSendBuffEntry::GetPacket(), m_maxLen, m_sendBuffer, m_sendBufferTimeout, Purge(), and ns3::dsr::DsrSendBuffEntry::SetExpireTime().
 Here is the call graph for this function:
 Here is the call graph for this function:| bool ns3::dsr::DsrSendBuffer::Find | ( | Ipv4Address | dst | ) | 
Check if a packet with destination dst exists in the queue.
| dst | IPv4 address of the destination | 
Definition at line 119 of file dsr-rsendbuff.cc.
References m_sendBuffer, and NS_LOG_DEBUG.
| 
 | inline | 
Return a pointer to the internal queue.
Definition at line 253 of file dsr-rsendbuff.h.
References m_sendBuffer.
| 
 | inline | 
Return the maximum queue length.
Definition at line 211 of file dsr-rsendbuff.h.
References m_maxLen.
| 
 | inline | 
Return the entry lifetime in the queue.
Definition at line 231 of file dsr-rsendbuff.h.
References m_sendBufferTimeout.
| uint32_t ns3::dsr::DsrSendBuffer::GetSize | ( | ) | 
Number of entries.
Definition at line 38 of file dsr-rsendbuff.cc.
References m_sendBuffer, 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 150 of file dsr-rsendbuff.cc.
References Drop(), m_sendBuffer, NS_LOG_DEBUG, and NS_LOG_INFO.
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 the maximum queue length.
| len | the maximum queue length | 
Definition at line 221 of file dsr-rsendbuff.h.
References m_maxLen.
| 
 | inline | 
Set the entry lifetime in the queue.
| t | the entry lifetime in the queue | 
Definition at line 241 of file dsr-rsendbuff.h.
References m_sendBufferTimeout.
| 
 | private | 
The maximum number of packets that we allow a routing protocol to buffer.
Definition at line 268 of file dsr-rsendbuff.h.
Referenced by Enqueue(), GetMaxQueueLen(), and SetMaxQueueLen().
| 
 | private | 
The send buffer to cache unsent packet.
Definition at line 259 of file dsr-rsendbuff.h.
Referenced by Dequeue(), DropPacketWithDst(), Enqueue(), Find(), GetBuffer(), GetSize(), and Purge().
| 
 | private | 
The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds.
Definition at line 269 of file dsr-rsendbuff.h.
Referenced by Enqueue(), GetSendBufferTimeout(), and SetSendBufferTimeout().