examples/tcp/tcp-testcases.cc
changeset 6698 bc947fbfac80
parent 6694 a814f37d15bf
equal deleted inserted replaced
6697:6f1114f669ff 6698:bc947fbfac80
   164   InternetStackHelper internet;
   164   InternetStackHelper internet;
   165   internet.InstallAll ();
   165   internet.InstallAll ();
   166 
   166 
   167   // Connect the nodes
   167   // Connect the nodes
   168   PointToPointHelper p2p;
   168   PointToPointHelper p2p;
   169   p2p.SetDeviceAttribute ("DataRate", DataRateValue (DataRate (1e6)));
   169   p2p.SetDeviceAttribute ("DataRate", DataRateValue (DataRate (1000000)));
   170   p2p.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (0.1)));
   170   p2p.SetChannelAttribute ("Delay", TimeValue (Seconds (0.0001)));
   171   NetDeviceContainer dev0 = p2p.Install (n0n1);
   171   NetDeviceContainer dev0 = p2p.Install (n0n1);
   172   NetDeviceContainer dev1 = p2p.Install (n1n2);
   172   NetDeviceContainer dev1 = p2p.Install (n1n2);
   173 
   173 
   174   // Add IP addresses to each network interfaces
   174   // Add IP addresses to each network interfaces
   175   Ipv4AddressHelper ipv4;
   175   Ipv4AddressHelper ipv4;
   212     {
   212     {
   213     case 0: // Verify connection establishment
   213     case 0: // Verify connection establishment
   214       totalTxBytes = 1000;
   214       totalTxBytes = 1000;
   215       break;
   215       break;
   216     case 1: // Verify a bigger (100 pkts) transfer: Sliding window operation, etc.
   216     case 1: // Verify a bigger (100 pkts) transfer: Sliding window operation, etc.
   217       totalTxBytes = 1e5;
   217       totalTxBytes = 100*1000;
   218       break;
   218       break;
   219     case 2: // Survive a SYN lost
   219     case 2: // Survive a SYN lost
   220       totalTxBytes = 1000;
   220       totalTxBytes = 1000;
   221       dropListN0.push_back (0);
   221       dropListN0.push_back (0);
   222       break;
   222       break;