DSR maintain buffer. More...
#include <dsr-maintain-buff.h>
Public Member Functions | |
MaintainBuffer () | |
bool | Dequeue (Ipv4Address dst, MaintainBuffEntry &entry) |
void | DropPacketWithNextHop (Ipv4Address nextHop) |
bool | Enqueue (MaintainBuffEntry &entry) |
bool | Find (Ipv4Address nextHop) |
uint32_t | GetSize () |
uint32_t | GetMaxQueueLen () const |
void | SetMaxQueueLen (uint32_t len) |
Time | GetMaintainBufferTimeout () const |
void | SetMaintainBufferTimeout (Time t) |
bool | AllEqual (MaintainBuffEntry &entry) |
bool | LinkEqual (MaintainBuffEntry &entry) |
bool | NetworkEqual (MaintainBuffEntry &entry) |
bool | PromiscEqual (MaintainBuffEntry &entry) |
Private Member Functions | |
void | Purge () |
Static Private Member Functions | |
static bool | IsEqual (MaintainBuffEntry en, const Ipv4Address nextHop) |
Private Attributes | |
std::vector< NetworkKey > | m_allNetworkKey |
std::vector< MaintainBuffEntry > | m_maintainBuffer |
Time | m_maintainBufferTimeout |
uint32_t | m_maxLen |
DSR maintain buffer.
Definition at line 219 of file dsr-maintain-buff.h.
|
inline |
Definition at line 223 of file dsr-maintain-buff.h.
bool ns3::dsr::MaintainBuffer::AllEqual | ( | MaintainBuffEntry & | entry | ) |
Definition at line 124 of file dsr-maintain-buff.cc.
References ns3::dsr::MaintainBuffEntry::GetAckId(), ns3::dsr::MaintainBuffEntry::GetDst(), ns3::dsr::MaintainBuffEntry::GetNextHop(), ns3::dsr::MaintainBuffEntry::GetOurAdd(), ns3::dsr::MaintainBuffEntry::GetSegsLeft(), ns3::dsr::MaintainBuffEntry::GetSrc(), and m_maintainBuffer.
Referenced by ns3::dsr::DsrRouting::ScheduleNetworkPacketRetry().
bool ns3::dsr::MaintainBuffer::Dequeue | ( | Ipv4Address | dst, |
MaintainBuffEntry & | entry | ||
) |
Definition at line 92 of file dsr-maintain-buff.cc.
References ns3::dsr::MaintainBuffEntry::GetPacket(), ns3::Packet::GetSize(), m_maintainBuffer, NS_LOG_DEBUG, and Purge().
Referenced by ns3::dsr::DsrRouting::CancelPacketTimerNextHop(), and ns3::dsr::DsrRouting::SendRerrWhenBreaksLinkToNextHop().
void ns3::dsr::MaintainBuffer::DropPacketWithNextHop | ( | Ipv4Address | nextHop | ) |
Definition at line 82 of file dsr-maintain-buff.cc.
References IsEqual(), m_maintainBuffer, NS_LOG_FUNCTION, NS_LOG_INFO, and Purge().
bool ns3::dsr::MaintainBuffer::Enqueue | ( | MaintainBuffEntry & | entry | ) |
Definition at line 52 of file dsr-maintain-buff.cc.
References ns3::dsr::MaintainBuffEntry::GetAckId(), ns3::dsr::MaintainBuffEntry::GetDst(), ns3::dsr::MaintainBuffEntry::GetNextHop(), ns3::dsr::MaintainBuffEntry::GetOurAdd(), ns3::dsr::MaintainBuffEntry::GetSegsLeft(), ns3::dsr::MaintainBuffEntry::GetSrc(), m_maintainBuffer, m_maintainBufferTimeout, m_maxLen, NS_LOG_DEBUG, Purge(), and ns3::dsr::MaintainBuffEntry::SetExpireTime().
Referenced by ns3::dsr::DsrRouting::CheckSendBuffer(), ns3::dsr::DsrRouting::ForwardPacket(), ns3::dsr::DsrRouting::PacketNewRoute(), ns3::dsr::DsrRouting::ScheduleNetworkPacketRetry(), ns3::dsr::DsrRouting::Send(), and ns3::dsr::DsrRouting::SendPacketFromBuffer().
bool ns3::dsr::MaintainBuffer::Find | ( | Ipv4Address | nextHop | ) |
Definition at line 109 of file dsr-maintain-buff.cc.
References m_maintainBuffer, and NS_LOG_DEBUG.
Referenced by ns3::dsr::DsrRouting::CancelPacketTimerNextHop(), and ns3::dsr::DsrRouting::SendRerrWhenBreaksLinkToNextHop().
|
inline |
Definition at line 246 of file dsr-maintain-buff.h.
References m_maintainBufferTimeout.
|
inline |
Definition at line 238 of file dsr-maintain-buff.h.
References m_maxLen.
uint32_t ns3::dsr::MaintainBuffer::GetSize | ( | ) |
Definition at line 45 of file dsr-maintain-buff.cc.
References m_maintainBuffer, and Purge().
Referenced by ns3::dsr::DsrRouting::CancelLinkPacketTimer(), ns3::dsr::DsrRouting::CancelPacketTimerNextHop(), and ns3::dsr::DsrRouting::SendRerrWhenBreaksLinkToNextHop().
|
inlinestaticprivate |
Definition at line 275 of file dsr-maintain-buff.h.
References ns3::dsr::MaintainBuffEntry::GetNextHop().
Referenced by DropPacketWithNextHop().
bool ns3::dsr::MaintainBuffer::LinkEqual | ( | MaintainBuffEntry & | entry | ) |
Definition at line 189 of file dsr-maintain-buff.cc.
References ns3::dsr::MaintainBuffEntry::GetDst(), ns3::dsr::MaintainBuffEntry::GetNextHop(), ns3::dsr::MaintainBuffEntry::GetOurAdd(), ns3::dsr::MaintainBuffEntry::GetSrc(), m_maintainBuffer, and NS_LOG_DEBUG.
Referenced by ns3::dsr::DsrRouting::CancelLinkPacketTimer().
bool ns3::dsr::MaintainBuffer::NetworkEqual | ( | MaintainBuffEntry & | entry | ) |
Definition at line 145 of file dsr-maintain-buff.cc.
References ns3::dsr::MaintainBuffEntry::GetAckId(), ns3::dsr::MaintainBuffEntry::GetDst(), ns3::dsr::MaintainBuffEntry::GetNextHop(), ns3::dsr::MaintainBuffEntry::GetOurAdd(), ns3::dsr::MaintainBuffEntry::GetSrc(), and m_maintainBuffer.
Referenced by ns3::dsr::DsrRouting::CancelNetworkPacketTimer().
bool ns3::dsr::MaintainBuffer::PromiscEqual | ( | MaintainBuffEntry & | entry | ) |
Definition at line 166 of file dsr-maintain-buff.cc.
References ns3::dsr::MaintainBuffEntry::GetAckId(), ns3::dsr::MaintainBuffEntry::GetDst(), ns3::dsr::MaintainBuffEntry::GetSegsLeft(), ns3::dsr::MaintainBuffEntry::GetSrc(), m_maintainBuffer, and NS_LOG_DEBUG.
Referenced by ns3::dsr::DsrRouting::CancelPassiveTimer().
|
private |
Definition at line 222 of file dsr-maintain-buff.cc.
References m_maintainBuffer, and NS_LOG_DEBUG.
Referenced by Dequeue(), DropPacketWithNextHop(), Enqueue(), and GetSize().
|
inline |
Definition at line 250 of file dsr-maintain-buff.h.
References m_maintainBufferTimeout.
Referenced by ns3::dsr::DsrRouting::Start().
|
inline |
Definition at line 242 of file dsr-maintain-buff.h.
References m_maxLen.
Referenced by ns3::dsr::DsrRouting::Start().
|
private |
Definition at line 267 of file dsr-maintain-buff.h.
|
private |
Definition at line 266 of file dsr-maintain-buff.h.
Referenced by AllEqual(), Dequeue(), DropPacketWithNextHop(), Enqueue(), Find(), GetSize(), LinkEqual(), NetworkEqual(), PromiscEqual(), and Purge().
|
private |
Definition at line 273 of file dsr-maintain-buff.h.
Referenced by Enqueue(), GetMaintainBufferTimeout(), and SetMaintainBufferTimeout().
|
private |
Definition at line 271 of file dsr-maintain-buff.h.
Referenced by Enqueue(), GetMaxQueueLen(), and SetMaxQueueLen().