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

(-)old/tcp-socket-base.cc (-5 / +11 lines)
 Lines 557-563    Link Here 
557
      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
557
      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
558
      Ipv4Address ipv4 = transport.GetIpv4 ();
558
      Ipv4Address ipv4 = transport.GetIpv4 ();
559
      uint16_t port = transport.GetPort ();
559
      uint16_t port = transport.GetPort ();
560
      SetIpTos (transport.GetTos ());
560
      if( transport.GetTos () > 0) 
561
        SetIpTos (transport.GetTos ());
562
      
563
561
      if (ipv4 == Ipv4Address::GetAny () && port == 0)
564
      if (ipv4 == Ipv4Address::GetAny () && port == 0)
562
        {
565
        {
563
          m_endPoint = m_tcp->Allocate ();
566
          m_endPoint = m_tcp->Allocate ();
 Lines 669-676    Link Here 
669
          NS_ASSERT (m_endPoint != 0);
672
          NS_ASSERT (m_endPoint != 0);
670
        }
673
        }
671
      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
674
      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
672
      m_endPoint->SetPeer (transport.GetIpv4 (), transport.GetPort ());
675
      m_endPoint->SetPeer (transport.GetIpv4 (), transport.GetPort ());  
673
      SetIpTos (transport.GetTos ());
676
      if( transport.GetTos () > 0)
677
        SetIpTos (transport.GetTos ());
678
      
679
674
      m_endPoint6 = 0;
680
      m_endPoint6 = 0;
675
681
676
      // Get the appropriate local address and port number from the routing protocol and set up endpoint
682
      // Get the appropriate local address and port number from the routing protocol and set up endpoint
 Lines 680-686    Link Here 
680
          return -1;
686
          return -1;
681
        }
687
        }
682
    }
688
    }
683
  else if (Inet6SocketAddress::IsMatchingType (address)  && m_endPoint == 0)
689
  else if (Inet6SocketAddress::IsMatchingType (address) && m_endPoint == 0)
684
    {
690
    {
685
      // If we are operating on a v4-mapped address, translate the address to
691
      // If we are operating on a v4-mapped address, translate the address to
686
      // a v4 address and re-call this function
692
      // a v4 address and re-call this function
 Lines 995-1001    Link Here 
995
      NS_ASSERT (m_endPoint6 != 0);
1001
      NS_ASSERT (m_endPoint6 != 0);
996
    }
1002
    }
997
  m_endPoint6->BindToNetDevice (netdevice);
1003
  m_endPoint6->BindToNetDevice (netdevice);
998
1004
 
999
  return;
1005
  return;
1000
}
1006
}
1001
1007
(-)old/udp-socket-impl.cc (-3 / +13 lines)
 Lines 256-262    Link Here 
256
      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
256
      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
257
      Ipv4Address ipv4 = transport.GetIpv4 ();
257
      Ipv4Address ipv4 = transport.GetIpv4 ();
258
      uint16_t port = transport.GetPort ();
258
      uint16_t port = transport.GetPort ();
259
      SetIpTos (transport.GetTos ());
259
260
      if(transport.GetTos () > 0)
261
        SetIpTos (transport.GetTos ());
262
      else if(GetIpTos () > 0)
263
        transport.SetTos (GetIpTos ());
264
260
      if (ipv4 == Ipv4Address::GetAny () && port == 0)
265
      if (ipv4 == Ipv4Address::GetAny () && port == 0)
261
        {
266
        {
262
          m_endPoint = m_udp->Allocate ();
267
          m_endPoint = m_udp->Allocate ();
 Lines 375-381    Link Here 
375
      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
380
      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
376
      m_defaultAddress = Address(transport.GetIpv4 ());
381
      m_defaultAddress = Address(transport.GetIpv4 ());
377
      m_defaultPort = transport.GetPort ();
382
      m_defaultPort = transport.GetPort ();
378
      SetIpTos (transport.GetTos ());
383
      
384
      if(transport.GetTos () > 0)
385
        SetIpTos (transport.GetTos ());
386
      else if(GetIpTos () > 0)
387
        transport.SetTos (GetIpTos ());
388
379
      m_connected = true;
389
      m_connected = true;
380
      NotifyConnectionSucceeded ();
390
      NotifyConnectionSucceeded ();
381
    }
391
    }
 Lines 802-808    Link Here 
802
      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
812
      InetSocketAddress transport = InetSocketAddress::ConvertFrom (address);
803
      Ipv4Address ipv4 = transport.GetIpv4 ();
813
      Ipv4Address ipv4 = transport.GetIpv4 ();
804
      uint16_t port = transport.GetPort ();
814
      uint16_t port = transport.GetPort ();
805
      uint8_t tos = transport.GetTos ();
815
      uint8_t tos = (transport.GetTos () > 0) ? transport.GetTos () : GetIpTos();
806
      return DoSendTo (p, ipv4, port, tos);
816
      return DoSendTo (p, ipv4, port, tos);
807
    }
817
    }
808
  else if (Inet6SocketAddress::IsMatchingType (address))
818
  else if (Inet6SocketAddress::IsMatchingType (address))

Return to bug 2555