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

(-)a/src/internet-stack/internet-stack.cc (+1 lines)
 Lines 82-87   AddTcpStack(Ptr<Node> node) Link Here 
82
  Ptr<TcpSocketFactoryImpl> tcpFactory = CreateObject<TcpSocketFactoryImpl> ();
82
  Ptr<TcpSocketFactoryImpl> tcpFactory = CreateObject<TcpSocketFactoryImpl> ();
83
  tcpFactory->SetTcp (tcp);
83
  tcpFactory->SetTcp (tcp);
84
  node->AggregateObject (tcpFactory);
84
  node->AggregateObject (tcpFactory);
85
  node->AggregateObject (tcp);
85
}
86
}
86
87
87
static void
88
static void
(-)a/src/internet-stack/tcp-l4-protocol.cc (+15 lines)
 Lines 22-27    Link Here 
22
#include "ns3/log.h"
22
#include "ns3/log.h"
23
#include "ns3/nstime.h"
23
#include "ns3/nstime.h"
24
#include "ns3/boolean.h"
24
#include "ns3/boolean.h"
25
#include "ns3/object-vector.h"
25
26
26
#include "ns3/packet.h"
27
#include "ns3/packet.h"
27
#include "ns3/node.h"
28
#include "ns3/node.h"
 Lines 334-339   TcpL4Protocol::GetTypeId (void) Link Here 
334
                   BooleanValue (false),
335
                   BooleanValue (false),
335
                   MakeBooleanAccessor (&TcpL4Protocol::m_calcChecksum),
336
                   MakeBooleanAccessor (&TcpL4Protocol::m_calcChecksum),
336
                   MakeBooleanChecker ())
337
                   MakeBooleanChecker ())
338
    .AddAttribute ("SocketList", "The list of TcpSocketImpl sockets.",
339
                   ObjectVectorValue (),
340
                   MakeObjectVectorAccessor (&TcpL4Protocol::m_sockets),
341
                   MakeObjectVectorChecker<TcpSocketImpl> ())
337
    ;
342
    ;
338
  return tid;
343
  return tid;
339
}
344
}
 Lines 366-371   TcpL4Protocol::DoDispose (void) Link Here 
366
TcpL4Protocol::DoDispose (void)
371
TcpL4Protocol::DoDispose (void)
367
{
372
{
368
  NS_LOG_FUNCTION_NOARGS ();
373
  NS_LOG_FUNCTION_NOARGS ();
374
  for (std::vector<Ptr<TcpSocketImpl> >::iterator i = m_sockets.begin ();
375
       i != m_sockets.end (); i++)
376
    {
377
      Ptr<TcpSocketImpl> socket = *i;
378
      socket->Dispose ();
379
      *i = 0;
380
    }
381
  m_sockets.clear ();
382
 
369
  if (m_endPoints != 0)
383
  if (m_endPoints != 0)
370
    {
384
    {
371
      delete m_endPoints;
385
      delete m_endPoints;
 Lines 384-389   TcpL4Protocol::CreateSocket (void) Link Here 
384
  socket->SetNode (m_node);
398
  socket->SetNode (m_node);
385
  socket->SetTcp (this);
399
  socket->SetTcp (this);
386
  socket->SetRtt (rtt);
400
  socket->SetRtt (rtt);
401
  m_sockets.push_back (socket);
387
  return socket;
402
  return socket;
388
}
403
}
389
404
(-)a/src/internet-stack/tcp-l4-protocol.h (+3 lines)
 Lines 120-125   private: Link Here 
120
120
121
  bool m_goodChecksum;
121
  bool m_goodChecksum;
122
  bool m_calcChecksum;
122
  bool m_calcChecksum;
123
124
  std::vector<Ptr<TcpSocketImpl> > m_sockets;
125
123
};
126
};
124
127
125
}; // namespace ns3
128
}; // namespace ns3

Return to bug 458