diff --git a/CHANGES.html b/CHANGES.html index 3d344a5da..fd7275326 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -46,26 +46,67 @@ us a note on ns-developers mailing list.
+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);
+ }
+}
+
+