35 #include "ns3/ipv4-route.h" 
   36 #include "ns3/socket.h" 
   49   static TypeId tid = 
TypeId (
"ns3::dsr::DsrPassiveBuffer")
 
   76   for (std::vector<DsrPassiveBuffEntry>::const_iterator i = 
m_passiveBuffer.begin (); i
 
  109   for (std::vector<DsrPassiveBuffEntry>::iterator i = 
m_passiveBuffer.begin (); i
 
  119           && (i->GetSegsLeft () == entry.
GetSegsLeft () + 1))
 
  137       if (i->GetDestination () == dst)
 
  154   for (std::vector<DsrPassiveBuffEntry>::const_iterator i = 
m_passiveBuffer.begin (); i
 
  157       if (i->GetDestination () == dst)
 
  190   for (std::vector<DsrPassiveBuffEntry>::iterator i = 
m_passiveBuffer.begin (); i
 
  196           Drop (*i, 
"Drop out-dated packet ");
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
 
void DropLink(DsrPassiveBuffEntry en, std::string reason)
Notify that packet is dropped from queue by timeout. 
 
uint64_t GetUid(void) const 
Returns the packet's Uid. 
 
uint32_t GetSize()
Number of entries. 
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
bool operator()(DsrErrorBuffEntry const &e) const 
comparison operator 
 
uint32_t GetSize(void) const 
Returns the the size in bytes of the packet (including the zero-filled initial payload). 
 
uint8_t GetSegsLeft() const 
Get segments left function. 
 
uint32_t m_maxLen
The maximum number of packets that we allow a routing protocol to buffer. 
 
uint16_t GetFragmentOffset() const 
Get fragment offset function. 
 
void SetExpireTime(Time exp)
Set expire time. 
 
Ipv4Address GetSource() const 
Get source address function. 
 
std::vector< DsrPassiveBuffEntry > m_passiveBuffer
The send buffer to cache unsent packet. 
 
void Purge()
Remove all expired entries. 
 
DSR Passive Buffer Entry. 
 
bool Dequeue(Ipv4Address dst, DsrPassiveBuffEntry &entry)
Return first found (the earliest) entry for given destination. 
 
bool AllEqual(DsrPassiveBuffEntry &entry)
Check if all the entries in passive buffer entry is all equal or not. 
 
Ipv4Address GetDestination() const 
Get destination address function. 
 
bool Enqueue(DsrPassiveBuffEntry &entry)
Push entry in queue, if there is no entry with the same packet and destination address in queue...
 
Time m_passiveBufferTimeout
The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
 
uint16_t GetIdentification() const 
Get identification function. 
 
Ipv4 addresses are stored in host order in this class. 
 
virtual ~DsrPassiveBuffer()
 
Ipv4Address GetNextHop() const 
Get next hop address function. 
 
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG. 
 
Time Seconds(double value)
Construct a Time in the indicated unit. 
 
void Drop(DsrPassiveBuffEntry en, std::string reason)
Notify that packet is dropped from queue by timeout. 
 
A base class which provides memory management and object aggregation. 
 
Time GetExpireTime() const 
Get expire time. 
 
bool Find(Ipv4Address dst)
Finds whether a packet with destination dst exists in the queue. 
 
a unique identifier for an interface. 
 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
 
static TypeId GetTypeId()
Get the type ID. 
 
Ptr< const Packet > GetPacket() const 
Get packet function.