|
29 |
#include "ns3/simulator.h" |
29 |
#include "ns3/simulator.h" |
30 |
#include "ns3/ipv4-route.h" |
30 |
#include "ns3/ipv4-route.h" |
31 |
#include "ns3/ipv6-route.h" |
31 |
#include "ns3/ipv6-route.h" |
|
|
32 |
#include "ns3/random-variable-stream.h" |
33 |
#include "ns3/string.h" |
34 |
#include "ns3/pointer.h" |
32 |
|
35 |
|
33 |
#include "tcp-l4-protocol.h" |
36 |
#include "tcp-l4-protocol.h" |
34 |
#include "tcp-header.h" |
37 |
#include "tcp-header.h" |
|
83 |
ObjectVectorValue (), |
86 |
ObjectVectorValue (), |
84 |
MakeObjectVectorAccessor (&TcpL4Protocol::m_sockets), |
87 |
MakeObjectVectorAccessor (&TcpL4Protocol::m_sockets), |
85 |
MakeObjectVectorChecker<TcpSocketBase> ()) |
88 |
MakeObjectVectorChecker<TcpSocketBase> ()) |
|
|
89 |
.AddAttribute ("IsnRandomVariable", |
90 |
"Random variable used to generate an initial sequence number.", |
91 |
StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=4294967295.0]"), |
92 |
MakePointerAccessor (&TcpL4Protocol::m_isnGenerator), |
93 |
MakePointerChecker<RandomVariableStream> ()) |
86 |
; |
94 |
; |
87 |
return tid; |
95 |
return tid; |
88 |
} |
96 |
} |
|
99 |
NS_LOG_FUNCTION (this); |
107 |
NS_LOG_FUNCTION (this); |
100 |
} |
108 |
} |
101 |
|
109 |
|
|
|
110 |
int64_t |
111 |
TcpL4Protocol::AssignStreams (int64_t stream) |
112 |
{ |
113 |
NS_LOG_FUNCTION (this << stream); |
114 |
m_isnGenerator->SetStream (stream); |
115 |
return 1; |
116 |
} |
117 |
|
102 |
void |
118 |
void |
103 |
TcpL4Protocol::SetNode (Ptr<Node> node) |
119 |
TcpL4Protocol::SetNode (Ptr<Node> node) |
104 |
{ |
120 |
{ |
|
190 |
socket->SetTcp (this); |
206 |
socket->SetTcp (this); |
191 |
socket->SetRtt (rtt); |
207 |
socket->SetRtt (rtt); |
192 |
socket->SetCongestionControlAlgorithm (algo); |
208 |
socket->SetCongestionControlAlgorithm (algo); |
|
|
209 |
socket->SetInitialSequence (m_isnGenerator->GetInteger ()); |
193 |
|
210 |
|
194 |
m_sockets.push_back (socket); |
211 |
m_sockets.push_back (socket); |
195 |
return socket; |
212 |
return socket; |
|
697 |
++it; |
714 |
++it; |
698 |
} |
715 |
} |
699 |
|
716 |
|
|
|
717 |
socket->SetInitialSequence (m_isnGenerator->GetInteger ()); |
700 |
m_sockets.push_back (socket); |
718 |
m_sockets.push_back (socket); |
701 |
} |
719 |
} |
702 |
|
720 |
|