equal
deleted
inserted
replaced
262 // 210 bytes at a rate of 448 Kb/s |
262 // 210 bytes at a rate of 448 Kb/s |
263 NS_LOG_INFO ("Create Applications."); |
263 NS_LOG_INFO ("Create Applications."); |
264 uint16_t port = 9; // Discard port (RFC 863) |
264 uint16_t port = 9; // Discard port (RFC 863) |
265 OnOffHelper onoff ("ns3::UdpSocketFactory", |
265 OnOffHelper onoff ("ns3::UdpSocketFactory", |
266 Address (InetSocketAddress (Ipv4Address ("11.0.0.254"), port))); |
266 Address (InetSocketAddress (Ipv4Address ("11.0.0.254"), port))); |
267 onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); |
267 onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]")); |
268 onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); |
268 onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]")); |
269 ApplicationContainer apps = onoff.Install (c.Get (0)); |
269 ApplicationContainer apps = onoff.Install (c.Get (0)); |
270 apps.Start (Seconds (1.0)); |
270 apps.Start (Seconds (1.0)); |
271 apps.Stop (Seconds (10.0)); |
271 apps.Stop (Seconds (10.0)); |
272 |
272 |
273 // Create a packet sink to receive these packets |
273 // Create a packet sink to receive these packets |