32 #ifndef DSDV_PACKETQUEUE_H 
   33 #define DSDV_PACKETQUEUE_H 
   36 #include "ns3/ipv4-routing-protocol.h" 
   37 #include "ns3/simulator.h" 
   52               UnicastForwardCallback ucb = UnicastForwardCallback (),
 
   53               ErrorCallback ecb = ErrorCallback ())
 
std::vector< QueueEntry > m_queue
 
Simulation virtual time values and global simulation resolution. 
 
void SetUnicastForwardCallback(UnicastForwardCallback ucb)
 
Ipv4Header GetIpv4Header() const 
 
QueueEntry(Ptr< const Packet > pa=0, Ipv4Header const &h=Ipv4Header(), UnicastForwardCallback ucb=UnicastForwardCallback(), ErrorCallback ecb=ErrorCallback())
c-tor 
 
void SetMaxPacketsPerDst(uint32_t len)
 
void SetIpv4Header(Ipv4Header h)
 
Ipv4Header m_header
IP header. 
 
uint32_t GetCountForPacketsWithDst(Ipv4Address dst)
Get count of packets with destination dst in the queue. 
 
Ipv4RoutingProtocol::UnicastForwardCallback UnicastForwardCallback
 
uint32_t GetMaxQueueLen() const 
 
Ptr< const Packet > m_packet
Data packet. 
 
static bool IsEqual(QueueEntry en, const Ipv4Address dst)
 
void SetMaxQueueLen(uint32_t len)
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
void DropPacketWithDst(Ipv4Address dst)
Remove all packets with destination IP address dst. 
 
bool Dequeue(Ipv4Address dst, QueueEntry &entry)
Return first found (the earliest) entry for given destination. 
 
PacketQueue()
Default c-tor. 
 
UnicastForwardCallback GetUnicastForwardCallback() const 
 
void SetQueueTimeout(Time t)
 
Ipv4RoutingProtocol::ErrorCallback ErrorCallback
 
static Time Now(void)
Return the current simulation virtual time. 
 
uint32_t GetMaxPacketsPerDst() const 
 
void Purge()
Remove all expired entries. 
 
void SetExpireTime(Time exp)
 
Time m_expire
Expire time for queue entry. 
 
Ipv4 addresses are stored in host order in this class. 
 
UnicastForwardCallback m_ucb
Unicast forward callback. 
 
ErrorCallback GetErrorCallback() const 
 
void SetPacket(Ptr< const Packet > p)
 
bool operator==(QueueEntry const &o) const 
Compare queue entries. 
 
Time Seconds(double value)
Construct a Time in the indicated unit. 
 
Ptr< const Packet > GetPacket() const 
 
void SetErrorCallback(ErrorCallback ecb)
 
Time GetQueueTimeout() const 
 
uint32_t GetSize()
Number of entries. 
 
uint32_t m_maxLen
The maximum number of packets that we allow a routing protocol to buffer. 
 
ErrorCallback m_ecb
Error callback. 
 
void Drop(QueueEntry en, std::string reason)
Notify that packet is dropped from queue by timeout. 
 
bool Find(Ipv4Address dst)
Finds whether a packet with destination dst exists in the queue. 
 
Time m_queueTimeout
The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds. 
 
Time GetExpireTime() const 
 
uint32_t m_maxLenPerDst
The maximum number of packets that we allow per destination to buffer. 
 
bool Enqueue(QueueEntry &entry)
Push entry in queue, if there is no entry with the same packet and destination address in queue...