View | Details | Raw Unified | Return to bug 2377
Collapse All | Expand All

(-)a/src/internet/model/udp-socket-impl.cc (-14 lines)
 Lines 812-824   UdpSocketImpl::SendTo (Ptr<Packet> p, uint32_t flags, const Address &address) Link Here 
812
  NS_LOG_FUNCTION (this << p << flags << address);
812
  NS_LOG_FUNCTION (this << p << flags << address);
813
  if (InetSocketAddress::IsMatchingType (address))
813
  if (InetSocketAddress::IsMatchingType (address))
814
    {
814
    {
815
      if (IsManualIpTos ())
816
        {
817
          SocketIpTosTag ipTosTag;
818
          ipTosTag.SetTos (GetIpTos ());
819
          p->AddPacketTag (ipTosTag);
820
        }
821
822
      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
815
      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
823
      Ipv4Address ipv4 = transport.GetIpv4 ();
816
      Ipv4Address ipv4 = transport.GetIpv4 ();
824
      uint16_t port = transport.GetPort ();
817
      uint16_t port = transport.GetPort ();
 Lines 826-838   UdpSocketImpl::SendTo (Ptr<Packet> p, uint32_t flags, const Address &address) Link Here 
826
    }
819
    }
827
  else if (Inet6SocketAddress::IsMatchingType (address))
820
  else if (Inet6SocketAddress::IsMatchingType (address))
828
    {
821
    {
829
      if (IsManualIpv6Tclass ())
830
        {
831
          SocketIpv6TclassTag ipTclassTag;
832
          ipTclassTag.SetTclass (GetIpv6Tclass ());
833
          p->AddPacketTag (ipTclassTag);
834
        }
835
836
      Inet6SocketAddress transport = Inet6SocketAddress::ConvertFrom (address);
822
      Inet6SocketAddress transport = Inet6SocketAddress::ConvertFrom (address);
837
      Ipv6Address ipv6 = transport.GetIpv6 ();
823
      Ipv6Address ipv6 = transport.GetIpv6 ();
838
      uint16_t port = transport.GetPort ();
824
      uint16_t port = transport.GetPort ();
(-)a/src/internet/test/udp-test.cc (+1 lines)
 Lines 275-280   UdpSocketImplTest::DoRun (void) Link Here 
275
  Ptr<SocketFactory> txSocketFactory = txNode->GetObject<UdpSocketFactory> ();
275
  Ptr<SocketFactory> txSocketFactory = txNode->GetObject<UdpSocketFactory> ();
276
  Ptr<Socket> txSocket = txSocketFactory->CreateSocket ();
276
  Ptr<Socket> txSocket = txSocketFactory->CreateSocket ();
277
  txSocket->SetAllowBroadcast (true);
277
  txSocket->SetAllowBroadcast (true);
278
  txSocket->SetIpTos (10);
278
279
279
  // ------ Now the tests ------------
280
  // ------ Now the tests ------------
280
281

Return to bug 2377