|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
32 #include "ns3/ipv4-routing-protocol.h"
33 #include "ns3/simulator.h"
void SetQueueTimeout(Time t)
Set queue timeout.
Time GetExpireTime() const
Get expire time.
bool operator==(QueueEntry const &o) const
Compare queue entries.
static Time Now(void)
Return the current simulation virtual time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void DropPacketWithDst(Ipv4Address dst)
Remove all packets with destination IP address dst.
Ipv4Header m_header
IP header.
Ipv4RoutingProtocol::UnicastForwardCallback UnicastForwardCallback
IPv4 routing unicast forward callback typedef.
QueueEntry(Ptr< const Packet > pa=0, Ipv4Header const &h=Ipv4Header(), UnicastForwardCallback ucb=UnicastForwardCallback(), ErrorCallback ecb=ErrorCallback(), Time exp=Simulator::Now())
constructor
Ipv4 addresses are stored in host order in this class.
bool Dequeue(Ipv4Address dst, QueueEntry &entry)
Return first found (the earliest) entry for given destination.
uint32_t m_maxLen
The maximum number of packets that we allow a routing protocol to buffer.
void SetErrorCallback(ErrorCallback ecb)
Set error callback.
UnicastForwardCallback GetUnicastForwardCallback() const
Get unicast forward callback.
void SetUnicastForwardCallback(UnicastForwardCallback ucb)
Set unicast forward callback.
bool Find(Ipv4Address dst)
Finds whether a packet with destination dst exists in the queue.
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
Ipv4RoutingProtocol::ErrorCallback ErrorCallback
IPv4 routing error callback typedef.
void SetExpireTime(Time exp)
Set expire time.
Time m_expire
Expire time for queue entry.
std::vector< QueueEntry > m_queue
The queue.
Ptr< const Packet > m_packet
Data packet.
AODV route request queue.
Ipv4Header GetIpv4Header() const
Get IPv4 header.
Ptr< const Packet > GetPacket() const
Get packet from entry.
Simulation virtual time values and global simulation resolution.
void SetMaxQueueLen(uint32_t len)
Set maximum queue length.
bool Enqueue(QueueEntry &entry)
Push entry in queue, if there is no entry with the same packet and destination address in queue.
Control the scheduling of simulation events.
uint32_t GetMaxQueueLen() const
Get maximum queue length.
ErrorCallback GetErrorCallback() const
Get error callback.
void Purge()
Remove all expired entries.
RequestQueue(uint32_t maxLen, Time routeToQueueTimeout)
constructor
void SetPacket(Ptr< const Packet > p)
Set packet in entry.
ErrorCallback m_ecb
Error callback.
Time m_queueTimeout
The maximum period of time that a routing protocol is allowed to buffer a packet for,...
Time GetQueueTimeout() const
Get queue timeout.
void Drop(QueueEntry en, std::string reason)
Notify that packet is dropped from queue by timeout.
void SetIpv4Header(Ipv4Header h)
Set IPv4 header.
UnicastForwardCallback m_ucb
Unicast forward callback.