32 #ifndef DSR_PASSIVEBUFF_H
33 #define DSR_PASSIVEBUFF_H
36 #include "ns3/ipv4-routing-protocol.h"
37 #include "ns3/simulator.h"
69 return ((m_packet == o.m_packet) && (m_source == o.m_source) && (m_nextHop == o.m_nextHop) && (m_dst == o.m_dst) && (m_expire == o.m_expire));
81 Ipv4Address GetDestination ()
const
85 void SetDestination (Ipv4Address d)
89 Ipv4Address GetSource ()
const
93 void SetSource (Ipv4Address s)
97 Ipv4Address GetNextHop ()
const
101 void SetNextHop (Ipv4Address n)
105 uint16_t GetIdentification ()
const
107 return m_identification;
109 void SetIdentification (uint16_t i)
111 m_identification = i;
113 uint16_t GetFragmentOffset ()
const
115 return m_fragmentOffset;
117 void SetFragmentOffset (uint16_t f)
119 m_fragmentOffset = f;
121 uint8_t GetSegsLeft ()
const
125 void SetSegsLeft (uint8_t seg)
129 void SetExpireTime (Time exp)
133 Time GetExpireTime ()
const
137 void SetProtocol (uint8_t p)
141 uint8_t GetProtocol ()
const
148 Ptr<const Packet> m_packet;
152 Ipv4Address m_source;
154 Ipv4Address m_nextHop;
156 uint16_t m_identification;
157 uint16_t m_fragmentOffset;
199 uint32_t GetMaxQueueLen ()
const
203 void SetMaxQueueLen (uint32_t len)
207 Time GetPassiveBufferTimeout ()
const
209 return m_passiveBufferTimeout;
211 void SetPassiveBufferTimeout (
Time t)
213 m_passiveBufferTimeout = t;
219 std::vector<PassiveBuffEntry> m_passiveBuffer;
229 Time m_passiveBufferTimeout;
231 static bool LinkEqual (
PassiveBuffEntry en,
const std::vector<Ipv4Address> link)
233 return ((en.GetSource () == link[0]) && (en.GetNextHop () == link[1]));
DSR Passive Buffer Entry.
bool operator==(PassiveBuffEntry const &o) const
static TypeId GetTypeId()
Get the type identificator.
virtual ~PassiveBuffer()
Destructor.
PassiveBuffer()
Constructor.
Ipv4 addresses are stored in host order in this class.
a base class which provides memory management and object aggregation
a unique identifier for an interface.