32 #ifndef DSR_NETWORK_QUEUE_H
33 #define DSR_NETWORK_QUEUE_H
36 #include "ns3/ipv4-routing-protocol.h"
37 #include "ns3/simulator.h"
38 #include "ns3/ipv4-header.h"
Simulation virtual time values and global simulation resolution.
DsrNetworkQueueEntry(Ptr< const Packet > pa=0, Ipv4Address s=Ipv4Address(), Ipv4Address n=Ipv4Address(), Time exp=Simulator::Now(), Ptr< Ipv4Route > r=0)
Construct a DsrNetworkQueueEntry with the given parameters.
uint32_t GetSize()
Number of entries.
bool operator==(DsrNetworkQueueEntry const &o) const
Compare send buffer entries.
bool Enqueue(DsrNetworkQueueEntry &entry)
Push entry in queue, if there is no entry with the same packet and destination address in queue...
uint32_t m_maxSize
Maximum queue size.
Introspection did not find any typical Config paths.
void SetPacket(Ptr< const Packet > p)
bool Dequeue(DsrNetworkQueueEntry &entry)
Return first found (the earliest) entry for given destination.
Ptr< const Packet > GetPacket() const
Ptr< const Packet > m_packet
Data packet.
void SetIpv4Route(Ptr< Ipv4Route > route)
uint32_t GetMaxNetworkSize(void) const
Return the maximum queue size.
Ipv4Address GetNextHopAddress() const
void SetMaxNetworkDelay(Time delay)
Set the maximum entry lifetime in the queue.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Time GetMaxNetworkDelay(void) const
Return the maximum entry lifetime for this queue.
Ptr< Ipv4Route > m_ipv4Route
Ipv4Route.
static Time Now(void)
Return the current simulation virtual time.
std::vector< DsrNetworkQueueEntry > & GetQueue()
bool FindPacketWithNexthop(Ipv4Address nextHop, DsrNetworkQueueEntry &entry)
void Cleanup(void)
Clean the queue by removing entries that exceeded lifetime.
uint32_t m_size
Current queue size.
void SetInsertedTimeStamp(Time time)
Ipv4Address GetSourceAddress() const
Ptr< Ipv4Route > GetIpv4Route() const
Ipv4 addresses are stored in host order in this class.
void SetSourceAddress(Ipv4Address addr)
void Flush(void)
Clear the queue.
std::vector< DsrNetworkQueueEntry > m_dsrNetworkQueue
Queue (vector) of entries.
Time m_maxDelay
Maximum entry lifetime.
static TypeId GetTypeId(void)
void SetMaxNetworkSize(uint32_t maxSize)
Set the maximum queue size.
A base class which provides memory management and object aggregation.
Time GetInsertedTimeStamp(void) const
a unique identifier for an interface.
Ipv4Address m_nextHopAddr
bool Find(Ipv4Address nextHop)
void SetNextHopAddress(Ipv4Address addr)