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.
Time GetMaxNetworkDelay(void) const
Return the maximum entry lifetime for this queue.
uint32_t GetMaxNetworkSize(void) const
Return the maximum queue size.
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.
static Time Now(void)
Return the current simulation virtual time.
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
bool FindPacketWithNexthop(Ipv4Address nextHop, DsrNetworkQueueEntry &entry)
Find the packet entry with a given next hop.
void Cleanup(void)
Clean the queue by removing entries that exceeded lifetime.
uint32_t m_size
Current queue size.
void SetInsertedTimeStamp(Time time)
Set inserted time stamp function.
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)
Get the type ID.
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)
Set the parent TypeId.
bool Find(Ipv4Address nextHop)
Try to find an entry with a particular next hop, and return true if found.