38 #include "ns3/ipv4-route.h"
39 #include "ns3/socket.h"
109 if (i->GetNextHopAddress () == nextHop)
125 if (i->GetNextHopAddress () == nextHop)
180 if (i->GetInsertedTimeStamp () +
m_maxDelay > now)
Simulation virtual time values and global simulation resolution.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
uint32_t GetSize()
Number of entries.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
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.
bool Dequeue(DsrNetworkQueueEntry &entry)
Return first found (the earliest) entry for given destination.
uint32_t GetMaxNetworkSize(void) const
Return the maximum queue size.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
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.
static Time Now(void)
Return the current simulation virtual time.
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)
Ipv4 addresses are stored in host order in this class.
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.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
bool Find(Ipv4Address nextHop)