35 #include "ns3/ipv4-route.h"
36 #include "ns3/socket.h"
55 for (std::vector<ErrorBuffEntry>::const_iterator i =
m_errorBuffer.begin (); i
59 <<
" next hop " << i->GetNextHop () <<
" " << entry.
GetNextHop () <<
" dst " << i->GetDestination () <<
" " << entry.
GetDestination ());
88 std::vector<Ipv4Address>
list;
89 list.push_back (source);
90 list.push_back (nextHop);
91 const std::vector<Ipv4Address> link =
list;
95 for (std::vector<ErrorBuffEntry>::iterator i =
m_errorBuffer.begin (); i
100 DropLink (*i,
"DropPacketForErrLink");
116 if (i->GetDestination () == dst)
133 for (std::vector<ErrorBuffEntry>::const_iterator i =
m_errorBuffer.begin (); i
136 if (i->GetDestination () == dst)
163 for (std::vector<ErrorBuffEntry>::iterator i =
m_errorBuffer.begin (); i
169 Drop (*i,
"Drop out-dated packet ");
bool Dequeue(Ipv4Address dst, ErrorBuffEntry &entry)
bool operator()(ErrorBuffEntry const &e) const
#define NS_LOG_FUNCTION(parameters)
Time m_errorBufferTimeout
uint64_t GetUid(void) const
bool Enqueue(ErrorBuffEntry &entry)
void DropPacketForErrLink(Ipv4Address source, Ipv4Address nextHop)
uint32_t GetSize(void) const
Ipv4Address GetNextHop() const
void DropLink(ErrorBuffEntry en, std::string reason)
Ptr< const Packet > GetPacket() const
static bool LinkEqual(ErrorBuffEntry en, const std::vector< Ipv4Address > link)
Ipv4Address GetDestination() const
#define NS_LOG_LOGIC(msg)
bool Find(Ipv4Address dst)
Ipv4 addresses are stored in host order in this class.
#define NS_LOG_DEBUG(msg)
Ipv4Address GetSource() const
NS_LOG_COMPONENT_DEFINE("DsrErrorBuffer")
void Drop(ErrorBuffEntry en, std::string reason)
void SetExpireTime(Time exp)
Time GetExpireTime() const
std::vector< ErrorBuffEntry > m_errorBuffer