[internet] Arp logging: label with request or reply properly

This commit is contained in:
Piyush Aggarwal
2016-09-27 20:21:10 -04:00
parent 787430613e
commit 7bb5492e44
2 changed files with 8 additions and 4 deletions

View File

@@ -106,6 +106,7 @@ Bugs fixed
- Bug 2500 - Ipv[4,6]RawSocket ignores IpTtl tag
- Bug 2507 - ConfigStore RawTextConfigLoad doesn't reset stream error state
- Bug 2508 - Duplicate of bug 2507
- No BugId - Arp logging: label with request or reply properly
Known issues
------------

View File

@@ -186,10 +186,13 @@ ArpL3Protocol::Receive (Ptr<NetDevice> device, Ptr<const Packet> p, uint16_t pro
NS_LOG_LOGIC ("ARP: Cannot remove ARP header");
return;
}
NS_LOG_LOGIC ("ARP: received "<< (arp.IsRequest () ? "request" : "reply") <<
" node="<<m_node->GetId ()<<", got request from " <<
arp.GetSourceIpv4Address () << " for address " <<
arp.GetDestinationIpv4Address () << "; we have addresses: ");
NS_LOG_LOGIC ("ARP: received " << (arp.IsRequest () ? "request" : "reply") <<
" node=" << m_node->GetId () <<
", got " <<
(arp.IsRequest () ? "request" : "reply") <<
" from " << arp.GetSourceIpv4Address () <<
" for address " << arp.GetDestinationIpv4Address () <<
"; we have addresses: ");
for (uint32_t i = 0; i < cache->GetInterface ()->GetNAddresses (); i++)
{
NS_LOG_LOGIC (cache->GetInterface ()->GetAddress (i).GetLocal () << ", ");