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

(-)a/src/test/ns3tcp/ns3tcp-cwnd-test-suite.cc (-27 / +27 lines)
 Lines 237-242    Link Here 
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;
 Lines 306-331    Link Here 
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 ();
 Lines 443-448    Link Here 
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);
 Lines 487-499    Link Here 
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 ();
(-)a/src/test/ns3tcp/ns3tcp-loss-test-suite.cc (-12 / +12 lines)
 Lines 94-99    Link Here 
94
  pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
94
  pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
95
  pointToPoint.SetChannelAttribute ("Delay", StringValue ("200ms"));
95
  pointToPoint.SetChannelAttribute ("Delay", StringValue ("200ms"));
96
96
97
  if (m_writeResults)
98
    {
99
      pointToPoint.EnablePcapAll ("tcp-loss-test-case-1");
100
      pointToPoint.EnableAsciiAll ("tcp-loss-test-case-1");
101
    }
102
97
  NetDeviceContainer devices;
103
  NetDeviceContainer devices;
98
  devices = pointToPoint.Install (n0, n1);
104
  devices = pointToPoint.Install (n0, n1);
99
105
 Lines 135-146    Link Here 
135
  pem->SetList (sampleList);
141
  pem->SetList (sampleList);
136
  devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (pem));
142
  devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (pem));
137
143
138
  if (m_writeResults)
139
    {
140
      pointToPoint.EnablePcapAll ("tcp-loss-test-case-1");
141
      pointToPoint.EnableAsciiAll ("tcp-loss-test-case-1");
142
    }
143
144
  Simulator::Stop (simStopTimeObj);
144
  Simulator::Stop (simStopTimeObj);
145
  Simulator::Run ();
145
  Simulator::Run ();
146
  Simulator::Destroy ();
146
  Simulator::Destroy ();
 Lines 203-208    Link Here 
203
  pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
203
  pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
204
  pointToPoint.SetChannelAttribute ("Delay", StringValue ("200ms"));
204
  pointToPoint.SetChannelAttribute ("Delay", StringValue ("200ms"));
205
205
206
  if (m_writeResults)
207
    {
208
      pointToPoint.EnablePcapAll ("tcp-loss-test-case-2");
209
      pointToPoint.EnableAsciiAll ("tcp-loss-test-case-2");
210
    }
211
206
  NetDeviceContainer devices;
212
  NetDeviceContainer devices;
207
  devices = pointToPoint.Install (n0, n1);
213
  devices = pointToPoint.Install (n0, n1);
208
214
 Lines 243-254    Link Here 
243
  pem->SetList (sampleList);
249
  pem->SetList (sampleList);
244
  devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (pem));
250
  devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (pem));
245
251
246
  if (m_writeResults)
247
    {
248
      pointToPoint.EnablePcapAll ("tcp-loss-test-case-2");
249
      pointToPoint.EnableAsciiAll ("tcp-loss-test-case-2");
250
    }
251
252
  Simulator::Stop (simStopTimeObj);
252
  Simulator::Stop (simStopTimeObj);
253
  Simulator::Run ();
253
  Simulator::Run ();
254
  Simulator::Destroy ();
254
  Simulator::Destroy ();
(-)a/src/test/ns3tcp/ns3tcp-socket-test-suite.cc (-9 / +10 lines)
 Lines 91-96    Link Here 
91
  pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
91
  pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
92
  pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
92
  pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));
93
93
94
  if (m_writeResults)
95
    {
96
      pointToPoint.EnablePcapAll ("tcp-socket-test-case-1");
97
    }
98
94
  NetDeviceContainer devices;
99
  NetDeviceContainer devices;
95
  devices = pointToPoint.Install (n0, n1);
100
  devices = pointToPoint.Install (n0, n1);
96
101
 Lines 131-141    Link Here 
131
  m_inputs.Add (464);  // ns-3 TCP default segment size of 536
136
  m_inputs.Add (464);  // ns-3 TCP default segment size of 536
132
  Simulator::Schedule(writerStopTimeObj, &SocketWriter::Close, socketWriter);
137
  Simulator::Schedule(writerStopTimeObj, &SocketWriter::Close, socketWriter);
133
138
134
  if (m_writeResults)
135
    {
136
      pointToPoint.EnablePcapAll ("tcp-socket-test-case-1");
137
    }
138
139
  Simulator::Stop (simStopTimeObj);
139
  Simulator::Stop (simStopTimeObj);
140
  Simulator::Run ();
140
  Simulator::Run ();
141
  Simulator::Destroy ();
141
  Simulator::Destroy ();
 Lines 202-207    Link Here 
202
  csma.SetChannelAttribute ("DataRate", StringValue ("5Mbps"));
202
  csma.SetChannelAttribute ("DataRate", StringValue ("5Mbps"));
203
  csma.SetChannelAttribute ("Delay", StringValue ("2ms"));
203
  csma.SetChannelAttribute ("Delay", StringValue ("2ms"));
204
204
205
  if (m_writeResults)
206
    {
207
      csma.EnablePcapAll ("tcp-socket-test-case-2", false);
208
    }
209
205
  NetDeviceContainer devices;
210
  NetDeviceContainer devices;
206
  devices = csma.Install (nodes);
211
  devices = csma.Install (nodes);
207
212
 Lines 246-255    Link Here 
246
  m_inputs.Add (1);
251
  m_inputs.Add (1);
247
  Simulator::Schedule(writerStopTimeObj, &SocketWriter::Close, socketWriter);
252
  Simulator::Schedule(writerStopTimeObj, &SocketWriter::Close, socketWriter);
248
253
249
  if (m_writeResults)
250
    {
251
      csma.EnablePcapAll ("tcp-socket-test-case-2", false);
252
    }
253
  Simulator::Stop (simStopTimeObj);
254
  Simulator::Stop (simStopTimeObj);
254
  Simulator::Run ();
255
  Simulator::Run ();
255
  Simulator::Destroy ();
256
  Simulator::Destroy ();

Return to bug 888