DSR error buffer. More...
#include <dsr-errorbuff.h>
Public Member Functions | |
ErrorBuffer () | |
bool | Dequeue (Ipv4Address dst, ErrorBuffEntry &entry) |
void | DropPacketForErrLink (Ipv4Address source, Ipv4Address nextHop) |
bool | Enqueue (ErrorBuffEntry &entry) |
bool | Find (Ipv4Address dst) |
std::vector< ErrorBuffEntry > & | GetBuffer () |
uint32_t | GetSize () |
uint32_t | GetMaxQueueLen () const |
void | SetMaxQueueLen (uint32_t len) |
Time | GetErrorBufferTimeout () const |
void | SetErrorBufferTimeout (Time t) |
Private Member Functions | |
void | Drop (ErrorBuffEntry en, std::string reason) |
void | DropLink (ErrorBuffEntry en, std::string reason) |
void | Purge () |
Static Private Member Functions | |
static bool | LinkEqual (ErrorBuffEntry en, const std::vector< Ipv4Address > link) |
Private Attributes | |
std::vector< ErrorBuffEntry > | m_errorBuffer |
Time | m_errorBufferTimeout |
uint32_t | m_maxLen |
DSR error buffer.
Definition at line 138 of file dsr-errorbuff.h.
|
inline |
Definition at line 142 of file dsr-errorbuff.h.
bool ns3::dsr::ErrorBuffer::Dequeue | ( | Ipv4Address | dst, |
ErrorBuffEntry & | entry | ||
) |
Definition at line 108 of file dsr-errorbuff.cc.
References ns3::dsr::ErrorBuffEntry::GetPacket(), ns3::Packet::GetSize(), m_errorBuffer, NS_LOG_DEBUG, and Purge().
Referenced by ns3::dsr::DsrRouting::SendPacketFromBuffer().
|
private |
Definition at line 177 of file dsr-errorbuff.cc.
References ns3::dsr::ErrorBuffEntry::GetDestination(), ns3::dsr::ErrorBuffEntry::GetPacket(), ns3::Packet::GetUid(), and NS_LOG_LOGIC.
Referenced by Enqueue(), and Purge().
|
private |
Definition at line 186 of file dsr-errorbuff.cc.
References ns3::dsr::ErrorBuffEntry::GetNextHop(), ns3::dsr::ErrorBuffEntry::GetPacket(), ns3::dsr::ErrorBuffEntry::GetSource(), ns3::Packet::GetUid(), and NS_LOG_LOGIC.
Referenced by DropPacketForErrLink().
void ns3::dsr::ErrorBuffer::DropPacketForErrLink | ( | Ipv4Address | source, |
Ipv4Address | nextHop | ||
) |
Definition at line 84 of file dsr-errorbuff.cc.
References DropLink(), LinkEqual(), list, m_errorBuffer, NS_LOG_FUNCTION, and Purge().
Referenced by ns3::dsr::DsrRouting::AddRoute(), and ns3::dsr::DsrRouting::AddRoute_Link().
bool ns3::dsr::ErrorBuffer::Enqueue | ( | ErrorBuffEntry & | entry | ) |
Definition at line 52 of file dsr-errorbuff.cc.
References Drop(), ns3::dsr::ErrorBuffEntry::GetDestination(), ns3::dsr::ErrorBuffEntry::GetNextHop(), ns3::dsr::ErrorBuffEntry::GetPacket(), ns3::dsr::ErrorBuffEntry::GetSource(), ns3::Packet::GetUid(), m_errorBuffer, m_errorBufferTimeout, m_maxLen, NS_LOG_INFO, Purge(), and ns3::dsr::ErrorBuffEntry::SetExpireTime().
Referenced by ns3::dsr::DsrRouting::SendUnreachError().
bool ns3::dsr::ErrorBuffer::Find | ( | Ipv4Address | dst | ) |
Definition at line 128 of file dsr-errorbuff.cc.
References m_errorBuffer, and NS_LOG_DEBUG.
Referenced by ns3::dsr::DsrRouting::SendPacketFromBuffer().
|
inline |
Definition at line 175 of file dsr-errorbuff.h.
References m_errorBuffer.
|
inline |
Definition at line 165 of file dsr-errorbuff.h.
References m_errorBufferTimeout.
|
inline |
Definition at line 157 of file dsr-errorbuff.h.
References m_maxLen.
uint32_t ns3::dsr::ErrorBuffer::GetSize | ( | ) |
Definition at line 45 of file dsr-errorbuff.cc.
References m_errorBuffer, and Purge().
Referenced by ns3::dsr::DsrRouting::SendPacketFromBuffer().
|
inlinestaticprivate |
Definition at line 194 of file dsr-errorbuff.h.
References ns3::dsr::ErrorBuffEntry::GetNextHop(), and ns3::dsr::ErrorBuffEntry::GetSource().
Referenced by DropPacketForErrLink().
|
private |
Definition at line 156 of file dsr-errorbuff.cc.
References Drop(), m_errorBuffer, and NS_LOG_DEBUG.
Referenced by Dequeue(), DropPacketForErrLink(), Enqueue(), and GetSize().
|
inline |
Definition at line 169 of file dsr-errorbuff.h.
References m_errorBufferTimeout.
Referenced by ns3::dsr::DsrRouting::Start().
|
inline |
Definition at line 161 of file dsr-errorbuff.h.
References m_maxLen.
Referenced by ns3::dsr::DsrRouting::Start().
|
private |
Definition at line 182 of file dsr-errorbuff.h.
Referenced by Dequeue(), DropPacketForErrLink(), Enqueue(), Find(), GetBuffer(), GetSize(), and Purge().
|
private |
Definition at line 192 of file dsr-errorbuff.h.
Referenced by Enqueue(), GetErrorBufferTimeout(), and SetErrorBufferTimeout().
|
private |
Definition at line 190 of file dsr-errorbuff.h.
Referenced by Enqueue(), GetMaxQueueLen(), and SetMaxQueueLen().