A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::dsr::SendBuffer Class Reference

DSR send buffer. More...

#include <dsr-rsendbuff.h>

+ Collaboration diagram for ns3::dsr::SendBuffer:

Public Member Functions

 SendBuffer ()
 
bool Dequeue (Ipv4Address dst, SendBuffEntry &entry)
 
void DropPacketWithDst (Ipv4Address dst)
 
bool Enqueue (SendBuffEntry &entry)
 
bool Find (Ipv4Address dst)
 
std::vector< SendBuffEntry > & GetBuffer ()
 
uint32_t GetSize ()
 
uint32_t GetMaxQueueLen () const
 
void SetMaxQueueLen (uint32_t len)
 
Time GetSendBufferTimeout () const
 
void SetSendBufferTimeout (Time t)
 

Private Member Functions

void Drop (SendBuffEntry en, std::string reason)
 Notify that packet is dropped from queue by timeout. More...
 
void Purge ()
 Remove all expired entries. More...
 

Static Private Member Functions

static bool IsEqual (SendBuffEntry en, const Ipv4Address dst)
 

Private Attributes

uint32_t m_maxLen
 The maximum number of packets that we allow a routing protocol to buffer. More...
 
std::vector< SendBuffEntrym_sendBuffer
 The send buffer to cache unsent packet. More...
 
Time m_sendBufferTimeout
 The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds. More...
 

Detailed Description

DSR send buffer.

Definition at line 116 of file dsr-rsendbuff.h.

Constructor & Destructor Documentation

ns3::dsr::SendBuffer::SendBuffer ( )
inline

Definition at line 120 of file dsr-rsendbuff.h.

Member Function Documentation

bool ns3::dsr::SendBuffer::Dequeue ( Ipv4Address  dst,
SendBuffEntry entry 
)

Definition at line 103 of file dsr-rsendbuff.cc.

References ns3::dsr::SendBuffEntry::GetPacket(), ns3::Packet::GetSize(), m_sendBuffer, NS_LOG_DEBUG, and Purge().

Referenced by ns3::dsr::DsrSendBuffTest::DoRun(), and ns3::dsr::DsrRouting::SendPacketFromBuffer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::dsr::SendBuffer::Drop ( SendBuffEntry  en,
std::string  reason 
)
private

Notify that packet is dropped from queue by timeout.

Definition at line 172 of file dsr-rsendbuff.cc.

References ns3::dsr::SendBuffEntry::GetDestination(), ns3::dsr::SendBuffEntry::GetPacket(), ns3::Packet::GetUid(), and NS_LOG_LOGIC.

Referenced by DropPacketWithDst(), Enqueue(), and Purge().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::dsr::SendBuffer::DropPacketWithDst ( Ipv4Address  dst)

Definition at line 83 of file dsr-rsendbuff.cc.

References Drop(), IsEqual(), m_sendBuffer, NS_LOG_FUNCTION, and Purge().

Referenced by ns3::dsr::DsrSendBuffTest::DoRun(), and ns3::dsr::DsrRouting::RouteRequestTimerExpire().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector<SendBuffEntry>& ns3::dsr::SendBuffer::GetBuffer ( )
inline

Definition at line 153 of file dsr-rsendbuff.h.

References m_sendBuffer.

Referenced by ns3::dsr::DsrRouting::CheckSendBuffer().

+ Here is the caller graph for this function:

uint32_t ns3::dsr::SendBuffer::GetMaxQueueLen ( ) const
inline

Definition at line 135 of file dsr-rsendbuff.h.

References m_maxLen.

Referenced by ns3::dsr::DsrSendBuffTest::CheckSizeLimit(), and ns3::dsr::DsrSendBuffTest::DoRun().

+ Here is the caller graph for this function:

Time ns3::dsr::SendBuffer::GetSendBufferTimeout ( ) const
inline

Definition at line 143 of file dsr-rsendbuff.h.

References m_sendBufferTimeout.

Referenced by ns3::dsr::DsrSendBuffTest::DoRun().

+ Here is the caller graph for this function:

static bool ns3::dsr::SendBuffer::IsEqual ( SendBuffEntry  en,
const Ipv4Address  dst 
)
inlinestaticprivate
Parameters
dstCheck if the send buffer entry is the same or not

Definition at line 165 of file dsr-rsendbuff.h.

References ns3::dsr::SendBuffEntry::GetDestination().

Referenced by DropPacketWithDst().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::dsr::SendBuffer::Purge ( )
private

Remove all expired entries.

Definition at line 151 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 caller graph for this function:

void ns3::dsr::SendBuffer::SetMaxQueueLen ( uint32_t  len)
inline

Definition at line 139 of file dsr-rsendbuff.h.

References m_maxLen.

Referenced by ns3::dsr::DsrSendBuffTest::DoRun(), and ns3::dsr::DsrRouting::Start().

+ Here is the caller graph for this function:

void ns3::dsr::SendBuffer::SetSendBufferTimeout ( Time  t)
inline

Definition at line 147 of file dsr-rsendbuff.h.

References m_sendBufferTimeout.

Referenced by ns3::dsr::DsrSendBuffTest::DoRun(), and ns3::dsr::DsrRouting::Start().

+ Here is the caller graph for this function:

Member Data Documentation

uint32_t ns3::dsr::SendBuffer::m_maxLen
private

The maximum number of packets that we allow a routing protocol to buffer.

Definition at line 163 of file dsr-rsendbuff.h.

Referenced by Enqueue(), GetMaxQueueLen(), and SetMaxQueueLen().

std::vector<SendBuffEntry> ns3::dsr::SendBuffer::m_sendBuffer
private

The send buffer to cache unsent packet.

Definition at line 160 of file dsr-rsendbuff.h.

Referenced by Dequeue(), DropPacketWithDst(), Enqueue(), Find(), GetBuffer(), GetSize(), and Purge().

Time ns3::dsr::SendBuffer::m_sendBufferTimeout
private

The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds.

Definition at line 164 of file dsr-rsendbuff.h.

Referenced by Enqueue(), GetSendBufferTimeout(), and SetSendBufferTimeout().


The documentation for this class was generated from the following files: