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)
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.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void SetInsertedTimeStamp(Time time)
Set inserted time stamp function.
Introspection did not find any typical Config paths.
uint32_t m_maxSize
Maximum queue size.
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.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.