From 24344fd911ea3fb950517318c4309ea404e85b6d Mon Sep 17 00:00:00 2001
From: Mathieu Lacage
+void
+SimpleChannel::Send (Ptr<Packet> p, uint16_t protocol,
+ Mac48Address to, Mac48Address from,
+ Ptr<SimpleNetDevice> sender)
+{
+ for (std::vector<Ptr<SimpleNetDevice> >::const_iterator i = m_devices.begin (); i != m_devices.end (); ++i)
+ {
+ Ptr<SimpleNetDevice> tmp = *i;
+ if (tmp == sender)
+ {
+ continue;
+ }
+ Simulator::ScheduleNow (&SimpleNetDevice::Receive, tmp, p->Copy (), protocol, to, from);
+ }
+}
+
+After:
+
+void
+SimpleChannel::Send (Ptr<Packet> p, uint16_t protocol,
+ Mac48Address to, Mac48Address from,
+ Ptr<SimpleNetDevice> sender)
+{
+ for (std::vector<Ptr<SimpleNetDevice> >::const_iterator i = m_devices.begin (); i != m_devices.end (); ++i)
+ {
+ Ptr<SimpleNetDevice> tmp = *i;
+ if (tmp == sender)
+ {
+ continue;
+ }
+ Simulator::ScheduleWithContext (tmp->GetNode ()->GetId (), Seconds (0),
+ &SimpleNetDevice::Receive, tmp, p->Copy (), protocol, to, from);
+ }
+}
+
+