Some more udp socket debug messages
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Fri Feb 01 18:40:14 2008 +0000 (2008-02-01)
changeset 22990b9193f38f18
parent 2298 f61e41169911
child 2300 055ff23aa034
Some more udp socket debug messages
src/internet-node/udp-socket.cc
     1.1 --- a/src/internet-node/udp-socket.cc	Fri Feb 01 18:39:37 2008 +0000
     1.2 +++ b/src/internet-node/udp-socket.cc	Fri Feb 01 18:40:14 2008 +0000
     1.3 @@ -276,15 +276,19 @@
     1.4    //
     1.5    if (dest.IsBroadcast ())
     1.6      {
     1.7 -      NS_LOG_LOGIC ("Limited broadcast");
     1.8 +      NS_LOG_LOGIC ("Limited broadcast start.");
     1.9        for (uint32_t i = 0; i < ipv4->GetNInterfaces (); i++ )
    1.10          {
    1.11            Ipv4Address addri = ipv4->GetAddress (i);
    1.12            Ipv4Mask maski = ipv4->GetNetworkMask (i);
    1.13 -          m_udp->Send (p->Copy (), addri, addri.GetSubnetDirectedBroadcast (maski),
    1.14 +          Ipv4Address bcast = addri.GetSubnetDirectedBroadcast (maski);
    1.15 +          NS_LOG_LOGIC ("Sending one copy from " << addri << " to " << bcast
    1.16 +                        << " (mask is " << maski << ")");
    1.17 +          m_udp->Send (p->Copy (), addri, bcast,
    1.18                         m_endPoint->GetLocalPort (), port);
    1.19            NotifyDataSent (p->GetSize ());
    1.20          }
    1.21 +      NS_LOG_LOGIC ("Limited broadcast end.");
    1.22      }
    1.23    else if (ipv4->GetIfIndexForDestination(dest, localIfIndex))
    1.24      {