Skip to content

Commit

Permalink
internet: schedule for immediate time a self addressed packet.
Browse files Browse the repository at this point in the history
  • Loading branch information
tolikzinovyev authored and TommyPec committed Jan 6, 2024
1 parent 3c52fe4 commit 4fe9136
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
14 changes: 8 additions & 6 deletions src/internet/model/ipv4-interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,14 @@ Ipv4Interface::Send(Ptr<Packet> p, const Ipv4Header& hdr, Ipv4Address dest)
if (dest == (*i).GetLocal())
{
p->AddHeader(hdr);
m_tc->Receive(m_device,
p,
Ipv4L3Protocol::PROT_NUMBER,
m_device->GetBroadcast(),
m_device->GetBroadcast(),
NetDevice::PACKET_HOST);
Simulator::ScheduleNow(&TrafficControlLayer::Receive,
m_tc,
m_device,
p,
Ipv4L3Protocol::PROT_NUMBER,
m_device->GetBroadcast(),
m_device->GetBroadcast(),
NetDevice::PACKET_HOST);
return;
}
}
Expand Down
14 changes: 8 additions & 6 deletions src/internet/model/ipv6-interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,14 @@ Ipv6Interface::Send(Ptr<Packet> p, const Ipv6Header& hdr, Ipv6Address dest)
if (dest == it->first.GetAddress())
{
p->AddHeader(hdr);
m_tc->Receive(m_device,
p,
Ipv6L3Protocol::PROT_NUMBER,
m_device->GetBroadcast(),
m_device->GetBroadcast(),
NetDevice::PACKET_HOST);
Simulator::ScheduleNow(&TrafficControlLayer::Receive,
m_tc,
m_device,
p,
Ipv6L3Protocol::PROT_NUMBER,
m_device->GetBroadcast(),
m_device->GetBroadcast(),
NetDevice::PACKET_HOST);
return;
}
}
Expand Down

0 comments on commit 4fe9136

Please sign in to comment.