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"
Ipv4 addresses are stored in host order in this class.
A base class which provides memory management and object aggregation.
static Time Now(void)
Return the current simulation virtual time.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
bool operator==(DsrNetworkQueueEntry const &o) const
Compare send buffer entries.
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.
Ptr< Ipv4Route > m_ipv4Route
Ipv4Route.
Ipv4Address m_srcAddr
source address
Ipv4Address GetSourceAddress() const
Get source address function.
Time GetInsertedTimeStamp(void) const
Get inserted time stamp function.
void SetIpv4Route(Ptr< Ipv4Route > route)
Set IP route function.
void SetNextHopAddress(Ipv4Address addr)
Set next hop address function.
Ptr< const Packet > GetPacket() const
Get packet function.
void SetInsertedTimeStamp(Time time)
Set inserted time stamp function.
void SetSourceAddress(Ipv4Address addr)
Set source address function.
Ptr< Ipv4Route > GetIpv4Route() const
Get IP route function.
Ipv4Address m_nextHopAddr
next hop address
Ipv4Address GetNextHopAddress() const
Get next hop address function.
void SetPacket(Ptr< const Packet > p)
Set packet function.
Ptr< const Packet > m_packet
Data packet.
Introspection did not find any typical Config paths.
uint32_t m_maxSize
Maximum queue size.
std::vector< DsrNetworkQueueEntry > & GetQueue()
Return the current queue entry.
bool FindPacketWithNexthop(Ipv4Address nextHop, DsrNetworkQueueEntry &entry)
Find the packet entry with a given next hop.
uint32_t GetSize()
Number of entries.
void SetMaxNetworkDelay(Time delay)
Set the maximum entry lifetime in the queue.
Time GetMaxNetworkDelay(void) const
Return the maximum entry lifetime for this queue.
bool Enqueue(DsrNetworkQueueEntry &entry)
Push entry in queue, if there is no entry with the same packet and destination address in queue.
static TypeId GetTypeId(void)
Get the type ID.
std::vector< DsrNetworkQueueEntry > m_dsrNetworkQueue
Queue (vector) of entries.
Time m_maxDelay
Maximum entry lifetime.
uint32_t GetMaxNetworkSize(void) const
Return the maximum queue size.
void SetMaxNetworkSize(uint32_t maxSize)
Set the maximum queue size.
uint32_t m_size
Current queue size.
bool Find(Ipv4Address nextHop)
Try to find an entry with a particular next hop, and return true if found.
void Cleanup(void)
Clean the queue by removing entries that exceeded lifetime.
void Flush(void)
Clear the queue.
bool Dequeue(DsrNetworkQueueEntry &entry)
Return first found (the earliest) entry for given destination.
Every class exported by the ns3 library is enclosed in the ns3 namespace.