|
|
| 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 |
|