|
237 |
pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms")); |
237 |
pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms")); |
238 |
|
238 |
|
239 |
// |
239 |
// |
|
|
240 |
// The idea here is that someone will look very closely at the all of the |
241 |
// communications between the reference TCP and the TCP under test in this |
242 |
// simulation and determine that all of the responses are correct. We expect |
243 |
// that this means generating a pcap trace file from the point-to-point link |
244 |
// and examining the packets closely using tcpdump, wireshark or some such |
245 |
// program. So we provide the ability to generate a pcap trace of the |
246 |
// test execution for your perusal. |
247 |
// |
248 |
// Once the validation test is determined to be running exactly as exptected, |
249 |
// the set of congestion window changes is collected and hard coded into the |
250 |
// test results which will then be checked during the actual execution of the |
251 |
// test. |
252 |
// |
253 |
|
254 |
if (m_writeResults) |
255 |
{ |
256 |
pointToPoint.EnablePcapAll ("tcp-cwnd"); |
257 |
} |
258 |
|
259 |
// |
240 |
// Install the point-to-point devices on both nodes and connec them up. |
260 |
// Install the point-to-point devices on both nodes and connec them up. |
241 |
// |
261 |
// |
242 |
NetDeviceContainer devices; |
262 |
NetDeviceContainer devices; |
|
306 |
app->SetStartTime (Seconds (1.)); |
326 |
app->SetStartTime (Seconds (1.)); |
307 |
app->SetStopTime (Seconds (1.1)); |
327 |
app->SetStopTime (Seconds (1.1)); |
308 |
|
328 |
|
309 |
// |
|
|
310 |
// The idea here is that someone will look very closely at the all of the |
311 |
// communications between the reference TCP and the TCP under test in this |
312 |
// simulation and determine that all of the responses are correct. We expect |
313 |
// that this means generating a pcap trace file from the point-to-point link |
314 |
// and examining the packets closely using tcpdump, wireshark or some such |
315 |
// program. So we provide the ability to generate a pcap trace of the |
316 |
// test execution for your perusal. |
317 |
// |
318 |
// Once the validation test is determined to be running exactly as exptected, |
319 |
// the set of congestion window changes is collected and hard coded into the |
320 |
// test results which will then be checked during the actual execution of the |
321 |
// test. |
322 |
// |
323 |
|
324 |
if (m_writeResults) |
325 |
{ |
326 |
pointToPoint.EnablePcapAll ("tcp-cwnd"); |
327 |
} |
328 |
|
329 |
Simulator::Stop (Seconds(2)); |
329 |
Simulator::Stop (Seconds(2)); |
330 |
Simulator::Run (); |
330 |
Simulator::Run (); |
331 |
Simulator::Destroy (); |
331 |
Simulator::Destroy (); |
|
443 |
p2p2.SetDeviceAttribute ("DataRate", DataRateValue (DataRate(100000))); |
443 |
p2p2.SetDeviceAttribute ("DataRate", DataRateValue (DataRate(100000))); |
444 |
p2p2.SetChannelAttribute ("Delay", TimeValue (MilliSeconds(10))); |
444 |
p2p2.SetChannelAttribute ("Delay", TimeValue (MilliSeconds(10))); |
445 |
|
445 |
|
|
|
446 |
if (m_writeResults) |
447 |
{ |
448 |
// Write a pcap for tcp cwnd testcase with out-of-order delivery |
449 |
PointToPointHelper pointToPoint; |
450 |
pointToPoint.EnablePcapAll ("tcp-cwnd-ood"); |
451 |
} |
452 |
|
446 |
// And then install devices and channels connecting our topology. |
453 |
// And then install devices and channels connecting our topology. |
447 |
NetDeviceContainer dev0 = p2p1.Install (n0n1); |
454 |
NetDeviceContainer dev0 = p2p1.Install (n0n1); |
448 |
NetDeviceContainer dev1 = p2p2.Install (n1n2); |
455 |
NetDeviceContainer dev1 = p2p2.Install (n1n2); |
|
487 |
app->SetStartTime (Seconds (1.0)); |
494 |
app->SetStartTime (Seconds (1.0)); |
488 |
app->SetStopTime (Seconds (5.4)); |
495 |
app->SetStopTime (Seconds (5.4)); |
489 |
|
496 |
|
490 |
if (m_writeResults) |
|
|
491 |
{ |
492 |
// Write a pcap for tcp cwnd testcase with out-of-order delivery |
493 |
PointToPointHelper pointToPoint; |
494 |
pointToPoint.EnablePcapAll ("tcp-cwnd-ood"); |
495 |
} |
496 |
|
497 |
// Finally, set up the simulator to run. |
497 |
// Finally, set up the simulator to run. |
498 |
Simulator::Stop (Seconds(5.4)); |
498 |
Simulator::Stop (Seconds(5.4)); |
499 |
Simulator::Run (); |
499 |
Simulator::Run (); |